GitXplorerGitXplorer
g

bm.sh

public
11 stars
2 forks
1 issues

Commits

List of commits on branch main.
Unverified
009d48a703bd10b11ffb236a1c2d0bdb27881cc9

remove category command is added

ggozeloglu committed 4 years ago
Unverified
167d45112bdb7c0af3a4f55a18bd08ca0f6ac5cf

list bookmarks under given categories feature added

ggozeloglu committed 4 years ago
Unverified
54f853b9222451fe0842904d8fc6c03c4a8a38be

line number is added for category listing

ggozeloglu committed 4 years ago
Unverified
ef8b0df64e5a207a97ebe1df0f38f1dc7d9c410f

readme updated

ggozeloglu committed 4 years ago
Unverified
160817cf417a1a1eff92f0e2d69b50701fa0fa2c

list categories command is added

ggozeloglu committed 4 years ago
Unverified
88828213a9e6fac367e2b02f9e11b5fd427863e1

add command is added

ggozeloglu committed 4 years ago

README

The README file for this repository.

bm

LICENSE Proudly written in Shell VERSION

bm comes from Bookmark as a short name. bm is a CLI tool for saving links on terminal easily. It has different features like adding new link, listing them, creating and saving under categories, deleting links or categories.

Motivation

I always use terminal while making development. It stays open everytime. I compile, run, test the code or commiting the changes on GitHub on the terminal. In short, I try to do all my jobs while coding on the terminal. Again, due to my personal characteristics, I want to control my jobs from one place if it is possible. I mean I do not like to work with lots of different tools. I try to manage all stuff from one or two applications/tools. I know there are different tools or ways to manage bookmarks, but I do not like using any other tools/applications except the necessary ones like IDE, terminal. That's why I wanted to build a CLI tool that manages the bookmarks. Also, the minor motivation was applying the Bash knowledge to real-world project.

Run

$ git clone https://github.com/gozeloglu/bm.sh.git     # Clone the repository
$ cd bm/    # Change the directory
$ ./bm --help   # Make sure that script is executable

If you get an error when you run the script, change the mode as follow:

$ chmod +x bm

First, you need to run setup command. It creates the directory under your ~ directory and default category file.

Example

$ ./bm setup    # prepares the environment
$ ./bm --help   # shows the usage
$ ./bm add www.github.com Software CS   # Saves the link on "Software" and "CS" categories
$ ./bm add --category Software CS Reading Videos    # Adds new categories 
$ ./bm list --category  # lists all categories
$ ./bm list --category CS   # lists all bookmarks under given category
$ ./bm list -c CS Reading Videos    # lists all bookmarks under given categories
$ ./bm remove Reading Videos    # Remove the given categories
$ ./bm remove --force Reading Videos    # Remove the given categories even if they are not empty
$ ./bm delete 1 3 4     # Delete the given bookmark ids in default category, bm
$ ./bm delete -c Reading 1 4 5  # Delete the given bookmark ids by given category

Usage

If you want to see usage of the command, just add --help or -h flag as follow.

$ ./bm --help           # CLI usage
$ ./bm add --help       # add usage
$ ./bm list --help      # list usage
$ ./bm delete --help    # delete usage
$ ./bm remove --help    # remove usage

You can enter multiple category or id in commands. bm handles all of them. There is an exception for it when you want to delete bookmarks by category. You need to type just one category. Otherwise, bm understands them as a bookmark id.

Demo

bm demo

Contribution

Contributions are welcome. But, the project is still under development by me. That's why I may not accept the pull requests from you, but we can discuss in issues if you open issue.

What is next?

  • [ ] Migrate to database or cloud.
  • [ ] Code refactoring for each file.
  • [ ] Enable to use in system-wide.

LICENSE

MIT