Commit Graph

276 Commits

Author SHA1 Message Date
Arun Prakash Jana
bd53cba38d
Remove redundant string in markdown export. 2017-09-17 10:16:32 +05:30
Arun Prakash Jana
2a5cd4c8df
Merge --merge to --import. 2017-09-17 08:40:12 +05:30
Arun Prakash Jana
6aa8b59514
Update documentation. 2017-09-16 23:08:11 +05:30
Arun Prakash Jana
146584b8bb
Suggest bookmarks from prompt 2017-09-16 01:29:05 +05:30
Arun Prakash Jana
2085d9d2e2 Fix #208: Catch exception if Firefox is not installed 2017-09-12 18:50:26 +05:30
Arun Prakash Jana
618384e540
Fix #206: attribute must be initialized before API usage. 2017-09-12 04:31:31 +05:30
Arun Prakash Jana
07f5ab4aa9
Prepare for release v3.3.1. 2017-09-11 08:31:13 +05:30
Arun Prakash Jana
cb96692ebf
Prepare for release v3.3 2017-09-11 04:18:06 +05:30
Arun Prakash Jana
59ce276361
FF --ai: rework, folder as tag, check generic URL 2017-09-10 14:42:52 +05:30
Arun Prakash Jana
dbac74d440
Add generated tag in Firefox auto-import 2017-09-09 18:29:32 +05:30
Arun Prakash Jana
d3b263905b
Fix NumPy style 2017-09-09 18:17:01 +05:30
Arun Prakash Jana
0b69d53219
Fix #201: Google Chrome auto-import is broken
Changes:
- Traverse through JSON data and find individual records
- Support addition of unique tag in YYYYMonDD format
- Add parent folder name as tag
- Add the bookmarks to database
2017-09-09 15:03:24 +05:30
Alex
f54f7f24fd Sphinx (#200)
* Fix Parameters typo

* Almost working documentation generation

* Remove genarted html files, update conf and index

* Update docs/conf.py

* Add docs/source files

* Prevent creation of modules.rst; update index.rst

* Move conf.py and index.rst to docs/source

* Add opening paragraph to index.rst

* Fix flake8 issues
2017-09-09 09:10:05 +05:30
Arun Prakash Jana
94bcf90277
Enable browser output for text browsers 2017-09-09 00:43:26 +05:30
Arun Prakash Jana
6e2b459ca4
Remove dependency on webbrowser, call add_rec() for GC 2017-09-08 23:02:15 +05:30
Arun Prakash Jana
8c91a8ca7e
More informative exception message, typo fix 2017-09-08 21:47:18 +05:30
Arun Prakash Jana
e645784748
Add API to generate automatic timestamp tag
The format is: YYYYMonDD
where,
  YYYY - numeric year
  Mon  - month string
  DD   - numeric day of month

While importing bookmarks, this tag will be added and reported to user if
`--tacit` option is not specified.
2017-09-08 21:34:14 +05:30
Alex
a29be2e921 Format buku.py docstrings in NumPy style. (#199)
* Halfway through updating buku.py in numpydoc style

* Two thirds-through numpydoc style; before fixtags

* Begin work on Helper Functions

* Numpy docstrings up to Editor Mode Functions

* Finish rest of buku.py docstrings; add 'optional' to optional keyword args
2017-09-06 01:54:04 +05:30
Arun Prakash Jana
2e7e432fa2
Fix grammar in question 2017-09-03 19:24:13 +05:30
Arun Prakash Jana
83c7c59cd5
Simplify record printing 2017-08-28 22:46:00 +05:30
Arun Prakash Jana
aaf82ab67c
Fix build error 2017-08-25 04:03:57 +05:30
Arun Prakash Jana
e932525641
Fix broken --nc. 2017-08-25 03:26:51 +05:30
Arun Prakash Jana
3b0bd1c054
Remove hard-coded colors 2017-08-25 03:26:49 +05:30
Arun Prakash Jana
c9d15b4c98
Fix colors implementation 2017-08-25 03:26:42 +05:30
Arun Prakash Jana
3453369841
Sanitize colors (ongoing...) 2017-08-23 10:15:25 +05:30
Arun Prakash Jana
4cc733708a
Fix build 2017-08-23 03:48:27 +05:30
shv-q3
9dcbd67ac5 implement feature "Support custom colours" (#197)
* implement "Support custom colours" from (#174)

# imported collections module for named tuple
# add "colormap" from googler project
# add named tuple for id and title, url, desc, tag
# adjusted print_single_rec so colors can be changed for each item
# add valid color string checker from googler
# adjusted man options
# add autocompletions

* Hotfix - implement "Support custom colours" from (#174)
# sorted import in alphabetical order
# adjusted var name's
# add colors table to man file
# add color os ENV option
# add --color documentation in README under "Usage"

* fix typo error in man page color section

* Update buku-completion.bash

--color reordered in alphabetical order

* Update buku.fish

--color reordered in alphabetical order

* Update _buku

--color reordered in alphabetical order

* Hotfix2 - implement "Support custom colours" - restructure feature
# separated id from ID_str and ID_DB_STR so it can have separate color
# add 5 string color for (id, title, url, desc, tag)
# adjusted print_single_rec for 5 colors result
# fixed syntax .BI \--colors " COLORS" in man page
# replaced four with five letter string for color
# fixed default colors to "GKlxe" and "\x1b[2m" for DB index
# add example to README and man page
# removed check for colorstr_env set by user for the moment

* Fixed reviews

* Review fixes
2017-08-23 03:39:43 +05:30
Alex
bb1957bdba Fix incorrect docsting in prep_tag_search (#191) 2017-08-16 09:20:31 +05:30
Arun Prakash Jana
bb5523cb97
Re-factor parts of README into Wiki articles 2017-08-15 20:07:27 +05:30
Alex
2b7f142245 Feature/search multiple tags (#187)
* Implement feature "Search multiple tags, exclusion in tag search"

Add failing test for searching any multiple set of tags

Search any tags works; passing tests

Add failing test for searching all multiple tags

Search all tags works

Do not allow combination of search logics

Adds support for tag exclusion search

Update Search Options Group

Update README

Clean up

Fix man/readme language

Fix search_by_tag docstring

Split tags by ' - ' not '-': allows for hyphenation

Remove unnecessary else

Change search_logic lang to search_operator

Update exclusion language in readme and man

Print warning if ',' and '+' are both used in a search

* Add documentation and examples to manpage, improve documentation in README and buku.py

* Enforce space separation of '+' and document

* Fix under-indent in tests that causes build failure

* Add test to check that search_by_tag constructs correct sqlite query; also remove unittest.skips from search_by_tag tests

* Move tag search preparation work into prep_tag_search helper function; add test to test_buku.py

* Use pytest.mark.parametrize for test_prep_tag_search
2017-08-15 02:37:01 +05:30
Arun Prakash Jana
4cbc982d88
Update documentation, help 2017-08-13 17:23:05 +05:30
Arun Prakash Jana
ec3e50c445
Document auto-import option 2017-08-13 03:45:56 +05:30
rachmadani haryono
8afba2d826 Feature/pylint (#185)
* fix: dev: os function name

* new: test: pylint config

* new: test: pylint test

* chg: dev: linting guide

* new: dev: add alternative commented test run command

* chg: dev: max line length on PR template
2017-08-12 16:56:59 +05:30
Arun Prakash Jana
539f96eb65 Line length is more now! :) 2017-08-12 12:23:07 +05:30
Alex Bender
c8fe3e3f16 Import browser bookmarks (#183)
* WIP import bookmarks from browser database files

* WIP Import chrome bookmarks from browser

* Implement import from FF function

* Add default GC and FF folders for Linux, OS X and Windows

* Remove unused function

* Close file after usage

* Fix uncareful merge

* Fix merge conflicts, fix styling

* Add blank lines between functions

* Add new lines in docstrings

* Rename argument for auto import
2017-08-12 01:10:56 +05:30
Arun Prakash Jana
7454bdf5ea
Honor --tacit in auto-import 2017-08-11 21:28:31 +05:30
Arun Prakash Jana
944aa06ae1
Fix lint reports 2017-08-11 21:02:44 +05:30
Arun Prakash Jana
5d25deebf2
Fix FF auto-import issues
1. parse_tags() is a generic function
2. Filter out non generic URLs
2017-08-11 20:39:00 +05:30
Alex Bender
3154a6817c Import browser bookmarks (#180)
* WIP import bookmarks from browser database files

* WIP Import chrome bookmarks from browser

* Implement import from FF function

* Add default GC and FF folders for Linux, OS X and Windows

* Remove unused function

* Close file after usage

* Fix uncareful merge

* Fix merge conflicts, fix styling

* Add blank lines between functions

* Add new lines in docstrings
2017-08-10 08:26:44 +05:30
Arun Prakash Jana
22ef605f3b
Honor reduced verbosity 2017-08-04 09:44:07 +05:30
Arun Prakash Jana
f56d64d34f
Prepare for release v3.2 2017-08-03 09:49:20 +05:30
Arun Prakash Jana
90254d3af5
Add a newline after tag selection 2017-08-03 09:45:53 +05:30
Arun Prakash Jana
5b26d49044
Option --suggest - list similar bookmarks 2017-08-01 21:07:03 +05:30
Arun Prakash Jana
8a1177c176 Add function to suggest similar tags 2017-07-31 02:21:29 +05:30
Arun Prakash Jana
bb9810c093
Add prompt help 2017-07-25 09:28:32 +05:30
rachmadani haryono
50e89f58b7 refactor import db (#176)
* chg: dev: refactor bookmark html

* chg: dev: refactor bookmark markdown parser

* chg: dev: update refactor

* new: test: import_md

* fix: dev: newtag parameter on import_md

* new: test: import_html

* new: test:  add bs4 as test package

* chg: dev: rename fp to filepath

* new: test: import html and add parent as tag

* new: test: additional test for import_html

* new: test: simple bookmark html

* chg: dev: add round bracket !cosmetic

* chg: dev: maximalize line length !cosmetic
2017-07-22 09:01:29 +05:30
Arun Prakash Jana
a9f4cd502a
Honor --tacit: import folder names as tags if True 2017-07-20 10:14:37 +05:30
Arun Prakash Jana
55e0eb5767
Add parent folder as tag in same loop 2017-07-19 19:21:14 +05:30
Arun Prakash Jana
730b80f738
Fix #172: Get text of <DD> tag only, skip children 2017-07-18 23:11:46 +05:30
Arun Prakash Jana
45ab8034cd
Ignore spurious tags.
Please refer to #172. The spurious '<a></a>' tag leads to a crash; with or
without any text within.
2017-07-18 23:00:37 +05:30
rachmadani haryono
115c9651f8 Feature/test non generic url (#173)
* new: test: non generic url check method

* fix: test: test parameter

* chg: test: edit apt url

* fix: test: apt parameter

* chg: dev: allow `apt:` prefix

* new: test: `place:` url

* chg: doc: `apt:` prefix
2017-07-18 20:05:08 +05:30
Arun Prakash Jana
16cad432d7
Ignore some non-generic URLs.
URLs starting with `place:`, `file://` and `apt://` are ignored during import.
2017-07-18 10:50:27 +05:30
Arun Prakash Jana
d2037765d0
Fix #171: undocumented option '--db' 2017-07-16 15:08:01 +05:30
Arun Prakash Jana
e4cfb4b0f8
Prepare for release v3.1 2017-07-10 22:16:30 +05:30
Arun Prakash Jana
851711a78e
Add search args to history 2017-06-16 19:59:47 +05:30
Arun Prakash Jana
6abfea2e33
Support XDG_DATA_HOME, HOME to store DB file on all platforms 2017-05-29 01:09:33 +05:30
Arun Prakash Jana
7b31c2c423 Add issue template 2017-05-22 12:39:14 +05:30
Arun Prakash Jana
c23924fd07
Drop stdin.readlines(), treat as a file 2017-05-06 03:24:28 +05:30
Bryan Gilbert
818d015b3b add aditional format option to print url, title, and tag (#157) 2017-05-04 01:03:45 +05:30
Arun Prakash Jana
fe2d4653c1
Support browsing at prompt 2017-05-01 22:05:25 +05:30
Arun Prakash Jana
2c8022902b Handle index within browse_by_index() 2017-05-01 20:55:21 +05:30
Arun Prakash Jana
126e2cb45d
Fix typo 2017-04-28 08:22:08 +05:30
Cthulhux
44760fe035 Changed the Buku path on Windows to what other people think is right (#153) 2017-04-27 01:25:51 +05:30
Arun Prakash Jana
abac8d016b
Handle -ve indices in print_rec 2017-04-26 19:56:49 +05:30
Arun Prakash Jana
a1e6df2edb
Index should be >= 0 to browse 2017-04-26 18:42:15 +05:30
Arun Prakash Jana
dd06f2acf6
Prepare for v3.0 2017-04-26 10:27:00 +05:30
rachmadani haryono
63a5883d58
fix: test: change test (#149)
* fix: test: change priority on if-else branch

* fix: test: remove broken merged test code

* new: test: add win32 platform test for browser func

* chg: test: add noqa on print_single_rec

* new: test: test edit_update_rec with invalid input
2017-04-19 09:33:14 +05:30
Arun Prakash Jana
b69007e9a6
Show title in headline, url below
If no title, use the string "Untitled".
2017-04-19 09:33:07 +05:30
Arun Prakash Jana
07d472a0f0
not str == not len(str) 2017-04-08 23:15:15 +05:30
Arun Prakash Jana
da7ff951d0
Change in colors 2017-04-08 22:26:00 +05:30
Arun Prakash Jana
d4f59e939b
Improve looping 2017-04-08 19:14:02 +05:30
Arun Prakash Jana
d8f081cd4d
Use DELIM 2017-04-07 20:43:24 +05:30
Arun Prakash Jana
b9fbed2cab
Support print records at prompt 2017-04-07 02:03:10 +05:30
Arun Prakash Jana
706f234989
Support append/overwrite/delete tags from prompt 2017-04-07 01:27:36 +05:30
Arun Prakash Jana
bfdfb0604b
Show title in bold in color mode. 2017-04-06 08:51:05 +05:30
Arun Prakash Jana
42a8375ac7
Fix lint. 2017-04-06 08:44:44 +05:30
Arun Prakash Jana
f1a5cd4b88
Import folder names in lowercase. Document. 2017-04-06 08:28:12 +05:30
Muhammad
c48be129ee Added option to use folders names as tags when importing (#146) 2017-04-06 06:18:55 +05:30
Cthulhux
0923fa0d7f Threading for webbrowser on Win32 (partially fixes #142 for good). (#145)
Tested on Vivaldi (Chrome-based), qutebrowser (PyWebKit-based), Pale Moon (Firefox fork) and Firefox Developer Edition. It works as intended *if* the current default browser (or whatever Buku thinks the default browser is) is actively running. Depending on the browser, it still only opens everything in one tab if it is *not* running yet. But who closes his browser anyway? :-)
2017-04-04 01:14:02 +05:30
Cthulhux
3297499fe4 Better Windows support: Finding the user profile directory even on Win32 (#144)
* Better Windows support: Finding the user profile directory even on Win32

* Better Windows support: Finding the user profile directory even on Win32
2017-04-03 01:58:26 +05:30
Arun Prakash Jana
a1c1092987
Fix #142: Firefox opening multiple windows
Try to open new tab and not window.
Fix test case fail.
2017-04-02 22:49:52 +05:30
Arun Prakash Jana
84694f95ce
Add a note and message on waiting on input from stdin 2017-03-31 22:45:24 +05:30
Arun Prakash Jana
4153298a42 Homogeneous handling of ranges 2017-03-19 18:29:23 +05:30
Arun Prakash Jana
75109cec3e
Fix range handing in delete_rec() and print_rec()
1. Handle ranges within API rather than in caller
2. Rename print_record() to print_single_rec()
2017-03-19 12:39:44 +05:30
Arun Prakash Jana
ec8259d5a5
Support tail-like behaviour with --print 2017-03-19 00:45:26 +05:30
Arun Prakash Jana
fc5ee94b86 Update, reorder, align help and examples. 2017-03-17 20:48:11 +05:30
Arun Prakash Jana
7fae7b47b7 Add short option to regex and tag search 2017-03-17 08:10:55 +05:30
Arun Prakash Jana
eeb7e99c16
Disable -r for --replace 2017-03-17 00:07:51 +05:30
Arun Prakash Jana
46e2e4a704
Disable -t for --title 2017-03-16 23:45:37 +05:30
Arun Prakash Jana
ce66158164
Editor support at subprompt 2017-03-12 20:11:53 +05:30
Arun Prakash Jana
842bce701c
Modularize edit and update 2017-03-12 14:55:01 +05:30
Arun Prakash Jana
2650bd74e9
Add API get_max_id(), -p -1 shows max index 2017-03-06 02:26:40 +05:30
Arun Prakash Jana
a532a78a1f Reformat multi-line strings 2017-03-06 01:32:24 +05:30
Arun Prakash Jana
ba5a81084a
Substitute append(), extend() with concatenation 2017-03-05 23:49:58 +05:30
Arun Prakash Jana
84df17ee38 Various optimizations
1. Prefer string concatenation to substitution
2. Fix issue: tagset append or delete shows extra print in update_rec()
3. Introduce delim_wrap()
2017-03-05 23:11:49 +05:30
Arun Prakash Jana
b07d0ab8f5 Use colourful log levels in colour mode 2017-03-05 04:05:07 +05:30
Arun Prakash Jana
e02333f715
Remove redundant declarations 2017-03-04 22:48:56 +05:30
Arun Prakash Jana
6348c2d4fa
Request HTTP HEAD for immutable records 2017-03-04 21:03:59 +05:30
Arun Prakash Jana
077ea12cd1
Support --immutable with -w for update 2017-03-04 08:42:24 +05:30
Arun Prakash Jana
3eca175604
Use correct endpoint to fetch the tag name of the latest release. 2017-03-02 10:06:57 +05:30