Skip to main content

Python PyPI - Version SQLite Hatch project linting - Ruff code style - Black types - Mypy License - MIT

PyMarks (WIP)

🌟 About

PyMarks is an efficient Python program designed to manage bookmarks. It uses SQLite3 as a database to store your bookmarks, which allows you to add, delete, and update them as necessary.

To make it easier to access your bookmarks, PyMarks provides a menu system using tools like Dmenu, Rofi, or fzf in the terminal. With this menu system, you can search and fuzzy find the bookmark you are looking for and then open it in your preferred web browser. Is an excellent tool for organizing and accessing bookmarks.

⚡️ Requirements

  • Rofi (More options)
  • dmenu (Optional)
  • fzf (Optional)
  • xclip (clipboard)

📦 Installation

You can install this tool using pipx (recommended), pip or by cloning the repository

pipx install pymarks

Using pip

pip install pymarks

Clone repository

# clone repository
$ git clone "https://github.com/haaag/PyMarks"
$ cd PyMarks

# create virtual environment & source
$ python -m venv .venv && source .venv/bin/activate

# install dependencies
$ pip install -r requirements.txt

# run
$ pymarks

🚀 Usage

$ pymarks --help

PyMarks is a simple tool to assist you in efficiently
organizing and managing your bookmarks.

The tool simplifies the process of accessing, adding, updating,
and removing bookmarks.

supported menus:
   ['dmenu', 'rofi', 'fzf']

options:
    -a, --add                   Add bookmark
    -c, --copy                  Copy bookmark to system clipboar (default)
    -o, --open                  Open bookmark in default browser
    -m, --menu                  Select menu (default: rofi)
    -j, --json                  JSON formatted output
    -V, --version               Show version
    -h, --help                  Show help
    -v, --verbose               Verbose mode

optional environment variables:
    PYMARKS_HOME                Overrides default PyMarks location
    PYMARKS_BACKUP_MAX_AGE      Overrides backup age check interval
    PYMARKS_BACKUP_MAX_AMOUNT   Overrides backup max amount

⌨️ Keybinds (rofi exclusive)

Using rofi, you can use some keybinds.

Keybind Description
Alt+a Add new record
Alt+c Change database
Alt+d Record detail
Alt+e Record options edit, delete
Alt+i App information databases, keybinds
Alt+t Filter by tag

📁 Folder structure

Directory structure $XDG_CONFIG_HOME/pymarks

$ ~/.config/pymarks (main*) tree
├── backup
│   ├── YYYY-MM-DD_bookmarks.db
│   └── YYYY-MM-DD_bookmarks.db
└── databases
    ├── bookmarks.db <-- Default
    ├── trash.db     <-- Deleted records
    ├── private.db
    └── work.db

🔥 Similar projects and inspiration

  • Buku 🌟 Thank You 🤘
Done

TODO

Priority

Description Progress
Use XDG_DIRS 100%
Add encrypt/decrypt option to database Planned
Create deleted/removed table Planned
Get keybinds in dmenu/fzf to work Planned

Environment variables

Description Progress
PYMARKS_HOME 100%
PYMARKS_BACKUP_WATCH 100%
PYMARKS_BACKUP_MAX_AGE 100%
PYMARKS_BACKUP_MAX_AMOUNT 100%

Actions

Description Progress
Update record (tags, URL) 100%
Delete record (tags, URL) 100%
Option to switch databases 100%
Option to add/remove database 100%
Option to show information (backups, keys, records, etc) 100%
Scrape title from website 100%
Scrape Description from website 100%
Multi-Select (for delete? for migrate? for any action…🤔) Planned

Databases

Description Progress
Add support for multi-database (e.g: personal and work) 100%
Create trash.db or dump.db for deleted records 100%
Option to restore from deleted to bookmark table Planned
Option to search in ALL databases Planned

Backups

Description Progress
Prompt for backup every <PYMARKS_BACKUP_MAX_AGE> number of days 100%
Option to disable check on runtime 100%
Keep <PYMARKS_BACKUP_MAX_AMOUNT> of backup files 100%

Misc

Description Progress
Add renumbered for the rowid (Each time a record is deleted?) Planned
Add URL validation when reading from clipboard Planned

Metadata

Release files for pymarks 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymarks 0.0.13
File Size Uploaded
pymarks-0.0.13.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymarks 0.0.13
File Interpreter ABI Platform
pymarks-0.0.13-py3-none-any.whl Python 3 none any Details

Total release size: 41.4 kB

Release files / pymarks-0.0.13.tar.gz

Download URL pymarks-0.0.13.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c0157eba309b7c8b68173cdc14808e0edea37996a107cfc1828cf6e9d0e8b77e
BLAKE2b-256 checksum
How to use checksums
641295643c1114869044dc12ff612dfecc2482654953f32a7cc89cac7d368ce4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.1

Release files / pymarks-0.0.13-py3-none-any.whl

Download URL pymarks-0.0.13-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9195ef4e06f3f640321750d13f14b3b40872a00618455c6b560ffaf3b1ad565e
BLAKE2b-256 checksum
How to use checksums
0246ad5ac7e499175a2fdc7ae4968e607af9647475ddd0af89a9d99d54d60565
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.1

Release history Release notifications | RSS feed

This release

0.0.13 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page