jr

jr keeps a journal in plain text.
git clone git://shroom.party/jr.git
Log | Files | Refs | README | LICENSE

README (3761B)


      1 |================================( J R )=================================|
      2 
      3 jr keeps a journal in plain text.
      4 
      5 |-------------------------------( why? )---------------------------------|
      6 
      7 jrnl is waaaay to slow. i've bench jr with a journal of 10 big notes per
      8 day for 50 years: it works great on a low end arm laptop.
      9 
     10 |---------------------------( configuration )----------------------------|
     11 
     12 set a path to your journal (default "$HOME/.journal.txt"):
     13 
     14 	export JR_PATH="$HOME/.jr.txt"
     15 
     16 set a text formatter (default: `fmt`):
     17 
     18 	export JR_FORMATTER="par -w74es0p0"
     19 
     20 override $EDITOR if needed (default $EDITOR):
     21 
     22 	export JR_EDITOR=vim
     23 
     24 alias jk=jr for faster access
     25 
     26 |-------------------------------( usage )--------------------------------|
     27 
     28 usage: jr [-h] [--version] [COMMANDS] [entry]
     29 
     30   Synopsis:
     31     jr keeps a journal in plain text.
     32 
     33   Commands:
     34     e,edit         edit journal
     35     l,list         list todays entries
     36     l,list today   list todays entries
     37     l,list month   list this month entries
     38     l,list year    list this year entries
     39     l,list word    list entries including this word
     40     s,show         show todays entries
     41     s,show today   show todays entries
     42     s,show month   show this month entries
     43     s,show year    show this year entries
     44     s,show word    show entries including this word
     45     i,import       read new entry from file or stdin
     46 
     47   Options:
     48     -h             this help
     49     --version      show jr version
     50 
     51   Examples:
     52     jr "meh"                                  # add a quick entry
     53     jr "rainbows. 🌈🌈 WHOAH DOUBLE RAINBOW!" # add a 2 lines entry
     54     jr @todo fix bugs                         # add a quick todo
     55     jr l @todo                                # show todos
     56     jr                                        # edit a new entry
     57     jr e                                      # edit all entries
     58     jr l                                      # list todays entries
     59     jr s ^2019-02-01 15:34                    # show a particular one
     60     jr s rainbow                              # show rainbow entries
     61     jr l month                                # list this month entries
     62     jr s                                      # list todays entries
     63     jr i < /tmp/new_entry                     # import entry from file
     64     jr i /tmp/new_entry                       # import entry from file
     65     alias jrl2="jr l yesterday && jr l today" # list last 2 days entries
     66     alias jrs2="jr s yesterday && jr s today" # show last 2 days entries
     67 
     68 |-------------------------------( hooks )--------------------------------|
     69 
     70 pre_note_hook is called everytime before you make any action.
     71 post_note_hook is called everytime after you make any write action.
     72 
     73 hooks can serve any purpose such as encrypting your journal or syncing
     74 with a server.
     75 
     76 here is a very crude example of how you could use such hooks to sync your
     77 journal on a server, do NOT use this as it is:
     78 
     79 	# pre note hook
     80 	pre_note_hook () {
     81 		rsync -aq server:.journal.txt /home/tx/.journal.txt 2>/dev/null ||
     82 			(echo unable to apply pre_note_hook; exit 1)
     83 	}
     84 
     85 	# post note hook
     86 	post_note_hook () {
     87 		rsync -aq /home/tx/.journal.txt server:.journal.txt 2>/dev/null ||
     88 			(echo "unable to apply post_note_hook, CHECK SYNC!" ; exit 1)
     89 	}
     90 
     91 |------------------------( example of journal )--------------------------|
     92 
     93 this is what your journal file will look like:
     94 
     95 	2019-01-31 09:00 // on jr.
     96 	started writing my journal, jr works ok.
     97 
     98 	2019-01-31 09:01 // search
     99 	testing the search feature: lookforme
    100 
    101 	2019-02-01 11:32 // making poutine
    102 	cooking  a poutine today, let's see how it goes.
    103 	also, this is a multiline entry!
    104 
    105 	...
    106 
    107 hopefully it will soon get huge but jr will still be fast.
    108 
    109 |================================( EOF )=================================|