jarun / buku

:bookmark: Personal mini-web in text
GNU General Public License v3.0
6.49k stars 294 forks source link

ToDo list #343

Closed jarun closed 3 years ago

jarun commented 5 years ago

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

rachmadaniHaryono commented 5 years ago

Fix tests, which are taking long time to finish

this is finished

rachmadaniHaryono commented 5 years ago

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

jarun commented 5 years ago
~$ 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.

rachmadaniHaryono commented 5 years ago

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

jarun commented 5 years ago

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().

rookiejet commented 5 years ago

A "-r" reverse sort option for import (and export) could be useful to maintain chronology.

jarun commented 5 years ago

reverse sort based on which criteria?

rookiejet commented 5 years ago

Date added.

jarun commented 5 years ago

Buku doesn't store that information.

rookiejet commented 5 years ago

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.

jarun commented 5 years ago

Please read the introduction: no hidden history, obsolete records, usage analytics or homing

rookiejet commented 5 years ago

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.

jarun commented 5 years ago

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.

jarun commented 5 years ago

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.

jabagawee commented 5 years ago

Thoughts on adding type hints?

rachmadaniHaryono commented 5 years ago

while it could be done, it is better to put the effort into making new feature

jarun commented 5 years ago

Please feel free to add to the ToDo list.

jabagawee commented 5 years ago

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.

jarun commented 5 years ago

I pinged you now. I didn't get the noti from gitter.

dertuxmalwieder commented 5 years ago

A Chocolatey package would be awesome. I might have some time to try to build one some time in 2019...

(Packed calendar currently.)

jarun commented 5 years ago

@dertuxmalwieder whenever you have the time!

jarun commented 5 years ago

@rachmadaniHaryono can you please add the test cases for exportdb()?

rachmadaniHaryono commented 5 years ago

@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?

jarun commented 5 years ago

I'll remove it. :)

rachmadaniHaryono commented 5 years ago

@jabagawee i started added annotation on the pr and some function/method on buku

it is not perfect yet but it is a start

EncryptedCurse commented 5 years ago

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?

jarun commented 5 years ago

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.

rachmadaniHaryono commented 5 years ago

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]
jarun commented 5 years ago

@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.

jarun commented 5 years ago

@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.

rachmadaniHaryono commented 5 years ago

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

This 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

jarun commented 5 years ago

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!

rachmadaniHaryono commented 5 years ago

testing test on 4.2 https://github.com/rachmadaniHaryono/Buku/commit/cd302c45ac995b45c46b3f9f13b6e9626521121f

recommendation:

jarun commented 5 years ago

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.

rachmadaniHaryono commented 5 years ago

is there other packaging other than opensuse that test the package before upload?

jarun commented 5 years ago

@dilawar, @eclipseo, @maxice8, @pabloariasal, @szlin, @jpdasma can you please respond to @rachmadaniHaryono's question?

rachmadaniHaryono commented 5 years ago

@jarun i register the application here because i want to see the statistic of the project

https://www.openhub.net/p/Buku

jarun commented 5 years ago

@rachmadaniHaryono sure thing!

rachmadaniHaryono commented 5 years ago

@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

jarun commented 5 years ago

@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.

rachmadaniHaryono commented 5 years ago

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]))
rachmadaniHaryono commented 5 years ago

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

jarun commented 5 years ago

@rachmadaniHaryono no problem at all! I will handle in the meantime. Wish you a speedy recovery!

ghost commented 4 years ago

May be tough, but import from Reddit saved might be an interesting addition.

jarun commented 4 years ago

Reddit is not even a bookmarking site.

ghost commented 4 years ago

@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.

jarun commented 4 years ago

See if you can raise a PR.

Aquan1412 commented 4 years ago

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.

jarun commented 4 years ago

Feel free to raise a PR. I have no idea of org.

Aquan1412 commented 4 years ago

Ok, I just raised the PR, #432 The changes are minimal, so I don't expect any problems