Giter Club home page Giter Club logo

til's Introduction

til is a command line tool for taking notes.

Requirements:
  Ruby
  RubyGems: sqlite3, xdg, colorize

Installation:
  Copy til.rb script into ~/.local/bin/
  Rename it as til

Commands:
  til add                      open the text editor (by default, Vim) to add a new note
  til find [LIST OF KEYWORDS]  find and display notes containing keywords (in title or tagline)
  til edit NUMBER              edit the note number NUMBER
  til del NUMBER               delete the note number NUMBER 
  til clear                    delete all notes
  til export                   output all notes in JSON format
  til import [FILENAME]        imports notes from a JSON file (or STDIN if no FILENAME)
  
Creating a new note:
  When creating a new note in the editor, the entered text should be structured as follows:
  
    - the first line is the TITLE
    - the second line is the LIST OF TAGS (can be left empty)
    - all remaining lines is the note content

  Example:
  *----------------------------------------------------------------------*
    Apple pancakes                                                         -  title
    recipe apple pancake favorite                                          -  tagline
    1. Preheat oven to 400 degrees F (200 degrees C).                      \ 
    2. Melt butter in an oven-safe skillet over medium heat;               |
       cook and stir apple slices, about 1/4 cup sugar,                    |
       and cinnamon in butter until apples are tender, about 5 minutes.    |
    3. Beat eggs, milk, flour, remaining 1/4 cup sugar, baking powder,      > content
       vanilla extract, and salt in a large bowl until batter is smooth;   |
       pour batter evenly over apples.                                     |
    4. Bake in the preheated oven until golden brown, about 10 minutes.    |
       Run a spatula around the edges of the pancake to loosen.            |
       Invert skillet over a large plate to serve.                         /
  *----------------------------------------------------------------------*

Notes lookup:
  Command `til find [KEYWORDSLIST]` looks up for the notes that contain the 
  requested keywords in the title or in the list of tags.
  
  In other words, the difference between the title and the tag list is 
  aesthetic (when the notes are displayed, the title is shown in bright green,
  while tags are shown in dark gray). 

  The command displays only the notes with the maximum number of 
  matched keywords (that is, not all keywords must match).

Customization:
  - Change your preferred text editor in the function `edit_entry()`
    (Vim is the default editor).
  - Change the color scheme at the end of the function `run()`,
    where the notes are printed out, search for the method `colorize`.

Notes storage:
  The notes database is stored in $XDG_DATA_HOME/til/notes.db
  (On Linux, it is usually ~/.local/share/til/notes.db)

Suggestions:
  If a distinction between the title text and tags is desirable, one can 
  prepend tags with a dash or underscore symbol: -recipe -apple -cinnamon
  Prepending with # will not work, since # symbols are discarded when
  matching keywords, however one can edit the regexp in `normalize_word()`
  function to preserve other punctuation symbols, in addition to - and _

License:
  The software is distributed under the Zero-Clause BSD license.

til's People

Contributors

a-nikolaev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.