Closed jarun closed 3 years ago
Fix tests, which are taking long time to finish
this is finished
anyone ever have experience database with empty record but but not 0 filesize?
i tried open it with db browser for sqlite but it also show no records
~$ cp ~/.local/share/buku/bookmarks.db ~/bookmarks.db -rvf
'/home/vaio/.local/share/buku/bookmarks.db' -> '/home/vaio/bookmarks.db'
1 files (204.0 KiB) copied in 0.0 seconds ( 12.7 MiB/s).
~$ buku -d
Remove ALL bookmarks? (y/n): y
All bookmarks deleted
~$ ll .local/share/buku/bookmarks.db
-rw-rw-r-- 1 vaio vaio 207872 Jan 1 21:22 .local/share/buku/bookmarks.db
~$ ll ~/bookmarks.db
-rw-rw-r-- 1 vaio vaio 207872 Jan 1 21:22 /home/vaio/bookmarks.db
~$ buku -p
[ERROR] 0 records
~$
The sqlite operation used is DROP TABLE
.
is that empty database at first or there is already records in that?
$ ll ~/.local/share/buku/bookmarks.db
-rw-r--r-- 1 q q 10907648 Jan 2 00:03 /home/q/.local/share/buku/bookmarks.db
that is the file (10.4mb), yet no record either from buku or from sqlite db browser
There were records at first. I have around 477 bookmarks in my personal file.
I think it would be a better option to just remove the file instead of dropping the table. That would be fast and reclaim the space. Added to the ToDo list.
Or maybe use the same code from delete_rec_all()
.
A "-r" reverse sort option for import (and export) could be useful to maintain chronology.
reverse sort based on which criteria?
Date added.
Buku
doesn't store that information.
Entry/record order could work as well (atleast it is enough for my use case). Pinboard export maintains chronology of entries in descending order of most recent, and when imported to buku it is reversed.
Please read the introduction: no hidden history, obsolete records, usage analytics or homing
So would bookmark entry order falls under obsolete records? I don't follow. Buku already records and surfaces that. Sorry, I may have miscommunicated what I intended.
So would bookmark entry order falls under obsolete records?
No, the date added. It's possible to figure out patterns from that.
Generally speaking, we leave out any king of usage history.
You mentioned "chronology". If you are asking for just printing in reverse order, I think you can add a filter to do that while listing. If you really need it, please raise the PR.
Thoughts on adding type hints?
while it could be done, it is better to put the effort into making new feature
Please feel free to add to the ToDo list.
What's the best way to chat? Seems like the gitter.im instance is inactive, and I'm not sure what way works best for you.
I pinged you now. I didn't get the noti from gitter.
A Chocolatey package would be awesome. I might have some time to try to build one some time in 2019...
(Packed calendar currently.)
@dertuxmalwieder whenever you have the time!
@rachmadaniHaryono can you please add the test cases for exportdb()
?
@jarun python 3.4 eol is last month
also there is warning from circleci
DEPRECATION: Python 3.4 support has been deprecated.
pip 19.1 will be the last one supporting it.
Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
until when do we support it?
I'll remove it. :)
@jabagawee i started added annotation on the pr and some function/method on buku
it is not perfect yet but it is a start
Would it be possible to add a bookmark cleanup function of sorts (e.g. find dead links)?
Also, why doesn't the interactive prompt accept the same arguments as running Buku directly?
Would it be possible to add a bookmark cleanup function of sorts (e.g. find dead l
Try buku -u --silent
Also, why doesn't the interactive prompt accept the same arguments as running Buku directly?
If you want it that way, please raise a PR.
not mentioned anywhere but we actually don't know the actual return type for record
based on the #375 it should be
BookmarkVar = Tuple[int, str, Union[str, None], str, str, int]
@rachmadaniHaryono I think we had some very early discussion on having page thumbnails in the web interface. Well, people are looking for it and this may be the right time to have it in. I think it would be good to store the thumbnail by the actual DB index.
@rachmadaniHaryono please take a look at this thread: https://www.reddit.com/r/commandline/comments/bj31ie/browserindependent_bookmark_manager_buku_v42_is/em6iym4
This is relevant to the comment above and there are some links to google which users may not be comfortable with.
I think it would be good to store the thumbnail by the actual DB index.
not sure if this a good idea, iirc our index is not fixed to url and each time url-index pair changed, the image pair id should be changed as well
2 solution i can think
http://youtube.com.jpg
note that :
, '.' and /
is unicode alternative for actual character. see tmsu for the same methodThis is relevant to the comment above and there are some links to google which users may not be comfortable with.
this can be added as another flag
2 solution i can think
Yes, I thought of that removal problem but then thought we could rename the image too. Unfortunately, that mandates the deletion from the server interface all the time.
So I'm fine with any of the 2 methods above, maybe we should avoid another DB if we can and take the first route.
this can be added as another flag
Sure!
testing test on 4.2 https://github.com/rachmadaniHaryono/Buku/commit/cd302c45ac995b45c46b3f9f13b6e9626521121f
python setup.py --version
, https://github.com/rachmadaniHaryono/Buku/tree/feature/change-circleci : test is still passedrecommendation:
maintainer report error if anything failed before release
In that case i will send out a note before making a release, may be a day or 2 prior so everyone can confirm.
is there other packaging other than opensuse that test the package before upload?
@dilawar, @eclipseo, @maxice8, @pabloariasal, @szlin, @jpdasma can you please respond to @rachmadaniHaryono's question?
@jarun i register the application here because i want to see the statistic of the project
@rachmadaniHaryono sure thing!
@jarun i think i feel overwhelmed with thumbnail feature. biggest challenge is actually trying to change the html and the backend from bukuserver
maybe i will work on it but not in the near future. sorry
@rachmadaniHaryono hey, no problem!
The code is open source, we have it as a open line item so anyone interested can always pick it up. I think we are doing a fantastic job with Buku
already and anyone looking for time-consuming features have to pitch in themselves.
i try import a lot of bookmarks html using this command
find . -type f -name '*.html' -print0 | xargs -n1 -r0 buku --np --tacit -i
but these html is mostly incremental backup which contain a lot of duplicate url
so i use this script to import those into buku
from pathlib import Path
from bs4 import BeautifulSoup
from buku import BukuDb, import_html
target_folder = 'html_folder'
target_folder = Path(target_folder)
html_paths = target_folder.glob('*.html')
bdb = BukuDb()
urls = []
add_parent_folder_as_tag = False
newtag = ''
for html_path in html_paths:
filepath = html_path
with open(filepath, mode='r', encoding='utf-8') as infp:
soup = BeautifulSoup(infp, 'html.parser')
items = import_html(soup, add_parent_folder_as_tag, newtag)
for item in items:
if item[0] not in urls:
add_rec_res = bdb.add_rec(*item)
urls.append(item[0])
else:
print('cached [{}]'.format(item[0]))
hi @jarun, on this september i will get operation on my spine.
i have no idea how long this will affect me, but if i don't respond to anything from october or november, i recommend to get new member to replace me
@rachmadaniHaryono no problem at all! I will handle in the meantime. Wish you a speedy recovery!
May be tough, but import from Reddit saved might be an interesting addition.
Reddit is not even a bookmarking site.
@jarun Reddit Saved is a section where users can save Reddit posts. Reddit is classified as a social bookmarking site, and you can save URLs and image links in your accounts saved section. I use it as a bookmark system for Reddit and I'd love to be able to import them into my buku db.
See if you can raise a PR.
Would it be possible to add tag support for import/export to the Emacs Org-Mode format? I currently use an Org file to "sync" my bookmarks to my phone (via Orgzly), and having tagged entries would make this solution much more viable.
Feel free to raise a PR. I have no idea of org.
Ok, I just raised the PR, #432 The changes are minimal, so I don't expect any problems
Continued from #268.
Notes
The list below is a growing one. While suggesting new features please consider contributing to
Buku
. The code is intentionally kept simple and easy to understand with comments. We'll be happy to assist any new contributor. We need your help!Some of the fresh-baked features may not have been released yet. Grab the master branch for those.
Identified tasks
--preserve
to ignore specific fields during auto-update [see issue #327]exportdb()
API (@rachmadaniHaryono)importdb()
] (thanks @ckolumbus)-n
with-p
(thanks @jpdasma)--export
HTML <meta> Tag
a
andb
but notc
andd
) (thanks @SaltyCatFish)googler
/ddgr
- omniprompt keyO
profiles.ini
(see #212, thanks @alex-bender)--format
in search results (ref, thanks @mosegontar)importdb()
]