mark

command module
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 12 Imported by: 0

README

mark

Installation

There are four ways to install mark, given here in order of simplicity:

  1. Download and run the installer script
  2. Use go install
  3. Use a pre-built binary
  4. Build mark from scratch
Download and Run the Installer

First, do yourself a favor and just go check out the installer script to make sure you're okay with it. You owe it to yourself.

If so, you can run the following:

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/commondatageek/mark/main/install.sh | bash -s
Use go install

If you [already have Go installed], then installing mark is as simple as:

go install github.com/commondatageek/mark

You'll then need to make sure that your GOPATH (typically $HOME/go by default) is on your PATH variable.

Use a Pre-built Binary
  1. Download the appropriate pre-built binary from the Releases page.
  2. Extract the mark file from the tar archive. For example:
tar -xvf mark-v0.6.1-darwin-amd64.tar.gz
  1. Move the mark binary into your preferred location on your path. For example:
sudo mv ./mark /usr/local/bin
Build mark from Scratch
  1. Install Go
  2. Clone the mark repository to your local machine
  3. From the mark repository directory, run go build .
    • (Alternatively, if you have just task runner installed, you can run just build)
  4. Move the newly built mark binary to some directory on your PATH. For example:
sudo mv ./mark /usr/local/bin

In the future, we'll have a devcontainer that will make this easier.

Usage

The Database File

You must have a file called .bookmarks.jsonl in your $HOME directory.

It should have the following format, one item per line:

{"names": ["Hacker News", "hn"], "tags": ["news", "technology"], "url": "https://news.ycombinator.com/news"}
{"names": ["InfoQ News", "infoq"], "tags": ["news", "technology"], "url": "https://infoq.com"}
{"names": ["Mark Github Repository", "gh/mark"], "tags": ["personal", "github", "mark", "cli", "golang"], "url": "https://github.com/commondatageek/mark"}

You'll want to add good tags and names, as it will help immensely when you are searching for something 6 months from now.

Search your item database

The search functionality will perform indexing on your database and match all the substrings of the words you type in against the substrings in the words in your items --including names, tags, and URL.

When it gives you search results, you can Command+Click on the URL and open it:

mark
Open a specific item

Open a specific item by giving one of its names:

mark my/cool/item/name

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL