#!/bin/bash # This is a simple-minded script to clean up the html # generated by the InfoLister extension for Firefox, # to turn it into valid HTML 4.01. # (It's not really InfoLister's fault that the html # isn't valid in the first place -- it has to do with # unencoded characters like " and & in the extensions' # descriptions.) # It also adds homepage URLs if they're missing and # changes some homepage URLS I wasn't happy with. # Note: InfoLister's output is UTF-8 and this script's # charset is UTF-8. The output can be (and is) # served as ISO-8859-1, but it's just US-ASCII with # html entities. I don't know how bash/my system # handles the charsets, but this is what works for # me. # the file to be cleaned up INPUTFILE=~/web/remarqs.net/firefox/infolistergenerated.htm.txt # the cleaned file OUTPUTFILE=~/web/remarqs.net/firefox/extlist.htm # sessionfix url not so good, fixing # errorzilla mod page now bad, use amo instead # long titles page now just points to amo, so link there # quickrestart page is 404 # active stop button broken bad url # firesizer lacks a URL # objection links to old homepage # quickrestart has " marks in its description # console^2 needs the ^2 encoded # faviconpicker II lacks a URL # page info button has quotes in description # throbber button lacks a URL # bookmark sync & sort URL is a 404 # chromelist URL is lousy # middleclicknocollapse hacked at by me # us dept of homeland idiocy URL is lousy # save complete lacks a URL # permatabs homepage has nothing on it yet # strip out disabled extensions cat $INPUTFILE | sed 's~\(http://www\.defector\.de/blog/categor\)ies/5-Firefox-Extensions~\1y/firefox-extensions/session-fix/~' | sed 's~http://www\.jaybaldwin\.com/News\.aspx.*=51~https://addons.mozilla.org/firefox/addon/3336~' | sed 's~".*\~robin0.*\"~"https://addons.mozilla.org/en-US/firefox/addon/1715"~' | sed 's~http://quickaddons\.fastspace\.biz/~https://addons.mozilla.org/firefox/addon/3559~' | sed 's~https://addons\.mozilla\.org/extensions/moreinfo\.php\?.*id=2025~https://addons.mozilla.org/firefox/addon/2025~' | sed 's~href=\"\"\(.*Firesizer\)~href="https://addons.mozilla.org/firefox/addon/5792"\1~' | sed 's~http://sourceforge\.net/projects/objection-ext/~http://objection.mozdev.org/~' | sed 's~title=\"Adds a \"Restart Firefox\" item to the \"File\"~title="Adds a \"Restart Firefox\" item to the \"File\"~' | sed 's/Console²/Console\²/' | sed 's/href=\"\"\(.*Favicon[[:space:]]Picker\)/href=\"https:\/\/addons.mozilla.org\/addon\/3176\"\1/' | sed 's/\"Page Info\"/\"Page Info\"/' | sed 's/href=\"\"\(.*Throbber\)/href=\"https:\/\/addons.mozilla.org\/addon\/2821\"\1/' | sed 's/href=\".*syncandsort.*html\"/href=\"https:\/\/addons.mozilla.org\/addon\/2367\"/' | sed 's/http:\/\/www\.gijsk\.com\//http:\/\/www.gijsk.com\/mozilla\/chromelist\//' | sed 's/\"http:\/\/visuallinkindicator\.mozdev\.org\/\"/\"bumped.htm\"/' | sed 's/href=\"http:\/\/www\.taupehat\.com\"/href=\"https:\/\/addons.mozilla.org\/addon\/1501\"/' | sed 's/href=\"\"\(.*Save[[:space:]]Complete\)/href=\"https:\/\/addons.mozilla.org\/addon\/4723\"\1/' | sed 's~\"http://www\.donesmart\.com/\"~\"https://addons.mozilla.org/firefox/addon/2558\"~' | sed 's/.*\[disabled\]
$//' \ > $OUTPUTFILE