Commit Graph

26 Commits

Author SHA1 Message Date
Ryan Farley
799fe5deb3 default to new search format 2017-10-17 14:48:56 -05:00
Ryan Farley
898dde566d fix whitespace issues 2017-10-17 14:48:56 -05:00
Ryan Farley
c163f702c2 fix config.val in format 2017-10-17 14:48:56 -05:00
Ryan Farley
31bbc8c5b3 importer support for keywords and search engines
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.
2017-10-17 14:48:55 -05:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Clayton Craft
8addc19d47 Added option to output in "bookmark" format, clarified some "help" msgs 2016-03-25 13:01:21 -07:00
Clayton Craft
81ce9b818f Fix importer script to output bookmarks in the right format for qutebrowser to use 2016-03-24 18:58:08 -07:00
Philipp Hansch
a50363ca67 Fix flake8 issues 2016-03-20 13:02:04 +01:00
Philipp Hansch
573660f36d Fix lint issue 2016-03-20 12:08:48 +01:00
Philipp Hansch
8000af1664 Generalize bookmarks import
This change adds `firefox` and `ie` as possible arguments to the importer
script.
2016-03-20 10:49:33 +01:00
Florian Bruhin
7a268a41f6 pylint: Don't require docstring for main() funcs. 2016-02-01 20:06:49 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Florian Bruhin
d232437105 Update to beautifulsoup 4.4.0.
Upstream changelog:

Especially important changes:

* Added a warning when you instantiate a BeautifulSoup object without
  explicitly naming a parser. [bug=1398866]

* __repr__ now returns an ASCII bytestring in Python 2, and a Unicode
  string in Python 3, instead of a UTF8-encoded bytestring in both
  versions. In Python 3, __str__ now returns a Unicode string instead
  of a bytestring. [bug=1420131]

* The `text` argument to the find_* methods is now called `string`,
  which is more accurate. `text` still works, but `string` is the
  argument described in the documentation. `text` may eventually
  change its meaning, but not for a very long time. [bug=1366856]

* Changed the way soup objects work under copy.copy(). Copying a
  NavigableString or a Tag will give you a new NavigableString that's
  equal to the old one but not connected to the parse tree. Patch by
  Martijn Peters. [bug=1307490]

* Started using a standard MIT license. [bug=1294662]

* Added a Chinese translation of the documentation by Delong .w.

New features:

* Introduced the select_one() method, which uses a CSS selector but
  only returns the first match, instead of a list of
  matches. [bug=1349367]

* You can now create a Tag object without specifying a
  TreeBuilder. Patch by Martijn Pieters. [bug=1307471]

* You can now create a NavigableString or a subclass just by invoking
  the constructor. [bug=1294315]

* Added an `exclude_encodings` argument to UnicodeDammit and to the
  Beautiful Soup constructor, which lets you prohibit the detection of
  an encoding that you know is wrong. [bug=1469408]

* The select() method now supports selector grouping. Patch by
  Francisco Canas [bug=1191917]

Bug fixes:

* Fixed yet another problem that caused the html5lib tree builder to
  create a disconnected parse tree. [bug=1237763]

* Force object_was_parsed() to keep the tree intact even when an element
  from later in the document is moved into place. [bug=1430633]

* Fixed yet another bug that caused a disconnected tree when html5lib
  copied an element from one part of the tree to another. [bug=1270611]

* Fixed a bug where Element.extract() could create an infinite loop in
  the remaining tree.

* The select() method can now find tags whose names contain
  dashes. Patch by Francisco Canas. [bug=1276211]

* The select() method can now find tags with attributes whose names
  contain dashes. Patch by Marek Kapolka. [bug=1304007]

* Improved the lxml tree builder's handling of processing
  instructions. [bug=1294645]

* Restored the helpful syntax error that happens when you try to
  import the Python 2 edition of Beautiful Soup under Python
  3. [bug=1213387]

* In Python 3.4 and above, set the new convert_charrefs argument to
  the html.parser constructor to avoid a warning and future
  failures. Patch by Stefano Revera. [bug=1375721]

* The warning when you pass in a filename or URL as markup will now be
  displayed correctly even if the filename or URL is a Unicode
  string. [bug=1268888]

* If the initial <html> tag contains a CDATA list attribute such as
  'class', the html5lib tree builder will now turn its value into a
  list, as it would with any other tag. [bug=1296481]

* Fixed an import error in Python 3.5 caused by the removal of the
  HTMLParseError class. [bug=1420063]

* Improved docstring for encode_contents() and
  decode_contents(). [bug=1441543]

* Fixed a crash in Unicode, Dammit's encoding detector when the name
  of the encoding itself contained invalid bytes. [bug=1360913]

* Improved the exception raised when you call .unwrap() or
  .replace_with() on an element that's not attached to a tree.

* Raise a NotImplementedError whenever an unsupported CSS pseudoclass
  is used in select(). Previously some cases did not result in a
  NotImplementedError.

* It's now possible to pickle a BeautifulSoup object no matter which
  tree builder was used to create it. However, the only tree builder
  that survives the pickling process is the HTMLParserTreeBuilder
  ('html.parser'). If you unpickle a BeautifulSoup object created with
  some other tree builder, soup.builder will be None. [bug=1231545]
2015-07-06 10:49:59 +02:00
Florian Bruhin
450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin
0a7ff8db09 importer: Use with-block to open file. 2014-10-15 21:06:52 +02:00
Florian Bruhin
17816bdab2 importer: Add vim modeline 2014-10-15 20:43:47 +02:00
Florian Bruhin
7adf756326 importer: Add help message about Chromium 2014-10-15 06:24:45 +02:00
Florian Bruhin
2874cdea22 importer: Add module docstring 2014-10-15 06:20:54 +02:00
Florian Bruhin
ea332d65ea importer: Fix printing of usage 2014-10-15 06:19:15 +02:00
Florian Bruhin
6489186342 importer: Add docstrings. 2014-10-15 06:18:43 +02:00
Florian Bruhin
7731547d80 importer: Clean up string formatting 2014-10-15 06:17:52 +02:00
Florian Bruhin
2d7ea2e1fa importer: Import cleanup 2014-10-15 06:17:00 +02:00
Florian Bruhin
78d5532227 importer: Use built-in open 2014-10-15 06:16:42 +02:00
Florian Bruhin
abab935ca8 importer: Whitespace cleanup 2014-10-15 06:16:12 +02:00
Florian Bruhin
f9b4dbc9cb importer: Use choices=... for argparse 2014-10-15 06:15:50 +02:00
Claude
75d6b82453 added an importer.py
for importing bookmarks n stuff

currently supports chromium bookmarks

usage:
in chromium: export your bookmarks to html file (bookmark manager)
./importer.py chromium bookmarks_10_11_14.html >> ~/.config/qutebrowser/quickmarks
2014-10-11 23:32:50 +02:00