Commit Graph

48 Commits

Author SHA1 Message Date
Arun Prakash Jana
d71e15589b
Project renamed to buku from Buku for consistency 2020-01-08 08:37:17 +05:30
Aquan1412
6b1f030077 Org tag support (#432)
* Add tag support for Org import/export

* Remove ipdb from imports

* Fix whitespaces

* Added import test

* Added support for org import/export for tags containing colons

* Made sure to only import unique tags

* Removed unnecessary if-clause

* Replaced len() loop with enumerate

* Use OrderedDict() instead of dict() for compatibility with Python3.5
2020-01-04 08:25:34 +08:00
rachmadaniHaryono
c2dcc31c74 new: dev: remove kadrof 2019-06-17 21:32:59 +08:00
rachmadaniHaryono
80479fd54f
chg: dev: only inform about popen for now 2019-04-30 20:20:46 +05:30
rachmadaniHaryono
158fef49e1 fix: dev: org export 2019-04-30 13:36:51 +08:00
rachmadaniHaryono
f98f5fdac0 fix: dev: export 2019-04-30 13:23:56 +08:00
rachmadaniHaryono
40c1a90147 fix: test: empty third row 2019-04-30 12:49:41 +08:00
rachmadaniHaryono
da93dbe43f fix: test: org export 2019-04-28 14:18:16 +08:00
rachmadaniHaryono
5aae57712d fix: test: lint 2019-04-28 14:13:55 +08:00
rachmadaniHaryono
b986485dd5 new: test: convert_bookmark_set 2019-04-28 14:00:46 +08:00
Arun Prakash Jana
607b8e1050
Disable test case 2019-04-03 21:44:07 +05:30
Sébastien Lavoie
094f44b369 Improve readability and fix minor typos. 2018-12-30 20:49:38 -06:00
Arun Prakash Jana
3d528d303d
Fix build break 2018-12-29 05:29:40 +05:30
rachmadaniHaryono
1354ea42b3 chg: test: exp res 2018-12-26 21:39:30 +08:00
rachmadaniHaryono
cc65ee5b82 fix: test: page title 2018-12-26 21:25:38 +08:00
Arun Prakash Jana
41d2089484
Fix build break 2018-10-30 06:20:05 +05:30
Arun Prakash Jana
bf48169204
Fix test result 2018-08-07 03:22:50 +05:30
rachmadaniHaryono
f823a6aecc chg: test: simplify test_get_PoolManager 2018-08-06 15:51:36 +08:00
rachmadaniHaryono
41b8785a4e fix: test: test_network_handler_with_url 2018-08-06 15:42:46 +08:00
rachmadaniHaryono
8e6c53f404 chg: test: more test on to_temp_file_content func 2018-08-06 14:19:21 +08:00
rachmadaniHaryono
f80e5b241a fix: test: test_to_temp_file_content 2018-08-06 13:58:44 +08:00
rachmadaniHaryono
098d0d5e71 chg: test: remove test_get_page_title 2018-08-06 13:18:13 +08:00
rachmadaniHaryono
b567dd2a64 chg: test: get_page_title func 2018-08-01 20:08:30 +08:00
rachmadaniHaryono
1a0b5bd328 new: test: 2 url for testing 2018-08-01 19:57:34 +08:00
rachmadaniHaryono
496238262f fix: test: fetch title 2018-08-01 19:57:34 +08:00
rachmadaniHaryono
8180711a33 chg: test: add url for test title fetch 2018-08-01 19:57:34 +08:00
Arun Prakash Jana
50ca5b85d9
Fix build break 2018-05-27 07:35:59 +05:30
rachmadani haryono
9cdb73d1f6 fix: dev: test_browse (#245) 2018-02-21 12:39:30 +05:30
Arun Prakash Jana
fb4649917c
Fix build break due to new attribute 2018-02-18 23:14:00 +05:30
rachmadani haryono
19e8fff33d Feature/test copy url to clipboard support (#243)
* chg: dev: move new feature to its own function

* chg: test: test copy_to_clipboard func

* chg: test: remove pytest-catchlog

* chg: test: minimum pytest version

* chg: test: add exception on python 3.5&3.6 tests
2018-02-11 21:27:33 +05:30
rachmadani haryono
4facc4ba29 Feature/fix request on test (#238)
* chg: dev: fix request on test

* chg: test: ignore printed text

* chg: test: method to test print

* new: test: ignore instance attribute pylint error
2017-12-13 08:46:17 +05:30
Arun Prakash Jana
b663554dd0
Release version check test 2017-12-02 22:16:10 +05:30
rachmadani haryono
567763238a Feature/exception on malformed url (#221)
* fix: dev: malformed url

* new: test; about and chrome protocol

* fix: dev: fix lint

* fix: dev: import error on urllib3

* fix: dev: urllib3 exceptions

* fix: test: test on protocols

* fix: dev: return value of is_bad_url

* chg: dev: update buku

- change logerr msg
- sort ignored_prefix
- check is_nongeneric_url and is_bad_url
2017-10-14 16:43:53 +05:30
Alex
cb95122be5 Search honors field filters: implements print_rec_with_filter (#216)
* Initial test of print_rec_with_filter

* Replace dummy code to actually pass test

* Call print_rec_with_filter if search options are used with --format

* Call print_rec_with_filter in print_rec; add field_filters, update test

* Add new format_filters to argparse arguments to --format

* Update help for --format

* Update man page and remove trailing whitespace

* Fix test cases

* Update README

* Call print_single_rec from print_rec_with_filter if filt is 0

* Add create=True to buku.print mock

* Update Help text

* Update README

* Update man page
2017-09-23 22:31:37 +05:30
Arun Prakash Jana
f7d000fb55
Fix build failure 2017-09-09 01:21:35 +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
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
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
rachmadani haryono
d91ce68aba new: test: python3.6 on travis (#170)
* new: test: python3.6 on travis

* chg: dev: change deploy python version

* chg: dev: change skip message
2017-07-12 22:23:38 +05:30
Ralic Lo
7ee95f7f1e Convert to Python3 (#160)
* Convert to python3

* Remove .bak

* Remove (( and )) in print
2017-05-19 07:10:43 +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
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
rachmadani haryono
f25f67bfc1 Feature/test add rec (#140)
* new: test: test empty url.

* new: test: test is_bad_url

* new: test: network_handler

* new: test: test exec arg on add_rec

* fix: test: restore global variable.

* chg: test: change test

- add more falsey url for test_add_rec_add_invalid_url
- add more arg for test_add_rec_exec_arg

* chg: test: use old test when testing is_bad_url
2017-03-30 22:22:47 +05:30
rachmadani haryono
7be3acc53e Feature/test print (#137)
* new: test: test for delete_rec (#132)

* chg: dev: add db instance for delay_commit check
* chg: dev: remove unused delete_rec test
* chg: test: not check delay commit on empty db test.
* chg: test: use simpler precise test for delete_rec
* fix: test: change pytest parametrize arg
* fix: test: fix instance of BukuDb
* fix: test: fix test.
* fix: test: logic on expected db len
* new: test: test for delete_rec
* new: test: test for delete_rec on empty database

* Needs timely commitment.

Removing the base implementation for rest APIs. At this point I believe it will
Be better handled by someone who needs it. The current contributions in this
area are very very infrequent. Defects and PRs remain pen over fortnights. It's
difficult to expect the same team to maintain the piece of code even if we ever
receive the full implementation from them.

* Roll ToDo list

* Feature/delete rec additional test data set (#133)

* new: test: additional data test set.

* new: test: test on non integer.

* chg: test: rename function for consistency.

* chg: test: change normalize function.

* chg: test: change max value for high var

* fix: test: use normalized index

* fix: test: remove 'max' as valid value

* chg: test: use hypothesis to test delete_rec index

* new: test: add hypothesis package

* chg: test: use hypothesis to test delete_rec index

* chg: test:  add hypothesis to travis

* chg: test: limit integer test.

* chg: dev: remove unused test

* fix: test: fix test on non integer.

* new: test: add big integer test on range in delete_rec method.

* fix: test: fix high low diff

* fix: test: skip only for python<3.5

* chg: test: change test_delete_rec_range_and_big_int

- remove skip
- use constant value instead sys.maxsize
- fix assert

* chg: test: use setup.py to manage test package instead travis

* chg: test: add tests extras on setup.py

* chg: test: change install test package.

* fix: test: fix whitespace

* fix: test: MAX_SQLITE_INT value

* chg: test: skip test for python<3.5

* fix: test: fix import

* chg: test: skip Impossible test

* chg: test: simplify test_delete_rec_on_non_interger

* Feature/tox test (#138)

* chg: test: mark slow test

* new: test: config for tox

* chg: test: mark function as non tox

* new: test: test print_rec with hypothesis

* chg: test: simplify test for print_single_rec

* fix: test: fix index test on test_print_rec_hypothesis

* fix: test: fix tox setting.

* fix: test: change test_print_single_rec to python3.5 only
2017-03-28 22:00:12 +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
rachmadani haryono
3545a4765e Feature/retire test helpers (#131)
* chg: test: merge test_helpers

* chg: test: remove merged test helper.
2017-03-18 19:39:09 +05:30
rachmadani haryono
8fc2775b48 Feature/test (#130)
* new: test: test for BukuHTMLParser class

* new: test: test for BukuCrypt class

* chg: test: change getpass patch path

* new: test: test for ExtendedArgumentParser class

* new: test: test for functions.

* chg: test: fix warning for caplog

* chg: test:  exclude some test for python3.5 only
2017-03-18 19:11:59 +05:30