You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Charles Pence b2b1ff1b54
Formatting.
2 weeks ago
bin Initial commit of a teletype skeleton. 6 months ago
exe Initial commit of a teletype skeleton. 6 months ago
lib Formatting. 2 weeks ago
spec Add a basic skeleton for the UI. 6 months ago
.gitignore Initial commit of a teletype skeleton. 6 months ago
.rspec Initial commit of a teletype skeleton. 6 months ago
.rubocop.yml Polish up the formatting with Rubocop. 5 months ago
CHANGELOG.md Add basic stuff to gemspec, run bundle. 6 months ago
CODE_OF_CONDUCT.md Initial commit of a teletype skeleton. 6 months ago
Gemfile Add Rubocop to bundle. 5 months ago
Gemfile.lock Add Rubocop to bundle. 5 months ago
LICENSE.txt Initial commit of a teletype skeleton. 6 months ago
README.md Add support for actually creating and opening notes. 5 months ago
Rakefile Initial commit of a teletype skeleton. 6 months ago
nvcli.gemspec Polish up the formatting with Rubocop. 5 months ago

README.md

nvcli

FIXME: general description here

Installation

Install nvcli by running:

$ gem install nvcli

The installation may take a while, as the Xapian search library will be fetched and compiled for your machine.

Configuration

The first time you run nvcli, it will create a configuration file in your platform's configuration directory (either ~/Library/Application Support/nvcli, ~/.config/nvcli, or $APPDATA\nvcli). This is a YAML file containing the following keys:

  • notes_dir (default: ~/Notes): The folder containing all of your notes. Sub-folders within this folder are not supported (following the original Notational Velocity model).
  • notes_ext (default: .md): The file extension for all of your notes. Files in the notes directory not containing this extension will not be parsed. This must be Markdown (as nvcli will parse the Markdown of your notes), but could be, for instance, .md, .markdown, .txt, etc. This value must include the dot.
  • language (default: en): The note searching is internally performed by the Xapian search server, which will correct spelling and stem words in the selected language. Set to an ISO language code.
  • use_hash (default: true): If true, nvcli will check the hash (xxHash's XXH64) of your notes in order to see if they should be re-parsed in the search database. If false, the file's modification time will be used instead. Hashing is, in general, extremely fast, so you shouldn't need to set this to false for normal workloads.
  • color (default: true): If true, the console output will be colorized.

Usage

All you need to know are the various key bindings:

  • Esc or Ctrl + Q: Quit the program
  • and : Scroll through the list of notes
  • Enter: If there is a note selected, open it in your editor
  • Tab: Create a new note, with the filename set to the current content on the search line. The note will be placed in your notes directory, and your chose notes file extension will automatically be added.
  • (any other typing): Add to the search that is being performed in the list.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on Codeberg at https://codeberg.org/cpence/nvcli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Copyright (c) 2020 Charles H. Pence (charles@charlespence.net). Released under the MIT License.