Skip to content

mateconpizza/gm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

709 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‘ GoMarks

GitHub go.mod Go version Linux SQLite Release Go Report Card GoDoc

Writing gopher logo
πŸ’™ Gopher image by Maria Letta

Simple CLI tool for manage your bookmarks 🚧 WIP

Warning

This repo is a work in progress! Needing both cleaning up and documenting.

gm-menu.mp4

A web interface is currently in development: gmweb

Features

  • Powered by Fzf
  • Track bookmarks with git wip
    • Sync bookmarks as JSON files and push to remote
    • Encrypt bookmarks with GPG and push to remote
  • Encrypt local database with AES-GCM
  • Support multiple databases
  • Import bookmarks from firefox based browsers
  • Import bookmarks from chromium based browsers
  • Import bookmarks from git wip
  • Fetch title and description from new bookmark
  • Check bookmark status (http status)
  • Fetch lasts snapshot from Wayback Machine
  • Support for NO_COLOR env variable.
  • Configure menu keybinds, prompt, header, preview (fzf) using a YAML file.
  • Migrate items from one database to another
  • Add docker|podman support priority

Installation

go install github.com/mateconpizza/gm@latest

To uninstall the program remove the binary in your go env GOPATH

Usage (🚧WIP)

$ gm --help
usage: gm [query] [flags] [command]

commands:
  add         add bookmark
  edit        edit bookmark
  rm          remove bookmark
  open        open in browser
  yank        copy URL
  notes       view/edit notes
  qr          generate QR
  check       check URLs HTTP status
  tag         tags ops
  clean       strip URL params
  archive     show archive URL
  db          database ops
  git         git sync
  config      configuration
  import      import bookmarks
  export      export bookmarks

flags:
  -o, --output string   output format [bar|brief|card|flow|mini|minimal|multiline|oneline]
  -f, --fields string   select fields [id|url|title|tags|desc]
  -t, --tag strings     filter by tag(s)
  -H, --head int        limit to first N bookmarks
  -T, --tail int        limit to last N bookmarks
  -m, --menu            select interactively
      --db string       database name (default "main.db")
      --color string    output with colors [always|never] (default "always")
      --force           force action
  -y, --yes             assume yes
  -v, --verbose count   increase verbosity (-v, -vv, -vvv)
      --version         version for gm

Supported Env Vars

Name type Description Status
GOMARKS_HOME str Path to database/yaml done
GOMARKS_EDITOR str Preferred text editor done
NO_COLOR int Disable all colors done

Configuration

Configuration file lives in $XDG_CONFIG_HOME if $GOMARKS_HOME is not set.

YAML file structure
menu:
  defaults: true
  prompt: "β–Ά "
  preview: true
  header:
    enabled: true
    separator: " / "
  keymaps:
    edit:
      bind: ctrl-e
      description: edit
      enabled: true
      hidden: false
    notes:
      bind: ctrl-w
      description: edit-notes
      enabled: true
      hidden: false
    open:
      bind: ctrl-o
      description: open
      enabled: true
      hidden: false
    preview:
      bind: ctrl-/
      description: toggle-preview
      enabled: true
      hidden: false
    qr:
      bind: ctrl-k
      description: qr-code
      enabled: true
      hidden: false
    open_qr:
      bind: ctrl-l
      description: open-qr
      enabled: true
      hidden: false
    toggle_all:
      bind: ctrl-a
      description: toggle-all
      enabled: true
      hidden: false
    yank:
      bind: ctrl-y
      description: yank
      enabled: true
      hidden: false

Preview

Menu support

Single/multiple selection for open, copy, edit, delete, check status.

gm-menu.mp4
Add a bookmark
gm-add.mp4
Edit a bookmark
gm-edit.mp4
Create QR-Code
gm-qr.mp4
Check status
gm-status.mp4
TODO

TODO

Priority

  • Use a ORM discontinued
    • Add multiple databases option (default.db, work.db, client.db)

Refactor

  • [~] Add Sync to remote repo??? (WIP)
  • Drop ErrActionAborted in package terminal (use sys.ErrActionAborted)
  • Move config/menu to package menu
    • Drop global Fzf

XDG

  • Store db in XDG_DATA_HOME
  • Store menu config in XDG_CONFIG_HOME (WIP: for now in XDG_DATA_HOME)

Packages

  • terminal package
  • color package
  • files package

Redo

  • Backups
  • Databases

Import

  • From firefox
    • If database is locked (SQLITE_BUSY), ask user confirmation to copy file to tmp directory and read from there.
  • From chrome chromium

Misc

  • Add a logging library
  • Support NO_COLOR env var. no-color
  • Create a rm subcommand
    • Add rm database, backup
    • Add rm records
    • Add rm misc...
    • Remove db rm

About

πŸ”– Simple tool for manage your bookmarks

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors