Commit Graph

335 Commits

Author SHA1 Message Date
Arun Prakash Jana
fc211b5d66
Add note on why insert is commented. 2016-04-25 23:03:07 +05:30
Arun Prakash Jana
c95d3a4339
Integrate iterations in encrypt/decrypt args. 2016-04-25 22:58:35 +05:30
Arun Prakash Jana
ff42af341f
Support update. 2016-04-25 21:53:03 +05:30
Arun Prakash Jana
fb2c886ec5
insert functional but deprecated by auto-compact. 2016-04-25 18:36:23 +05:30
Arun Prakash Jana
ef1ccfd59e
Push lesser option down. 2016-04-25 04:22:15 +05:30
Arun Prakash Jana
7a0d98e09f
Remove redundant variable. 2016-04-25 04:17:25 +05:30
Arun Prakash Jana
0fb89072d3
Support print function. 2016-04-25 03:35:46 +05:30
Arun Prakash Jana
58b8805b70
More options added to argparse. 2016-04-25 02:48:56 +05:30
Arun Prakash Jana
fbc8d25a89
Add check in compactDB for number of records. 2016-04-25 02:13:00 +05:30
Arun Prakash Jana
340f048d46
Support more options in argparse. 2016-04-25 02:03:59 +05:30
Arun Prakash Jana
3248120517
Introduce argparse. 2016-04-25 00:49:32 +05:30
Arun Prakash Jana
eae1a3bac9
Be more specific about keys. 2016-04-23 10:55:26 +05:30
Arun Prakash Jana
0d08254cf1
Newline for more clarity. Index in 3rd brackets. 2016-04-23 03:04:02 +05:30
Arun Prakash Jana
e99844876d
Define globals if crypto missing. 2016-04-23 00:11:41 +05:30
Arun Prakash Jana
96d4bd2303
Update help, add -r to man. 2016-04-22 22:31:17 +05:30
Arun Prakash Jana
1433a58b6a
Optimize full DB refresh. 2016-04-22 20:10:58 +05:30
Arun Prakash Jana
47e49fefb4 Update buku 2016-04-22 10:38:21 +05:30
Arun Prakash Jana
005ba51609 Update buku 2016-04-22 10:35:26 +05:30
Arun Prakash Jana
6ac4be61b6 Update buku 2016-04-22 10:23:38 +05:30
Arun Prakash Jana
2e220c7dda Update buku 2016-04-22 09:43:20 +05:30
Arun Prakash Jana
d9aea1f8e5 Update buku 2016-04-22 09:41:10 +05:30
Arun Prakash Jana
c492ccf6c4
-u N refreshes page title at index N. 2016-04-22 08:42:17 +05:30
Arun Prakash Jana
eec5f7a7c0
Indentaiton fix. 2016-04-21 23:38:48 +05:30
Arun Prakash Jana
93862447b0
Delete refresh condition check. 2016-04-21 23:27:41 +05:30
Arun Prakash Jana
8e927877b2
Remove -R from parsing logic. 2016-04-21 23:24:37 +05:30
Arun Prakash Jana
247052390d
Removed -R. -R is now -u 0. 2016-04-21 23:18:42 +05:30
Arun Prakash Jana
e3b10b4d32
Fetch title by default. 2016-04-21 19:54:30 +05:30
Arun Prakash Jana
a051cdc8be
Merge -D with -d. Now -D is -d 0. 2016-04-20 21:23:12 +05:30
Arun Prakash Jana
b3675594e1
Help update. 2016-04-20 21:11:07 +05:30
Arun Prakash Jana
18c42dc9f4
Distinguish -s and -S. 2016-04-20 20:47:47 +05:30
Arun Prakash Jana
08fb03eec1
Merge -P with -p. Now -P is -p 0. 2016-04-20 20:40:36 +05:30
Arun Prakash Jana
a61376e4b9
Search modification: -s ANY, -S ALL in URL, title or tags 2016-04-20 00:02:28 +05:30
Arun Prakash Jana
7b1a37f216
Optimizations. 2016-04-19 22:32:15 +05:30
Arun Prakash Jana
340e6a9e7d
Fix spacing. 2016-04-19 21:10:52 +05:30
Arun Prakash Jana
ca0cc919b4
Use single print for help and info. 2016-04-19 21:07:24 +05:30
Arun Prakash Jana
459ed27a22
Fix typo. 2016-04-18 20:42:33 +05:30
Arun Prakash Jana
aba796e99e
Add Json output info in help. 2016-04-17 21:37:26 +05:30
lmessier
9bac67cf0c clean 2016-04-17 16:45:29 +02:00
lmessier
d290dd7197 Merge remote-tracking branch 'upstream/master' into json-output
Conflicts:
	README.md
	buku
2016-04-17 16:31:40 +02:00
Arun Prakash Jana
d13a64102b
Declare encryption related globals if crypto is available. 2016-04-15 21:37:59 +05:30
Arun Prakash Jana
090951f270
debug information changes. 2016-04-14 19:34:02 +05:30
Arun Prakash Jana
401a482497
Spelling corrections. 2016-04-10 18:31:11 +05:30
Arun Prakash Jana
63604a9028
Remove all trailing spaces. 2016-04-10 18:11:00 +05:30
Arun Prakash Jana
74202db989
Document the newer functions. 2016-04-10 17:58:49 +05:30
Arun Prakash Jana
0cc172c4e0
Optimize add/insert: ensure URL is not in DB already. 2016-04-10 17:15:11 +05:30
Arun Prakash Jana
894b16a7ef
Implement function error() for HTMLParser
1. Handle EXCEPTION [getTitleData]: (NotImplementedError) subclasses of ParserBase must override error()
URL: http://www.mycplus.com/featured-articles/top-ten-c-language-resources/

2. Add a debug log to show if server supports gzip
2016-04-10 12:39:51 +05:30
Arun Prakash Jana
7bde1f7ec6
Suppress intentional Exception log from self.reset(). 2016-04-10 10:37:16 +05:30
Arun Prakash Jana
116eb44224
Handle error status in HTTP response correctly. 2016-04-10 10:17:09 +05:30
Arun Prakash Jana
119a342d4d
Show type of Exception. 2016-04-09 23:09:00 +05:30
Arun Prakash Jana
a8d72c515b
More meaningful parameter name. 2016-04-09 19:40:30 +05:30
Arun Prakash Jana
d7b0f2483b
Retry with truncated URL on error 500 in HTTP response. 2016-04-09 19:13:12 +05:30
Arun Prakash Jana
5a1b9d17c4
Catchier exceptions, minor optimizations. 2016-04-09 18:41:46 +05:30
Arun Prakash Jana
e5ca44e251
Request gzip compressed data in HTTP(S) fetch. 2016-04-09 17:25:18 +05:30
Arun Prakash Jana
4c25e0b1c0
Handle URLs passed with %xx escape.
E.g.: "https://linuxreference.wordpress.com/2010/12/28/25-even-more-%E2%80%93-sick-linux-commands/"
2016-04-09 14:52:31 +05:30
Arun Prakash Jana
b499daade4
Print exception messages. 2016-04-09 14:06:58 +05:30
Arun Prakash Jana
3cfca94031
Easily detect origin of Exception. 2016-04-09 13:25:59 +05:30
Arun Prakash Jana
fda91659a9
Update month, minor info print change. 2016-04-08 19:45:47 +05:30
Dmitry Marakasov
477be87f7c Bump version 2016-04-08 15:48:05 +03:00
Dmitry Marakasov
fbf5006978 Automatically move database from legacy location if it exists 2016-04-08 15:48:02 +03:00
Dmitry Marakasov
20b3b52629 Fix database path
- Don't use ~/.cache, it's intended to store non-essential data
  files and may be purged at any time
- Instead, follow XDG and use $XDG_DATA_HOME or ~/.local/share/buku
- Fallback to current directory if HOME is not defined (Windows?)
2016-04-08 15:47:30 +03:00
Arun Prakash Jana
e835ddf23f Update buku 2016-04-06 10:25:25 +05:30
Arun Prakash Jana
c4541227b4 Update buku 2016-04-06 10:09:56 +05:30
Arun Prakash Jana
fb6ec10648 More commits on functions.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-04-05 18:25:29 +05:30
Arun Prakash Jana
ccd7c8b035 Change the order of return values from getPageResp.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-04-05 18:10:05 +05:30
Arun Prakash Jana
de6f86c7f9 Function comments 2016-04-05 16:55:40 +05:30
Arun Prakash Jana
7ee0c12a5f Update buku 2016-04-04 15:20:23 +05:30
Arun Prakash Jana
e1722bd9dc Extra conversion removed.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-04-03 21:28:47 +05:30
Arun Prakash Jana
c7b5863b04 Function to print catchy errors and warnings.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-04-01 20:26:00 +05:30
Arun Prakash Jana
9a6e6296bd Show version in debug logs.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-31 00:58:37 +05:30
Arun Prakash Jana
49f788105a Handle piped input.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-26 21:29:07 +05:30
Arun Prakash Jana
ada4b35f73 Show correct redirected URL.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-26 11:14:26 +05:30
Arun Prakash Jana
5055833a69 Help related changes.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-26 00:08:23 +05:30
Arun Prakash Jana
c4da585c34 Help section with common options at top.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 23:53:26 +05:30
Arun Prakash Jana
5dd55724b2 More elaborate description.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 22:09:45 +05:30
Arun Prakash Jana
b366bc4e25 Change program description.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 22:06:29 +05:30
Arun Prakash Jana
c18fe5635f The purpose of insert is gone with auto-compaction.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 19:42:49 +05:30
Arun Prakash Jana
7e9fc59491 Remove obvious line from help.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 15:02:51 +05:30
Arun Prakash Jana
8fb1123831 Reformat help and man.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 14:59:19 +05:30
Arun Prakash Jana
e8835504ff Reformat, add notifications and errors.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 13:32:43 +05:30
Arun Prakash Jana
b5f066ba43 Show all bookmarks with empty titles or no tags.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 13:22:52 +05:30
Arun Prakash Jana
eae1237ea7 Catchier error messages.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 12:04:32 +05:30
Arun Prakash Jana
a56fa0381d Detect and break redirection loops.
Unquote text before connection check and GET request.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 11:47:20 +05:30
Arun Prakash Jana
ea02856bc1 Fix issues with fetching pages with %20.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 08:08:03 +05:30
Arun Prakash Jana
1c982ccd51 Show new record after add or update.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 02:18:36 +05:30
Arun Prakash Jana
3ea64f3a5f Better redirection handling.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 02:08:38 +05:30
Arun Prakash Jana
1ea332ba18 Handle multiple reirections. Show URL in BOLD.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 01:10:30 +05:30
Arun Prakash Jana
1a47576649 Reformat and optimize DB refresh.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 00:18:41 +05:30
Arun Prakash Jana
ca21ac579a Fix current full refresh feature.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-25 00:18:41 +05:30
Arun Prakash Jana
321c550f1a Better index boundary check for prompt.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-23 21:27:57 +05:30
Arun Prakash Jana
2708e70004 Reformat: distinct API to fetch page data.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-23 20:28:21 +05:30
lmessier
29233844d4 Update documentation 2016-03-23 13:23:35 +01:00
lmessier
3d69532e2a Return if nothing matches the search query on json and -f is set 2016-03-23 13:13:56 +01:00
lmessier
f76119ea17 Return early if IndexError exception is caught 2016-03-23 13:10:26 +01:00
lmessier
f3fa5a3a29 Maintain 3 line gap between functions 2016-03-23 13:10:08 +01:00
lmessier
84483fed3a Print search data as json if option is set 2016-03-23 00:33:13 +01:00
lmessier
d7bbab6d5d Print data as json if option is set in printdb 2016-03-23 00:32:37 +01:00
lmessier
c1ae9254c1 Import jsonOutput option value 2016-03-23 00:31:17 +01:00
lmessier
f26745714b Create a function to output json 2016-03-23 00:30:51 +01:00
Arun Prakash Jana
e832826118 Remove unnecessary code.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-23 02:08:35 +05:30
Arun Prakash Jana
1d99c4ccb3 Reformat: break out function to fetch URL.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-23 01:53:46 +05:30
lmessier
ee16a4cbc3 Handle a new -j command line flag 2016-03-21 13:38:07 +01:00
lmessier
76706944c4 Import json module 2016-03-21 13:37:28 +01:00
Arun Prakash Jana
9f06983a6e More correct help.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-21 01:23:57 +05:30
Arun Prakash Jana
76e60c79e8 Initial informative message on encryption.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 14:25:08 +05:30
Arun Prakash Jana
c3dedf601e Error out if both encrypted and flat DB files exist.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 13:41:52 +05:30
Arun Prakash Jana
365bb2002c Report failure without hints.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 13:13:41 +05:30
Arun Prakash Jana
f9fc90776b Update help on auto DB compaction.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 11:29:06 +05:30
Arun Prakash Jana
b4b0c1e042 Compact the DB when removing a bookmark.
The record at the last index is moved to the removed index.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 11:12:06 +05:30
Arun Prakash Jana
366b493ca0 Confirm DB cleansing.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 09:48:13 +05:30
Arun Prakash Jana
a75a56cd5a More clarity on -u option.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-20 07:11:40 +05:30
Arun Prakash Jana
ad38461eee Comment update.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 23:38:18 +05:30
Arun Prakash Jana
ffe31cc17b Minor change for more clarity.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 23:31:45 +05:30
Arun Prakash Jana
a4b27228ac Bump version.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 22:51:21 +05:30
Arun Prakash Jana
9e1e0b34d7 Return if old and new tags are same.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 22:49:58 +05:30
Arun Prakash Jana
017f7b82cd Do not insert new tag if already present.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 22:36:44 +05:30
Arun Prakash Jana
bcdafd6cc1 Modify or delete tags.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-19 21:25:13 +05:30
Arun Prakash Jana
ab17bd0127 Merge branch 'master' of https://github.com/jarun/buku 2016-03-16 23:36:39 +05:30
Arun Prakash Jana
515fbe56fd Show unique tags sorted alphabetically.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-16 23:33:15 +05:30
Arun Prakash Jana
c54a636554 Don't add single comma as tag.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-16 22:05:34 +05:30
Arun Prakash Jana
806f845beb Strip extra commas from tags.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-16 21:19:35 +05:30
Arun Prakash Jana
7179b8bd05 Graceful SIGINT handler.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-16 20:40:55 +05:30
Arun Prakash Jana
0d20660bbf Bump version.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-15 19:38:54 +05:30
Arun Prakash Jana
22e39956f5 A more flexible shebang.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-15 19:21:06 +05:30
Arun Prakash Jana
5a3b5daa01 Handle Ctrl-d, the *nix way to quit.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-10 18:03:54 +05:30
Arun Prakash Jana
f67ac812a3 Reformatted to remove extra checks.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-07 19:07:33 +05:30
Arun Prakash Jana
e900fce73b Fix comment spelling.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-07 18:44:36 +05:30
Arun Prakash Jana
1f1a9e44d0 Fix reirection URL before fetch.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-04 20:15:49 +05:30
Arun Prakash Jana
72b59e8f91 Help and documentation on option '-m'.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-03 23:48:04 +05:30
Arun Prakash Jana
604ae14e6e Update title manually. (Issue #6)
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-03-03 23:19:43 +05:30
Arun Prakash Jana
f1c7ff1f38 Remove extra info.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2016-02-28 19:39:21 +05:30
Arun Prakash Jana
6c760d5bff Bumped version and date.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-12-23 00:07:50 +05:30
Arun Prakash Jana
0e867441ef More clarity on -t option.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-12-23 00:03:22 +05:30
Arun Prakash Jana
faf1fc2410 Allow user to specify number of iterations to generate key.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-12-22 23:40:24 +05:30
Arun Prakash Jana
49342bfdcb Stronger encryption: 256-bit salt, multi-hash key.
Ref: https://www.reddit.com/r/linux/comments/3xk0lq/markit_is_now_buku_adds_aes256_encryption_support/cy5eobq

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-12-21 00:30:34 +05:30
Arun Prakash Jana
a674998855 Renamed all files.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-12-20 01:48:46 +05:30