Code Monkey home page Code Monkey logo

bash-notes's Introduction

Notes

Notes is a simple CLI program for taking notes in Markdown using your preferred text editor.

This is mostly for my personal use. I'll admit to taking a few shortcuts so my code isn't the prettiest thing in the world. But it works for me.

Suggested Dependencies

  • I recommend using Neovim as your editor with Vim-Plug and Goyo. Using Vim or NeoVim allows you to create and edit your notes exactly the way you want.
  • Ag is used for searching. It's faster than grep, which is used in it's place if ag can't be found.

Getting Started

The notes.sh command will by default create your notes and notebooks inside of $HOME/.notes. You can change this option by changing the value of NOTESDIR in notes.sh. Note that this value will also need to be changed in the notes_completion file as well or tab completion will not work.

Installation

Installing notes is incredibly simple. Just symlink notes.sh to an appropriate location like ~/.local/bin as notes:

ln -s ~/PATH_TO_NOTES_EXEC_DIR/notes.sh ~/.local/bin/notes

Next, in order to enable tab completion, notes_completion needs to be included by your .bashrc file. This is commonly done by including a whole bash-completion.d directory or simply sourcing the file.

If you use the bash-completion.d method, ensure something like the following is included in your .bashrc or .profile:

# Local bash completions
if [ -d ~/.bash-completion.d ]; then
    for f in ~/.bash-completion.d/*
    do
        source $f
    done
fi

Then make sure that notes_completion is symlinked into the bash-completion.d directory.

If you choose to just source notes_completion into your .bashrc, then the following is sufficient:

#Source notes_completion for tab completion
source ~/PATH_TO_NOTES_EXEC/notes_completion

You should now be able to use the notes command and have tab completion.

Note taking demo

Usage

Usage:
        notes notebook [nested notebook ...] [note]
                Edit or create a note. Omitting a note name will create a new note but
                leave it unnamed.

        notes [--search|-s] SEARCH_TERM
                Search notes for SEARCH_TERM.

        notes [--remove|-r] notebook [nested notebook ...] [note]
                Remove an entire notebook or just a note within a notebook.

        notes [--add|-a] [parent notebook ...] notebook
                Create a new notebook

bash-notes's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ugeek plainedit

bash-notes's Issues

Add support for spaces in note and notebook names

Add support for space in note and notebook names.
Names will either have spaces escaped or will be enclosed in quotation marks.

The only thing that really needs to be fixed is the completion file, which will split on whitespace.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.