GIT Overview |
Peter's Script-Archive - some scripts for Firefox
Some firefox command line support scripts addressing usage
deficiencies of firefox. Usable to e.g. load all bookmarks from a
number of bookmarkfolders (have firefox or firefoxstdin invoke
firefoxgrep...) . In a pinch, the scripts below also offer a low level
method to diff/copy a few changed bookmarks.
As I'm using the command line rather than just mouse & GUI,
these scripts are life-safers and necessary to make firefox
properly usable for me at a mere 'works-for-me' level. As such,
this set of scripts is more of a raw concept example for firefox shell
integration rather than a proper finished releasable script. That
said, if you've a shell related firefox pet-peave, I'll gladly have a
look at it :).
See also: For a better generic approach to control
itself), Corion's recent WWW::Mechanize::Firefox
To use a tk-style approach to build a
Note that the firefox wrapper should be rewritten in
perl with firefoxstdin folded into the code. Currently the two scripts
call each other for a number of functions... . But that's what you get
with works-for-me examples :).
- X11 and pixmap caching: Looks like export MOZ_DISABLE_IMAGE_OPTIMIZE=1 is
still required to avoid firefox placing pixmaps into an ever growing
X11 when e.g. using multiple tabs and autopager.
- sqlite3 FILE.SQLIST vacuum can be used to clean a sqlite file when firefox is not running.
- a cheap trick to get sqlite content (read-only): ask the user to leave the browser
idle for a few seconds, then just cp the sqlite file of interest. The data should have
been flushed to disk, and copying will break locks and make the contents accessible again.
See e.g. firefoxgrep*sqlite in this section.
- userChrome.css contains a collection of settings to somewhat reduce the wasted
screen real estate. To further reduce wastage, hide navbar and bookmark bar and configure
the menubar to show the url field and forward/back/stop/reload (small-icons/no-text).
With above Chrome settings, even microfox(sp?) isn't able to reclaim much more space :).
I've placed the file into this section.
- My required minimum of addons to get along with firefox:
- System: Addblock Plus, Add N Edit Cookies (if necessary modify the jar and
edit the version number to allow installation; I've yet to see a worthwile substitute),
Noscript, Secure Login, User Agent Switcher, ModifyHeaders, JSView.
- Usability: AOIS Sidebar, Tabkit (replaced tabmixplus; one pet-peeve: opening a
bookmark folder from the menu also replaces the current tab)
- Usability 2: AutoPager.
- Usability & nice to have: SplitBrowser, ResurrectPage, GreaseMonkey
- Information Overload: NewsFox (though firefoxgrep goes a long way to deal with
periodic weekly or monthly site visits: create a folder like watch/news.weekly, and ask
the wrapper with 'firefox -weekly' to grep for urls and folders ending in weekly.
Alternatively, just open each '*.weekly' folder from the bookmarks menu, selecting
- Information Overload & nice to have: Zotero's local data store's actually quite accessible
using a little bit of sql/sqlite. So that's another nice tool, and it is possible
to extract things from Zotero using the command line.
- xul/migemo would be very nice as well if it wouldn't crash on me as soon as
I try to search using regular expressiones.
View of this section / Download
- firefox is a rather ugly script with grown warts; actually nowadays,
firefox 3.5 finally implements some of the features I'm using this wrapper
for. Note that to directly load a set of urls from a file firefox.-NAME,
you need to add -NAME to the list of shortcuts in the script. If the file for
the shortcut doesn't exist, firefoxstdin is invoked instead with this option.
- firefoxcookies dumps cookies.sqlite.
- firefoxdelta is a helper to show differences in bookmarks.
- firefoxgrep* greps both html and sqlite bookmarks.
- firefoxstdin: given urls or grep commands on stdin, get the urls, repair
them (e.g. urls pasted from email) and use the firefox wrapper to open them in
the running firefox instance. Some shortcuts
like -weekly are defined, which is translated to the input line "GREP 'weekly ::'",
which is expanded to the output of a firefoxgrep for all bookmarks ending with
weekly or being in folders ending with the string weekly. This implements a way
to open a number of folders straight from the command line.
- firefoxsessionlist dumps xml-ish files like the firefox sessionstore
in a number of representations, with some grepping added.
GIT Overview |
jakobi(at)acm.org, 2009-07 - 2012-03