Bookmarks that are easy to socialize!
Знайти файл
2021-03-21 12:32:32 +01:00
marxbook initial commit 2021-03-21 12:09:07 +01:00
misc initial commit 2021-03-21 12:09:07 +01:00
.gitignore initial commit 2021-03-21 12:09:07 +01:00
cat.jpeg an explainatory image was much needed 2021-03-21 12:17:25 +01:00
README.md improve readme 2021-03-21 12:32:32 +01:00
setup.py initial commit 2021-03-21 12:09:07 +01:00

When you have many bookmarks, you'd better have a good book full of marks.

A cat reads Karl Marx

What: an informal specification

Goals:

  • keep track of bookmarks
  • have the concept of folder well integrated
  • make sharing with friends easy with already available technologies
  • supports tags and descriptions, too
  • one file per bookmark
  • CLI-first
    • but having a GUI would be nice, too
  • python3

Storage

One file per bookmark

If you want to store a tree, let's just rely on filesystem!

Let's learn pass lesson: when you keep things simple, people can do crazy shit.

One quick example: if you want to share some folder with a friend of yours, having a REAL folder is the best way to make that simple. Easy share, few conflicts, easy review.

You can have some folder under git control, or rsync-ed, or shared through nextcloud.

Filename

What about the filename? Some approaches:

  • GUID
  • shasum of URL ⇒ you can't modify it!

File content

First line is the URL.

now we need to store description and tags. We want to be grep-friendly, so let's use a format borrowed from email (or from debian/control, if you want!):

URI: https://riseup.net/
Description: They are nice folks
Tag: privacy
Tag: change the world
Tag: email

Just avoid newlines in fields and you can do good queries just using grep

Performance

Won't this be very slow? maybe! If that happens, we'll work it around adding an index, not changing the storage format.

Interface

Searching/opening

Though non optimal, fzf, peco or similar tools can be a very good start: nice interface and support for opening multiple URLs at a single time.

Dreaming a bit more, it would be nice to:

  • be able to both navigate the tree and filter results
  • include frecency!

Moving stuff

If we have filtering, it's nice to be able to use it to move things around, or delete, or whatever.

Mass tagging

Having tools that can be used to automatically apply/remove tags to returned bookmarks is very nice

Examples

mxb list
mxb list coding/python
firefox "$(mxb list | peco | awk '{ print $ NF }')"
mxb list | peco | cut -f 1 | mxb tag +urgent
mxb list | peco | cut -f 1 | mxb mv work/todo
mxb mv coding/python/exercises/dfkljedua work/todo/
xsel -b | mxb add

TODO

  • Core:
    • move()
    • tag()
  • helper:
    • write a marxbook-search helper based on peco