Instead of checking, if *any* qutebrowser process is running (which may or may not have an IPC socket where we expect it), simply launch a new instance *if socat fails*.
Which it does, if:
* the socket file doesn't exist (qutebrowser simply not running), or
* the socket isn't connectable (qutebrowser crashed, left orphaned socket)
Also put new instances into background, so the script behaves a bit more consistently. (Else it *sometimes* blocks and *sometimes doesn't*, when run.)
Sometimes when qutebrowser crashes, it leaves the IPC socket file behind. In those cases this script still tried to use it, failed, and didn't open your URL at all.
This adds Chrome/Chromium support to the importer (which ought to be the
last of these). Bookmarks are read from JSON, while keywords/search
engines (the same thing here) are read from the Web Data sqlite3
database, and converted from OpenSearch format.
importer: add tests for opensearch
This adds supports for the places.sqlite format as used by Firefox,
Seamonkey, Pale Moon, and presumably others. Search engine support is
limited to keyword-style '%s' functionality.
vulture whitelist for row_factory
* Line breaks reinserted
* None in place of ''
* Check for browser before selecting default input format (to fix
KeyError)
* Remove redundant -S option and clarify help to make it slightly more
obvious what output formats make sense
* Added long-form arguments and slightly more sensible names (not really a
fix, but I personally like having them)
This restructures things to better support future implementations of
other input formats. The default formats are specified in a global dict
of browsers, which prevents duplicating the list of choices for browser
in bother get_args() and main(), and a new option enables overriding of
the default.
This allows importer.py to process Netscape HTML exports from Firefox
(and other Mozilla browsers) with three distinct types:
* bookmarks (sans shortcuturl attribute)
* keywords (bookmarks with a shortcuturl attribute)
* searches (keywords with a URL containing a %s substitution)
The first two can be combined at will in either quickmark or bookmark
output formats, the only difference being that keywords will be used in
place of titles when exporting to quickmark format. Searches are
exported to qutebrowser.conf format, or the new config.py format.
Dictionaries are used in the import function for readability's sake, but
the command line arguments follow the same general formula of true-false
flags used to select input bookmark types and the output format.