From 08ff1065ae9576209298b14678089960499dfc09 Mon Sep 17 00:00:00 2001 From: Micah Ellison <4383304+micahellison@users.noreply.github.com> Date: Thu, 9 Jan 2020 20:52:46 -0800 Subject: [PATCH] Deployed 9d9f61a with MkDocs version: 1.0.4 --- recipes/index.html | 1 - search/search_index.json | 2 +- sitemap.xml | 14 +++++++------- sitemap.xml.gz | Bin 199 -> 199 bytes usage/index.html | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/recipes/index.html b/recipes/index.html index b4470dd7..c62ee8a1 100755 --- a/recipes/index.html +++ b/recipes/index.html @@ -230,7 +230,6 @@ file before writing into the journal.

Similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is -f:

-

<<<<<<< HEAD

editor: "mvim -f"
 
diff --git a/search/search_index.json b/search/search_index.json index 9a87f26c..925b3f13 100755 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"advanced/","text":"Advanced Usage Configuration File You can configure the way jrnl behaves in a configuration file. By default, this is ~/.config/jrnl/jrnl.yaml . If you have the XDG_CONFIG_HOME variable set, the configuration file will be saved as $XDG_CONFIG_HOME/jrnl/jrnl.yaml . Note On Windows, the configuration file is typically found at %USERPROFILE%\\.config\\jrnl\\jrnl.yaml . The configuration file is a YAML file with the following options and can be edited with a plain text editor. Note Backup your config file before editing. Changes to the config file have destructive effects on your journal! journals paths to your journal files editor if set, executes this command to launch an external editor for writing your entries, e.g. vim . Some editors require special options to work properly, see FAQ for details. encrypt if true , encrypts your journal using AES. tagsymbols Symbols to be interpreted as tags. (See note below) default_hour and default_minute if you supply a date, such as last thursday , but no specific time, the entry will be created at this time timeformat how to format the timestamps in your journal, see the python docs for reference highlight if true , tags will be highlighted in cyan. linewrap controls the width of the output. Set to false if you don't want to wrap long lines. Note Although it seems intuitive to use the # character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type jrnl Implemented endless scrolling on the #frontend of our website. your bash will chop off everything after the # before passing it to jrnl . To avoid this, wrap your input into quotation marks like this: jrnl \"Implemented endless scrolling on the #frontend of our website.\" Or use the built-in prompt or an external editor to compose your entries. Multiple journal files You can configure jrnl to use with multiple journals (eg. private and work ) by defining more journals in your jrnl.yaml , for example: journals: default: ~\\journal.txt work: ~\\work.txt The default journal gets created the first time you start jrnl Now you can access the work journal by using jrnl work instead of jrnl , eg. jrnl work at 10am: Meeting with @Steve jrnl work -n 3 will both use ~/work.txt , while jrnl -n 3 will display the last three entries from ~/journal.txt (and so does jrnl default -n 3 ). You can also override the default options for each individual journal. If your jrnl.yaml looks like this: encrypt: false journals: default: ~/journal.txt work: journal: ~/work.txt encrypt: true food: ~/my_recipes.txt Your default and your food journals won't be encrypted, however your work journal will! You can override all options that are present at the top level of jrnl.yaml , just make sure that at the very least you specify a journal: ... key that points to the journal file of that journal. Note Changing encrypt to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal is encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load. Known Issues Unicode on Windows The Windows shell prior to Windows 7 has issues with unicode encoding. To use non-ascii characters, first tweak Python to recognize the encoding by adding 'cp65001': 'utf_8' , to Lib/encoding/aliases.py . Then, change the codepage with chcp 1252 before using jrnl . (Related issue: #486 )","title":"Advanced Usage"},{"location":"advanced/#advanced-usage","text":"","title":"Advanced Usage"},{"location":"advanced/#configuration-file","text":"You can configure the way jrnl behaves in a configuration file. By default, this is ~/.config/jrnl/jrnl.yaml . If you have the XDG_CONFIG_HOME variable set, the configuration file will be saved as $XDG_CONFIG_HOME/jrnl/jrnl.yaml . Note On Windows, the configuration file is typically found at %USERPROFILE%\\.config\\jrnl\\jrnl.yaml . The configuration file is a YAML file with the following options and can be edited with a plain text editor. Note Backup your config file before editing. Changes to the config file have destructive effects on your journal! journals paths to your journal files editor if set, executes this command to launch an external editor for writing your entries, e.g. vim . Some editors require special options to work properly, see FAQ for details. encrypt if true , encrypts your journal using AES. tagsymbols Symbols to be interpreted as tags. (See note below) default_hour and default_minute if you supply a date, such as last thursday , but no specific time, the entry will be created at this time timeformat how to format the timestamps in your journal, see the python docs for reference highlight if true , tags will be highlighted in cyan. linewrap controls the width of the output. Set to false if you don't want to wrap long lines. Note Although it seems intuitive to use the # character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type jrnl Implemented endless scrolling on the #frontend of our website. your bash will chop off everything after the # before passing it to jrnl . To avoid this, wrap your input into quotation marks like this: jrnl \"Implemented endless scrolling on the #frontend of our website.\" Or use the built-in prompt or an external editor to compose your entries.","title":"Configuration File"},{"location":"advanced/#multiple-journal-files","text":"You can configure jrnl to use with multiple journals (eg. private and work ) by defining more journals in your jrnl.yaml , for example: journals: default: ~\\journal.txt work: ~\\work.txt The default journal gets created the first time you start jrnl Now you can access the work journal by using jrnl work instead of jrnl , eg. jrnl work at 10am: Meeting with @Steve jrnl work -n 3 will both use ~/work.txt , while jrnl -n 3 will display the last three entries from ~/journal.txt (and so does jrnl default -n 3 ). You can also override the default options for each individual journal. If your jrnl.yaml looks like this: encrypt: false journals: default: ~/journal.txt work: journal: ~/work.txt encrypt: true food: ~/my_recipes.txt Your default and your food journals won't be encrypted, however your work journal will! You can override all options that are present at the top level of jrnl.yaml , just make sure that at the very least you specify a journal: ... key that points to the journal file of that journal. Note Changing encrypt to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal is encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load.","title":"Multiple journal files"},{"location":"advanced/#known-issues","text":"","title":"Known Issues"},{"location":"advanced/#unicode-on-windows","text":"The Windows shell prior to Windows 7 has issues with unicode encoding. To use non-ascii characters, first tweak Python to recognize the encoding by adding 'cp65001': 'utf_8' , to Lib/encoding/aliases.py . Then, change the codepage with chcp 1252 before using jrnl . (Related issue: #486 )","title":"Unicode on Windows"},{"location":"encryption/","text":"Encryption Encrypting and decrypting If you don\u2019t choose to encrypt your file when you run jrnl for the first time, you can encrypt your existing journal file or change its password using this: jrnl --encrypt If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, jrnl --decrypt will replace your encrypted journal file with a journal in plain text. You can also specify a filename, i.e. jrnl --decrypt plain_text_copy.txt , to leave your original file untouched. Storing passwords in your keychain Whenever you encrypt your journal, you are asked whether you want to store the encryption password in your keychain. If you do this, you won\u2019t have to enter your password every time you want to write or read your journal. If you don\u2019t initially store the password in the keychain but decide to do so at a later point \u2013 or maybe want to store it on one computer but not on another \u2013 you can simply run jrnl --encrypt on an encrypted journal and use the same password again. A note on security While jrnl follows best practises, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history \u2013 it\u2019s meant to keep journals secure in transit, for example when storing it on an untrusted services such as Dropbox. If you\u2019re concerned about security, disable history logging for journal in your .bashrc : HISTIGNORE=\"$HISTIGNORE:jrnl *\" If you are using zsh instead of bash, you can get the same behaviour by adding this to your zshrc : setopt HIST_IGNORE_SPACE alias jrnl=\" jrnl\" The fish shell does not support automatically preventing logging like this. To prevent jrnl commands being logged by fish, you must make sure to type a space before every jrnl command you enter. To delete existing jrnl commands from fish\u2019s history, run history delete --prefix 'jrnl ' . Manual decryption Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. Here\u2019s a Python script that you can use to decrypt your journal: #!/usr/bin/env python3 import argparse from Crypto.Cipher import AES import getpass import hashlib import sys parser = argparse.ArgumentParser() parser.add_argument(\"filepath\", help=\"journal file to decrypt\") args = parser.parse_args() pwd = getpass.getpass() key = hashlib.sha256(pwd.encode('utf-8')).digest() with open(args.filepath, 'rb') as f: ciphertext = f.read() crypto = AES.new(key, AES.MODE_CBC, ciphertext[:16]) plain = crypto.decrypt(ciphertext[16:]) plain = plain.strip(plain[-1:]) plain = plain.decode(\"utf-8\") print(plain)","title":"Encryption"},{"location":"encryption/#encryption","text":"","title":"Encryption"},{"location":"encryption/#encrypting-and-decrypting","text":"If you don\u2019t choose to encrypt your file when you run jrnl for the first time, you can encrypt your existing journal file or change its password using this: jrnl --encrypt If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, jrnl --decrypt will replace your encrypted journal file with a journal in plain text. You can also specify a filename, i.e. jrnl --decrypt plain_text_copy.txt , to leave your original file untouched.","title":"Encrypting and decrypting"},{"location":"encryption/#storing-passwords-in-your-keychain","text":"Whenever you encrypt your journal, you are asked whether you want to store the encryption password in your keychain. If you do this, you won\u2019t have to enter your password every time you want to write or read your journal. If you don\u2019t initially store the password in the keychain but decide to do so at a later point \u2013 or maybe want to store it on one computer but not on another \u2013 you can simply run jrnl --encrypt on an encrypted journal and use the same password again.","title":"Storing passwords in your keychain"},{"location":"encryption/#a-note-on-security","text":"While jrnl follows best practises, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history \u2013 it\u2019s meant to keep journals secure in transit, for example when storing it on an untrusted services such as Dropbox. If you\u2019re concerned about security, disable history logging for journal in your .bashrc : HISTIGNORE=\"$HISTIGNORE:jrnl *\" If you are using zsh instead of bash, you can get the same behaviour by adding this to your zshrc : setopt HIST_IGNORE_SPACE alias jrnl=\" jrnl\" The fish shell does not support automatically preventing logging like this. To prevent jrnl commands being logged by fish, you must make sure to type a space before every jrnl command you enter. To delete existing jrnl commands from fish\u2019s history, run history delete --prefix 'jrnl ' .","title":"A note on security"},{"location":"encryption/#manual-decryption","text":"Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. Here\u2019s a Python script that you can use to decrypt your journal: #!/usr/bin/env python3 import argparse from Crypto.Cipher import AES import getpass import hashlib import sys parser = argparse.ArgumentParser() parser.add_argument(\"filepath\", help=\"journal file to decrypt\") args = parser.parse_args() pwd = getpass.getpass() key = hashlib.sha256(pwd.encode('utf-8')).digest() with open(args.filepath, 'rb') as f: ciphertext = f.read() crypto = AES.new(key, AES.MODE_CBC, ciphertext[:16]) plain = crypto.decrypt(ciphertext[16:]) plain = plain.strip(plain[-1:]) plain = plain.decode(\"utf-8\") print(plain)","title":"Manual decryption"},{"location":"export/","text":"Import and Export Tag export With jrnl --tags you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one. List of all entries jrnl --short Will only display the date and title of each entry. JSON export Can do jrnl --export json Why not create a beautiful timeline of your journal? Markdown export Use jrnl --export markdown Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice. Text export jrnl --export text Pretty-prints your entire journal. Export to files You can specify the output file of your exported journal using the -o argument jrnl --export md -o journal.md The above command will generate a file named journal.md . If the -o argument is a directory, jrnl will export each entry into an individual file jrnl --export json -o my_entries/ The contents of my\\_entries/ will then look like this: my_entries/ |- 2013_06_03_a-beautiful-day.json |- 2013_06_07_dinner-with-gabriel.json |- ...","title":"Import and Export"},{"location":"export/#import-and-export","text":"","title":"Import and Export"},{"location":"export/#tag-export","text":"With jrnl --tags you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one.","title":"Tag export"},{"location":"export/#list-of-all-entries","text":"jrnl --short Will only display the date and title of each entry.","title":"List of all entries"},{"location":"export/#json-export","text":"Can do jrnl --export json Why not create a beautiful timeline of your journal?","title":"JSON export"},{"location":"export/#markdown-export","text":"Use jrnl --export markdown Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.","title":"Markdown export"},{"location":"export/#text-export","text":"jrnl --export text Pretty-prints your entire journal.","title":"Text export"},{"location":"export/#export-to-files","text":"You can specify the output file of your exported journal using the -o argument jrnl --export md -o journal.md The above command will generate a file named journal.md . If the -o argument is a directory, jrnl will export each entry into an individual file jrnl --export json -o my_entries/ The contents of my\\_entries/ will then look like this: my_entries/ |- 2013_06_03_a-beautiful-day.json |- 2013_06_07_dinner-with-gabriel.json |- ...","title":"Export to files"},{"location":"installation/","text":"Getting started Installation On OS X, the easiest way to install jrnl is using Homebrew brew install jrnl On other platforms, install jrnl using pip pip install jrnl The first time you run jrnl you will be asked where your journal file should be created and whether you wish to encrypt it. Quickstart To make a new entry, just type jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book. and hit return. yesterday: will be interpreted as a time stamp. Everything until the first sentence mark ( .?!: ) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this: 2012-03-29 09:00 Called in sick. Used the time to clean the house and spent 4h on writing my book. If you just call jrnl , you will be prompted to compose your entry - but you can also configure jrnl to use your external editor.","title":"Quickstart"},{"location":"installation/#getting-started","text":"","title":"Getting started"},{"location":"installation/#installation","text":"On OS X, the easiest way to install jrnl is using Homebrew brew install jrnl On other platforms, install jrnl using pip pip install jrnl The first time you run jrnl you will be asked where your journal file should be created and whether you wish to encrypt it.","title":"Installation"},{"location":"installation/#quickstart","text":"To make a new entry, just type jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book. and hit return. yesterday: will be interpreted as a time stamp. Everything until the first sentence mark ( .?!: ) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this: 2012-03-29 09:00 Called in sick. Used the time to clean the house and spent 4h on writing my book. If you just call jrnl , you will be prompted to compose your entry - but you can also configure jrnl to use your external editor.","title":"Quickstart"},{"location":"overview/","text":"Overview What is jrnl? jrnl is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. Optionally, your journal can be encrypted using the 256-bit AES . Why keep a journal? Journals aren't just for people who have too much time on their summer vacation. A journal helps you to keep track of the things you get done and how you did them. Your imagination may be limitless, but your memory isn't. For personal use, make it a good habit to write at least 20 words a day. Just to reflect what made this day special, why you haven't wasted it. For professional use, consider a text-based journal to be the perfect complement to your GTD todo list - a documentation of what and how you've done it. Or use it as a quick way to keep a change log. Or use it to keep a lab book.","title":"Overview"},{"location":"overview/#overview","text":"","title":"Overview"},{"location":"overview/#what-is-jrnl","text":"jrnl is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. Optionally, your journal can be encrypted using the 256-bit AES .","title":"What is jrnl?"},{"location":"overview/#why-keep-a-journal","text":"Journals aren't just for people who have too much time on their summer vacation. A journal helps you to keep track of the things you get done and how you did them. Your imagination may be limitless, but your memory isn't. For personal use, make it a good habit to write at least 20 words a day. Just to reflect what made this day special, why you haven't wasted it. For professional use, consider a text-based journal to be the perfect complement to your GTD todo list - a documentation of what and how you've done it. Or use it as a quick way to keep a change log. Or use it to keep a lab book.","title":"Why keep a journal?"},{"location":"recipes/","text":"FAQ Recipes Co-occurrence of tags If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run jrnl @alberto --tags | grep @melo And will get something like @melo: 9 , meaning there are 9 entries where both @alberto and @melo are tagged. How does this work? First, jrnl @alberto will filter the journal to only entries containing the tag @alberto , and then the --tags option will print out how often each tag occurred in this filtered journal. Finally, we pipe this to grep which will only display the line containing @melo . Combining filters You can do things like jrnl @fixed -starred -n 10 -until \"jan 2013\" --short To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with @fixed . Statistics How much did I write last year? jrnl -from \"jan 1 2013\" -until \"dec 31 2013\" | wc -w Will give you the number of words you wrote in 2013. How long is my average entry? expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l) This will first get the total number of words in the journal and divide it by the number of entries (this works because jrnl --short will print exactly one line per entry). Importing older files If you want to import a file as an entry to jrnl, you can just do jrnl < entry.ext . But what if you want the modification date of the file to be the date of the entry in jrnl? Try this echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl The first part will format the modification date of entry.txt , and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your .bashrc or .bash_profile jrnlimport () { echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' $1` `cat $1` | jrnl } Using templates Say you always want to use the same template for creating new entries. If you have an external editor set up, you can use this: jrnl < my_template.txt jrnl -1 --edit Another nice solution that allows you to define individual prompts comes from Jacobo de Vera : function log_question() { echo $1 read jrnl today: ${1}. $REPLY } log_question 'What did I achieve today?' log_question 'What did I make progress with?' Display random entry You can use this to select one title at random and then display the whole entry. The invocation of cut needs to match the format of the timestamp. For timestamps that have a space between data and time components, select fields 1 and 2 as shown. For timestamps that have no whitespace, select only field 1. jrnl -on \"$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)\" External editors To use external editors for writing and editing journal entries, set them up in your jrnl.yaml (see advanced usage for details). Generally, after writing an entry, you will have to save and close the file to save the changes to jrnl. Sublime Text To use Sublime Text, install the command line tools for Sublime Text and configure your jrnl.yaml like this: editor: \"subl -w\" Note the -w flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal. MacVim Similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is -f : <<<<<<< HEAD editor: \"mvim -f\" iA Writer On OS X, you can use the fabulous iA Writer to write entries. Configure your jrnl.yaml like this: editor: \"open -b pro.writer.mac -Wn\" What does this do? open -b ... opens a file using the application identified by the bundle identifier (a unique string for every app out there). -Wn tells the application to wait until it's closed before passing back control, and to use a new instance of the application. If the pro.writer.mac bundle identifier is not found on your system, you can find the right string to use by inspecting iA Writer's Info.plist file in your shell: grep -A 1 CFBundleIdentifier /Applications/iA\\ Writer.app/Contents/Info.plist Notepad++ on Windows To set Notepad++ as your editor, edit the jrnl config file ( jrnl.yaml ) like this: editor: \"C:\\\\Program Files (x86)\\\\Notepad++\\\\notepad++.exe -multiInst -nosession\" The double backslashes are needed so jrnl can read the file path correctly. The -multiInst -nosession options will cause jrnl to open its own Notepad++ window. Visual Studio Code To set Visual Studo Code as your editor on Linux, edit jrnl.yaml like this: editor: \"/usr/bin/code --wait\" The --wait argument tells VS Code to wait for files to be written out before handing back control to jrnl. On MacOS you will need to add VS Code to your PATH. You can do that by adding: export PATH=\"\\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\" to your .bash_profile , or by running the Install 'code' command in PATH command from the command pallet in VS Code. Then you can add: editor: \"code --wait\" to jrnl.yaml . See also the Visual Studio Code documentation","title":"Recipes"},{"location":"recipes/#faq","text":"","title":"FAQ"},{"location":"recipes/#recipes","text":"","title":"Recipes"},{"location":"recipes/#co-occurrence-of-tags","text":"If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run jrnl @alberto --tags | grep @melo And will get something like @melo: 9 , meaning there are 9 entries where both @alberto and @melo are tagged. How does this work? First, jrnl @alberto will filter the journal to only entries containing the tag @alberto , and then the --tags option will print out how often each tag occurred in this filtered journal. Finally, we pipe this to grep which will only display the line containing @melo .","title":"Co-occurrence of tags"},{"location":"recipes/#combining-filters","text":"You can do things like jrnl @fixed -starred -n 10 -until \"jan 2013\" --short To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with @fixed .","title":"Combining filters"},{"location":"recipes/#statistics","text":"How much did I write last year? jrnl -from \"jan 1 2013\" -until \"dec 31 2013\" | wc -w Will give you the number of words you wrote in 2013. How long is my average entry? expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l) This will first get the total number of words in the journal and divide it by the number of entries (this works because jrnl --short will print exactly one line per entry).","title":"Statistics"},{"location":"recipes/#importing-older-files","text":"If you want to import a file as an entry to jrnl, you can just do jrnl < entry.ext . But what if you want the modification date of the file to be the date of the entry in jrnl? Try this echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl The first part will format the modification date of entry.txt , and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your .bashrc or .bash_profile jrnlimport () { echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' $1` `cat $1` | jrnl }","title":"Importing older files"},{"location":"recipes/#using-templates","text":"Say you always want to use the same template for creating new entries. If you have an external editor set up, you can use this: jrnl < my_template.txt jrnl -1 --edit Another nice solution that allows you to define individual prompts comes from Jacobo de Vera : function log_question() { echo $1 read jrnl today: ${1}. $REPLY } log_question 'What did I achieve today?' log_question 'What did I make progress with?'","title":"Using templates"},{"location":"recipes/#display-random-entry","text":"You can use this to select one title at random and then display the whole entry. The invocation of cut needs to match the format of the timestamp. For timestamps that have a space between data and time components, select fields 1 and 2 as shown. For timestamps that have no whitespace, select only field 1. jrnl -on \"$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)\"","title":"Display random entry"},{"location":"recipes/#external-editors","text":"To use external editors for writing and editing journal entries, set them up in your jrnl.yaml (see advanced usage for details). Generally, after writing an entry, you will have to save and close the file to save the changes to jrnl.","title":"External editors"},{"location":"recipes/#sublime-text","text":"To use Sublime Text, install the command line tools for Sublime Text and configure your jrnl.yaml like this: editor: \"subl -w\" Note the -w flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal.","title":"Sublime Text"},{"location":"recipes/#macvim","text":"Similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is -f : <<<<<<< HEAD editor: \"mvim -f\"","title":"MacVim"},{"location":"recipes/#ia-writer","text":"On OS X, you can use the fabulous iA Writer to write entries. Configure your jrnl.yaml like this: editor: \"open -b pro.writer.mac -Wn\" What does this do? open -b ... opens a file using the application identified by the bundle identifier (a unique string for every app out there). -Wn tells the application to wait until it's closed before passing back control, and to use a new instance of the application. If the pro.writer.mac bundle identifier is not found on your system, you can find the right string to use by inspecting iA Writer's Info.plist file in your shell: grep -A 1 CFBundleIdentifier /Applications/iA\\ Writer.app/Contents/Info.plist","title":"iA Writer"},{"location":"recipes/#notepad-on-windows","text":"To set Notepad++ as your editor, edit the jrnl config file ( jrnl.yaml ) like this: editor: \"C:\\\\Program Files (x86)\\\\Notepad++\\\\notepad++.exe -multiInst -nosession\" The double backslashes are needed so jrnl can read the file path correctly. The -multiInst -nosession options will cause jrnl to open its own Notepad++ window.","title":"Notepad++ on Windows"},{"location":"recipes/#visual-studio-code","text":"To set Visual Studo Code as your editor on Linux, edit jrnl.yaml like this: editor: \"/usr/bin/code --wait\" The --wait argument tells VS Code to wait for files to be written out before handing back control to jrnl. On MacOS you will need to add VS Code to your PATH. You can do that by adding: export PATH=\"\\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\" to your .bash_profile , or by running the Install 'code' command in PATH command from the command pallet in VS Code. Then you can add: editor: \"code --wait\" to jrnl.yaml . See also the Visual Studio Code documentation","title":"Visual Studio Code"},{"location":"usage/","text":"Basic Usage jrnl has two modes: composing and viewing . Basically, whenever you don't supply any arguments that start with a dash or double-dash, you're in composing mode, meaning you can write your entry on the command line or an editor of your choice. We intentionally break a convention on command line arguments: all arguments starting with a single dash will filter your journal before viewing it, and can be combined arbitrarily. Arguments with a double dash will control how your journal is displayed or exported and are mutually exclusive (ie. you can only specify one way to display or export your journal at a time). Listing Journals You can list the journals accessible by jrnl jrnl -ls The journals displayed correspond to those specified in the jrnl configuration file. Composing Entries Composing mode is entered by either starting jrnl without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. Note Most shell contains a certain number of reserved characters, such as # and * . Unbalanced quotes, parenthesis, and so on will also get into the way of your editing. For writing longer entries, just enter jrnl and hit return . Only then enter the text of your journal entry. Alternatively, use an external editor ). You can also import an entry directly from a file jrnl < my_entry.txt Smart timestamps Timestamps that work: at 6am yesterday last monday sunday at noon 2 march 2012 7 apr 5/20/1998 at 23:42 Starring entries To mark an entry as a favourite, simply \"star\" it jrnl last sunday *: Best day of my life. If you don't want to add a date (ie. your entry will be dated as now), The following options are equivalent: jrnl *: Best day of my life. jrnl *Best day of my life. jrnl Best day of my life.* Note Just make sure that the asterisk sign is not surrounded by whitespaces, e.g. jrnl Best day of my life! * will not work (the reason being that the * sign has a special meaning on most shells). Viewing jrnl -n 10 will list you the ten latest entries (if you're lazy, jrnl -10 will do the same), jrnl -from \"last year\" -until march everything that happened from the start of last year to the start of last march. To only see your favourite entries, use jrnl -starred Using Tags Keep track of people, projects or locations, by tagging them with an @ in your entries jrnl Had a wonderful day on the @beach with @Tom and @Anna. You can filter your journal entries just like this: jrnl @pinkie @WorldDomination Will print all entries in which either @pinkie or @WorldDomination occurred. jrnl -n 5 -and @pineapple @lubricant the last five entries containing both @pineapple and @lubricant . You can change which symbols you'd like to use for tagging in the configuration. Note jrnl @pinkie @WorldDomination will switch to viewing mode because although no command line arguments are given, all the input strings look like tags - jrnl will assume you want to filter by tag. Editing older entries You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an editor configured in your journal configuration file (see advanced usage ) jrnl -until 1950 @texas -and @history --edit Will open your editor with all entries tagged with @texas and @history before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated. Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with jrnl work -n 1 --edit . In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor. You can also use this feature for deleting entries from your journal jrnl @girlfriend -until 'june 2012' --edit Just select all text, press delete, and everything is gone...","title":"Basic Usage"},{"location":"usage/#basic-usage","text":"jrnl has two modes: composing and viewing . Basically, whenever you don't supply any arguments that start with a dash or double-dash, you're in composing mode, meaning you can write your entry on the command line or an editor of your choice. We intentionally break a convention on command line arguments: all arguments starting with a single dash will filter your journal before viewing it, and can be combined arbitrarily. Arguments with a double dash will control how your journal is displayed or exported and are mutually exclusive (ie. you can only specify one way to display or export your journal at a time).","title":"Basic Usage"},{"location":"usage/#listing-journals","text":"You can list the journals accessible by jrnl jrnl -ls The journals displayed correspond to those specified in the jrnl configuration file.","title":"Listing Journals"},{"location":"usage/#composing-entries","text":"Composing mode is entered by either starting jrnl without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. Note Most shell contains a certain number of reserved characters, such as # and * . Unbalanced quotes, parenthesis, and so on will also get into the way of your editing. For writing longer entries, just enter jrnl and hit return . Only then enter the text of your journal entry. Alternatively, use an external editor ). You can also import an entry directly from a file jrnl < my_entry.txt","title":"Composing Entries"},{"location":"usage/#smart-timestamps","text":"Timestamps that work: at 6am yesterday last monday sunday at noon 2 march 2012 7 apr 5/20/1998 at 23:42","title":"Smart timestamps"},{"location":"usage/#starring-entries","text":"To mark an entry as a favourite, simply \"star\" it jrnl last sunday *: Best day of my life. If you don't want to add a date (ie. your entry will be dated as now), The following options are equivalent: jrnl *: Best day of my life. jrnl *Best day of my life. jrnl Best day of my life.* Note Just make sure that the asterisk sign is not surrounded by whitespaces, e.g. jrnl Best day of my life! * will not work (the reason being that the * sign has a special meaning on most shells).","title":"Starring entries"},{"location":"usage/#viewing","text":"jrnl -n 10 will list you the ten latest entries (if you're lazy, jrnl -10 will do the same), jrnl -from \"last year\" -until march everything that happened from the start of last year to the start of last march. To only see your favourite entries, use jrnl -starred","title":"Viewing"},{"location":"usage/#using-tags","text":"Keep track of people, projects or locations, by tagging them with an @ in your entries jrnl Had a wonderful day on the @beach with @Tom and @Anna. You can filter your journal entries just like this: jrnl @pinkie @WorldDomination Will print all entries in which either @pinkie or @WorldDomination occurred. jrnl -n 5 -and @pineapple @lubricant the last five entries containing both @pineapple and @lubricant . You can change which symbols you'd like to use for tagging in the configuration. Note jrnl @pinkie @WorldDomination will switch to viewing mode because although no command line arguments are given, all the input strings look like tags - jrnl will assume you want to filter by tag.","title":"Using Tags"},{"location":"usage/#editing-older-entries","text":"You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an editor configured in your journal configuration file (see advanced usage ) jrnl -until 1950 @texas -and @history --edit Will open your editor with all entries tagged with @texas and @history before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated. Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with jrnl work -n 1 --edit . In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor. You can also use this feature for deleting entries from your journal jrnl @girlfriend -until 'june 2012' --edit Just select all text, press delete, and everything is gone...","title":"Editing older entries"}]} \ No newline at end of file +{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"advanced/","text":"Advanced Usage Configuration File You can configure the way jrnl behaves in a configuration file. By default, this is ~/.config/jrnl/jrnl.yaml . If you have the XDG_CONFIG_HOME variable set, the configuration file will be saved as $XDG_CONFIG_HOME/jrnl/jrnl.yaml . Note On Windows, the configuration file is typically found at %USERPROFILE%\\.config\\jrnl\\jrnl.yaml . The configuration file is a YAML file with the following options and can be edited with a plain text editor. Note Backup your config file before editing. Changes to the config file have destructive effects on your journal! journals paths to your journal files editor if set, executes this command to launch an external editor for writing your entries, e.g. vim . Some editors require special options to work properly, see FAQ for details. encrypt if true , encrypts your journal using AES. tagsymbols Symbols to be interpreted as tags. (See note below) default_hour and default_minute if you supply a date, such as last thursday , but no specific time, the entry will be created at this time timeformat how to format the timestamps in your journal, see the python docs for reference highlight if true , tags will be highlighted in cyan. linewrap controls the width of the output. Set to false if you don't want to wrap long lines. Note Although it seems intuitive to use the # character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type jrnl Implemented endless scrolling on the #frontend of our website. your bash will chop off everything after the # before passing it to jrnl . To avoid this, wrap your input into quotation marks like this: jrnl \"Implemented endless scrolling on the #frontend of our website.\" Or use the built-in prompt or an external editor to compose your entries. Multiple journal files You can configure jrnl to use with multiple journals (eg. private and work ) by defining more journals in your jrnl.yaml , for example: journals: default: ~\\journal.txt work: ~\\work.txt The default journal gets created the first time you start jrnl Now you can access the work journal by using jrnl work instead of jrnl , eg. jrnl work at 10am: Meeting with @Steve jrnl work -n 3 will both use ~/work.txt , while jrnl -n 3 will display the last three entries from ~/journal.txt (and so does jrnl default -n 3 ). You can also override the default options for each individual journal. If your jrnl.yaml looks like this: encrypt: false journals: default: ~/journal.txt work: journal: ~/work.txt encrypt: true food: ~/my_recipes.txt Your default and your food journals won't be encrypted, however your work journal will! You can override all options that are present at the top level of jrnl.yaml , just make sure that at the very least you specify a journal: ... key that points to the journal file of that journal. Note Changing encrypt to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal is encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load. Known Issues Unicode on Windows The Windows shell prior to Windows 7 has issues with unicode encoding. To use non-ascii characters, first tweak Python to recognize the encoding by adding 'cp65001': 'utf_8' , to Lib/encoding/aliases.py . Then, change the codepage with chcp 1252 before using jrnl . (Related issue: #486 )","title":"Advanced Usage"},{"location":"advanced/#advanced-usage","text":"","title":"Advanced Usage"},{"location":"advanced/#configuration-file","text":"You can configure the way jrnl behaves in a configuration file. By default, this is ~/.config/jrnl/jrnl.yaml . If you have the XDG_CONFIG_HOME variable set, the configuration file will be saved as $XDG_CONFIG_HOME/jrnl/jrnl.yaml . Note On Windows, the configuration file is typically found at %USERPROFILE%\\.config\\jrnl\\jrnl.yaml . The configuration file is a YAML file with the following options and can be edited with a plain text editor. Note Backup your config file before editing. Changes to the config file have destructive effects on your journal! journals paths to your journal files editor if set, executes this command to launch an external editor for writing your entries, e.g. vim . Some editors require special options to work properly, see FAQ for details. encrypt if true , encrypts your journal using AES. tagsymbols Symbols to be interpreted as tags. (See note below) default_hour and default_minute if you supply a date, such as last thursday , but no specific time, the entry will be created at this time timeformat how to format the timestamps in your journal, see the python docs for reference highlight if true , tags will be highlighted in cyan. linewrap controls the width of the output. Set to false if you don't want to wrap long lines. Note Although it seems intuitive to use the # character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type jrnl Implemented endless scrolling on the #frontend of our website. your bash will chop off everything after the # before passing it to jrnl . To avoid this, wrap your input into quotation marks like this: jrnl \"Implemented endless scrolling on the #frontend of our website.\" Or use the built-in prompt or an external editor to compose your entries.","title":"Configuration File"},{"location":"advanced/#multiple-journal-files","text":"You can configure jrnl to use with multiple journals (eg. private and work ) by defining more journals in your jrnl.yaml , for example: journals: default: ~\\journal.txt work: ~\\work.txt The default journal gets created the first time you start jrnl Now you can access the work journal by using jrnl work instead of jrnl , eg. jrnl work at 10am: Meeting with @Steve jrnl work -n 3 will both use ~/work.txt , while jrnl -n 3 will display the last three entries from ~/journal.txt (and so does jrnl default -n 3 ). You can also override the default options for each individual journal. If your jrnl.yaml looks like this: encrypt: false journals: default: ~/journal.txt work: journal: ~/work.txt encrypt: true food: ~/my_recipes.txt Your default and your food journals won't be encrypted, however your work journal will! You can override all options that are present at the top level of jrnl.yaml , just make sure that at the very least you specify a journal: ... key that points to the journal file of that journal. Note Changing encrypt to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal is encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load.","title":"Multiple journal files"},{"location":"advanced/#known-issues","text":"","title":"Known Issues"},{"location":"advanced/#unicode-on-windows","text":"The Windows shell prior to Windows 7 has issues with unicode encoding. To use non-ascii characters, first tweak Python to recognize the encoding by adding 'cp65001': 'utf_8' , to Lib/encoding/aliases.py . Then, change the codepage with chcp 1252 before using jrnl . (Related issue: #486 )","title":"Unicode on Windows"},{"location":"encryption/","text":"Encryption Encrypting and decrypting If you don\u2019t choose to encrypt your file when you run jrnl for the first time, you can encrypt your existing journal file or change its password using this: jrnl --encrypt If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, jrnl --decrypt will replace your encrypted journal file with a journal in plain text. You can also specify a filename, i.e. jrnl --decrypt plain_text_copy.txt , to leave your original file untouched. Storing passwords in your keychain Whenever you encrypt your journal, you are asked whether you want to store the encryption password in your keychain. If you do this, you won\u2019t have to enter your password every time you want to write or read your journal. If you don\u2019t initially store the password in the keychain but decide to do so at a later point \u2013 or maybe want to store it on one computer but not on another \u2013 you can simply run jrnl --encrypt on an encrypted journal and use the same password again. A note on security While jrnl follows best practises, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history \u2013 it\u2019s meant to keep journals secure in transit, for example when storing it on an untrusted services such as Dropbox. If you\u2019re concerned about security, disable history logging for journal in your .bashrc : HISTIGNORE=\"$HISTIGNORE:jrnl *\" If you are using zsh instead of bash, you can get the same behaviour by adding this to your zshrc : setopt HIST_IGNORE_SPACE alias jrnl=\" jrnl\" The fish shell does not support automatically preventing logging like this. To prevent jrnl commands being logged by fish, you must make sure to type a space before every jrnl command you enter. To delete existing jrnl commands from fish\u2019s history, run history delete --prefix 'jrnl ' . Manual decryption Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. Here\u2019s a Python script that you can use to decrypt your journal: #!/usr/bin/env python3 import argparse from Crypto.Cipher import AES import getpass import hashlib import sys parser = argparse.ArgumentParser() parser.add_argument(\"filepath\", help=\"journal file to decrypt\") args = parser.parse_args() pwd = getpass.getpass() key = hashlib.sha256(pwd.encode('utf-8')).digest() with open(args.filepath, 'rb') as f: ciphertext = f.read() crypto = AES.new(key, AES.MODE_CBC, ciphertext[:16]) plain = crypto.decrypt(ciphertext[16:]) plain = plain.strip(plain[-1:]) plain = plain.decode(\"utf-8\") print(plain)","title":"Encryption"},{"location":"encryption/#encryption","text":"","title":"Encryption"},{"location":"encryption/#encrypting-and-decrypting","text":"If you don\u2019t choose to encrypt your file when you run jrnl for the first time, you can encrypt your existing journal file or change its password using this: jrnl --encrypt If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, jrnl --decrypt will replace your encrypted journal file with a journal in plain text. You can also specify a filename, i.e. jrnl --decrypt plain_text_copy.txt , to leave your original file untouched.","title":"Encrypting and decrypting"},{"location":"encryption/#storing-passwords-in-your-keychain","text":"Whenever you encrypt your journal, you are asked whether you want to store the encryption password in your keychain. If you do this, you won\u2019t have to enter your password every time you want to write or read your journal. If you don\u2019t initially store the password in the keychain but decide to do so at a later point \u2013 or maybe want to store it on one computer but not on another \u2013 you can simply run jrnl --encrypt on an encrypted journal and use the same password again.","title":"Storing passwords in your keychain"},{"location":"encryption/#a-note-on-security","text":"While jrnl follows best practises, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history \u2013 it\u2019s meant to keep journals secure in transit, for example when storing it on an untrusted services such as Dropbox. If you\u2019re concerned about security, disable history logging for journal in your .bashrc : HISTIGNORE=\"$HISTIGNORE:jrnl *\" If you are using zsh instead of bash, you can get the same behaviour by adding this to your zshrc : setopt HIST_IGNORE_SPACE alias jrnl=\" jrnl\" The fish shell does not support automatically preventing logging like this. To prevent jrnl commands being logged by fish, you must make sure to type a space before every jrnl command you enter. To delete existing jrnl commands from fish\u2019s history, run history delete --prefix 'jrnl ' .","title":"A note on security"},{"location":"encryption/#manual-decryption","text":"Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. Here\u2019s a Python script that you can use to decrypt your journal: #!/usr/bin/env python3 import argparse from Crypto.Cipher import AES import getpass import hashlib import sys parser = argparse.ArgumentParser() parser.add_argument(\"filepath\", help=\"journal file to decrypt\") args = parser.parse_args() pwd = getpass.getpass() key = hashlib.sha256(pwd.encode('utf-8')).digest() with open(args.filepath, 'rb') as f: ciphertext = f.read() crypto = AES.new(key, AES.MODE_CBC, ciphertext[:16]) plain = crypto.decrypt(ciphertext[16:]) plain = plain.strip(plain[-1:]) plain = plain.decode(\"utf-8\") print(plain)","title":"Manual decryption"},{"location":"export/","text":"Import and Export Tag export With jrnl --tags you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one. List of all entries jrnl --short Will only display the date and title of each entry. JSON export Can do jrnl --export json Why not create a beautiful timeline of your journal? Markdown export Use jrnl --export markdown Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice. Text export jrnl --export text Pretty-prints your entire journal. Export to files You can specify the output file of your exported journal using the -o argument jrnl --export md -o journal.md The above command will generate a file named journal.md . If the -o argument is a directory, jrnl will export each entry into an individual file jrnl --export json -o my_entries/ The contents of my\\_entries/ will then look like this: my_entries/ |- 2013_06_03_a-beautiful-day.json |- 2013_06_07_dinner-with-gabriel.json |- ...","title":"Import and Export"},{"location":"export/#import-and-export","text":"","title":"Import and Export"},{"location":"export/#tag-export","text":"With jrnl --tags you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one.","title":"Tag export"},{"location":"export/#list-of-all-entries","text":"jrnl --short Will only display the date and title of each entry.","title":"List of all entries"},{"location":"export/#json-export","text":"Can do jrnl --export json Why not create a beautiful timeline of your journal?","title":"JSON export"},{"location":"export/#markdown-export","text":"Use jrnl --export markdown Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.","title":"Markdown export"},{"location":"export/#text-export","text":"jrnl --export text Pretty-prints your entire journal.","title":"Text export"},{"location":"export/#export-to-files","text":"You can specify the output file of your exported journal using the -o argument jrnl --export md -o journal.md The above command will generate a file named journal.md . If the -o argument is a directory, jrnl will export each entry into an individual file jrnl --export json -o my_entries/ The contents of my\\_entries/ will then look like this: my_entries/ |- 2013_06_03_a-beautiful-day.json |- 2013_06_07_dinner-with-gabriel.json |- ...","title":"Export to files"},{"location":"installation/","text":"Getting started Installation On OS X, the easiest way to install jrnl is using Homebrew brew install jrnl On other platforms, install jrnl using pip pip install jrnl The first time you run jrnl you will be asked where your journal file should be created and whether you wish to encrypt it. Quickstart To make a new entry, just type jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book. and hit return. yesterday: will be interpreted as a time stamp. Everything until the first sentence mark ( .?!: ) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this: 2012-03-29 09:00 Called in sick. Used the time to clean the house and spent 4h on writing my book. If you just call jrnl , you will be prompted to compose your entry - but you can also configure jrnl to use your external editor.","title":"Quickstart"},{"location":"installation/#getting-started","text":"","title":"Getting started"},{"location":"installation/#installation","text":"On OS X, the easiest way to install jrnl is using Homebrew brew install jrnl On other platforms, install jrnl using pip pip install jrnl The first time you run jrnl you will be asked where your journal file should be created and whether you wish to encrypt it.","title":"Installation"},{"location":"installation/#quickstart","text":"To make a new entry, just type jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book. and hit return. yesterday: will be interpreted as a time stamp. Everything until the first sentence mark ( .?!: ) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this: 2012-03-29 09:00 Called in sick. Used the time to clean the house and spent 4h on writing my book. If you just call jrnl , you will be prompted to compose your entry - but you can also configure jrnl to use your external editor.","title":"Quickstart"},{"location":"overview/","text":"Overview What is jrnl? jrnl is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. Optionally, your journal can be encrypted using the 256-bit AES . Why keep a journal? Journals aren't just for people who have too much time on their summer vacation. A journal helps you to keep track of the things you get done and how you did them. Your imagination may be limitless, but your memory isn't. For personal use, make it a good habit to write at least 20 words a day. Just to reflect what made this day special, why you haven't wasted it. For professional use, consider a text-based journal to be the perfect complement to your GTD todo list - a documentation of what and how you've done it. Or use it as a quick way to keep a change log. Or use it to keep a lab book.","title":"Overview"},{"location":"overview/#overview","text":"","title":"Overview"},{"location":"overview/#what-is-jrnl","text":"jrnl is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. Optionally, your journal can be encrypted using the 256-bit AES .","title":"What is jrnl?"},{"location":"overview/#why-keep-a-journal","text":"Journals aren't just for people who have too much time on their summer vacation. A journal helps you to keep track of the things you get done and how you did them. Your imagination may be limitless, but your memory isn't. For personal use, make it a good habit to write at least 20 words a day. Just to reflect what made this day special, why you haven't wasted it. For professional use, consider a text-based journal to be the perfect complement to your GTD todo list - a documentation of what and how you've done it. Or use it as a quick way to keep a change log. Or use it to keep a lab book.","title":"Why keep a journal?"},{"location":"recipes/","text":"FAQ Recipes Co-occurrence of tags If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run jrnl @alberto --tags | grep @melo And will get something like @melo: 9 , meaning there are 9 entries where both @alberto and @melo are tagged. How does this work? First, jrnl @alberto will filter the journal to only entries containing the tag @alberto , and then the --tags option will print out how often each tag occurred in this filtered journal. Finally, we pipe this to grep which will only display the line containing @melo . Combining filters You can do things like jrnl @fixed -starred -n 10 -until \"jan 2013\" --short To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with @fixed . Statistics How much did I write last year? jrnl -from \"jan 1 2013\" -until \"dec 31 2013\" | wc -w Will give you the number of words you wrote in 2013. How long is my average entry? expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l) This will first get the total number of words in the journal and divide it by the number of entries (this works because jrnl --short will print exactly one line per entry). Importing older files If you want to import a file as an entry to jrnl, you can just do jrnl < entry.ext . But what if you want the modification date of the file to be the date of the entry in jrnl? Try this echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl The first part will format the modification date of entry.txt , and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your .bashrc or .bash_profile jrnlimport () { echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' $1` `cat $1` | jrnl } Using templates Say you always want to use the same template for creating new entries. If you have an external editor set up, you can use this: jrnl < my_template.txt jrnl -1 --edit Another nice solution that allows you to define individual prompts comes from Jacobo de Vera : function log_question() { echo $1 read jrnl today: ${1}. $REPLY } log_question 'What did I achieve today?' log_question 'What did I make progress with?' Display random entry You can use this to select one title at random and then display the whole entry. The invocation of cut needs to match the format of the timestamp. For timestamps that have a space between data and time components, select fields 1 and 2 as shown. For timestamps that have no whitespace, select only field 1. jrnl -on \"$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)\" External editors To use external editors for writing and editing journal entries, set them up in your jrnl.yaml (see advanced usage for details). Generally, after writing an entry, you will have to save and close the file to save the changes to jrnl. Sublime Text To use Sublime Text, install the command line tools for Sublime Text and configure your jrnl.yaml like this: editor: \"subl -w\" Note the -w flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal. MacVim Similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is -f : editor: \"mvim -f\" iA Writer On OS X, you can use the fabulous iA Writer to write entries. Configure your jrnl.yaml like this: editor: \"open -b pro.writer.mac -Wn\" What does this do? open -b ... opens a file using the application identified by the bundle identifier (a unique string for every app out there). -Wn tells the application to wait until it's closed before passing back control, and to use a new instance of the application. If the pro.writer.mac bundle identifier is not found on your system, you can find the right string to use by inspecting iA Writer's Info.plist file in your shell: grep -A 1 CFBundleIdentifier /Applications/iA\\ Writer.app/Contents/Info.plist Notepad++ on Windows To set Notepad++ as your editor, edit the jrnl config file ( jrnl.yaml ) like this: editor: \"C:\\\\Program Files (x86)\\\\Notepad++\\\\notepad++.exe -multiInst -nosession\" The double backslashes are needed so jrnl can read the file path correctly. The -multiInst -nosession options will cause jrnl to open its own Notepad++ window. Visual Studio Code To set Visual Studo Code as your editor on Linux, edit jrnl.yaml like this: editor: \"/usr/bin/code --wait\" The --wait argument tells VS Code to wait for files to be written out before handing back control to jrnl. On MacOS you will need to add VS Code to your PATH. You can do that by adding: export PATH=\"\\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\" to your .bash_profile , or by running the Install 'code' command in PATH command from the command pallet in VS Code. Then you can add: editor: \"code --wait\" to jrnl.yaml . See also the Visual Studio Code documentation","title":"Recipes"},{"location":"recipes/#faq","text":"","title":"FAQ"},{"location":"recipes/#recipes","text":"","title":"Recipes"},{"location":"recipes/#co-occurrence-of-tags","text":"If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run jrnl @alberto --tags | grep @melo And will get something like @melo: 9 , meaning there are 9 entries where both @alberto and @melo are tagged. How does this work? First, jrnl @alberto will filter the journal to only entries containing the tag @alberto , and then the --tags option will print out how often each tag occurred in this filtered journal. Finally, we pipe this to grep which will only display the line containing @melo .","title":"Co-occurrence of tags"},{"location":"recipes/#combining-filters","text":"You can do things like jrnl @fixed -starred -n 10 -until \"jan 2013\" --short To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with @fixed .","title":"Combining filters"},{"location":"recipes/#statistics","text":"How much did I write last year? jrnl -from \"jan 1 2013\" -until \"dec 31 2013\" | wc -w Will give you the number of words you wrote in 2013. How long is my average entry? expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l) This will first get the total number of words in the journal and divide it by the number of entries (this works because jrnl --short will print exactly one line per entry).","title":"Statistics"},{"location":"recipes/#importing-older-files","text":"If you want to import a file as an entry to jrnl, you can just do jrnl < entry.ext . But what if you want the modification date of the file to be the date of the entry in jrnl? Try this echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl The first part will format the modification date of entry.txt , and then combine it with the contents of the file before piping it to jrnl. If you do that often, consider creating a function in your .bashrc or .bash_profile jrnlimport () { echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' $1` `cat $1` | jrnl }","title":"Importing older files"},{"location":"recipes/#using-templates","text":"Say you always want to use the same template for creating new entries. If you have an external editor set up, you can use this: jrnl < my_template.txt jrnl -1 --edit Another nice solution that allows you to define individual prompts comes from Jacobo de Vera : function log_question() { echo $1 read jrnl today: ${1}. $REPLY } log_question 'What did I achieve today?' log_question 'What did I make progress with?'","title":"Using templates"},{"location":"recipes/#display-random-entry","text":"You can use this to select one title at random and then display the whole entry. The invocation of cut needs to match the format of the timestamp. For timestamps that have a space between data and time components, select fields 1 and 2 as shown. For timestamps that have no whitespace, select only field 1. jrnl -on \"$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)\"","title":"Display random entry"},{"location":"recipes/#external-editors","text":"To use external editors for writing and editing journal entries, set them up in your jrnl.yaml (see advanced usage for details). Generally, after writing an entry, you will have to save and close the file to save the changes to jrnl.","title":"External editors"},{"location":"recipes/#sublime-text","text":"To use Sublime Text, install the command line tools for Sublime Text and configure your jrnl.yaml like this: editor: \"subl -w\" Note the -w flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal.","title":"Sublime Text"},{"location":"recipes/#macvim","text":"Similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is -f : editor: \"mvim -f\"","title":"MacVim"},{"location":"recipes/#ia-writer","text":"On OS X, you can use the fabulous iA Writer to write entries. Configure your jrnl.yaml like this: editor: \"open -b pro.writer.mac -Wn\" What does this do? open -b ... opens a file using the application identified by the bundle identifier (a unique string for every app out there). -Wn tells the application to wait until it's closed before passing back control, and to use a new instance of the application. If the pro.writer.mac bundle identifier is not found on your system, you can find the right string to use by inspecting iA Writer's Info.plist file in your shell: grep -A 1 CFBundleIdentifier /Applications/iA\\ Writer.app/Contents/Info.plist","title":"iA Writer"},{"location":"recipes/#notepad-on-windows","text":"To set Notepad++ as your editor, edit the jrnl config file ( jrnl.yaml ) like this: editor: \"C:\\\\Program Files (x86)\\\\Notepad++\\\\notepad++.exe -multiInst -nosession\" The double backslashes are needed so jrnl can read the file path correctly. The -multiInst -nosession options will cause jrnl to open its own Notepad++ window.","title":"Notepad++ on Windows"},{"location":"recipes/#visual-studio-code","text":"To set Visual Studo Code as your editor on Linux, edit jrnl.yaml like this: editor: \"/usr/bin/code --wait\" The --wait argument tells VS Code to wait for files to be written out before handing back control to jrnl. On MacOS you will need to add VS Code to your PATH. You can do that by adding: export PATH=\"\\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\" to your .bash_profile , or by running the Install 'code' command in PATH command from the command pallet in VS Code. Then you can add: editor: \"code --wait\" to jrnl.yaml . See also the Visual Studio Code documentation","title":"Visual Studio Code"},{"location":"usage/","text":"Basic Usage jrnl has two modes: composing and viewing . Basically, whenever you don't supply any arguments that start with a dash or double-dash, you're in composing mode, meaning you can write your entry on the command line or an editor of your choice. We intentionally break a convention on command line arguments: all arguments starting with a single dash will filter your journal before viewing it, and can be combined arbitrarily. Arguments with a double dash will control how your journal is displayed or exported and are mutually exclusive (ie. you can only specify one way to display or export your journal at a time). Listing Journals You can list the journals accessible by jrnl jrnl -ls The journals displayed correspond to those specified in the jrnl configuration file. Composing Entries Composing mode is entered by either starting jrnl without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. Note Most shell contains a certain number of reserved characters, such as # and * . Unbalanced quotes, parenthesis, and so on will also get into the way of your editing. For writing longer entries, just enter jrnl and hit return . Only then enter the text of your journal entry. Alternatively, use an external editor ). You can also import an entry directly from a file jrnl < my_entry.txt Smart timestamps Timestamps that work: at 6am yesterday last monday sunday at noon 2 march 2012 7 apr 5/20/1998 at 23:42 Starring entries To mark an entry as a favourite, simply \"star\" it jrnl last sunday *: Best day of my life. If you don't want to add a date (ie. your entry will be dated as now), The following options are equivalent: jrnl *: Best day of my life. jrnl *Best day of my life. jrnl Best day of my life.* Note Just make sure that the asterisk sign is not surrounded by whitespaces, e.g. jrnl Best day of my life! * will not work (the reason being that the * sign has a special meaning on most shells). Viewing jrnl -n 10 will list you the ten latest entries (if you're lazy, jrnl -10 will do the same), jrnl -from \"last year\" -until march everything that happened from the start of last year to the start of last march. To only see your favourite entries, use jrnl -starred Using Tags Keep track of people, projects or locations, by tagging them with an @ in your entries jrnl Had a wonderful day on the @beach with @Tom and @Anna. You can filter your journal entries just like this: jrnl @pinkie @WorldDomination Will print all entries in which either @pinkie or @WorldDomination occurred. jrnl -n 5 -and @pineapple @lubricant the last five entries containing both @pineapple and @lubricant . You can change which symbols you'd like to use for tagging in the configuration. Note jrnl @pinkie @WorldDomination will switch to viewing mode because although no command line arguments are given, all the input strings look like tags - jrnl will assume you want to filter by tag. Editing older entries You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an editor configured in your journal configuration file (see advanced usage ) jrnl -until 1950 @texas -and @history --edit Will open your editor with all entries tagged with @texas and @history before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated. Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with jrnl work -n 1 --edit . In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor. You can also use this feature for deleting entries from your journal jrnl @girlfriend -until 'june 2012' --edit Just select all text, press delete, and everything is gone...","title":"Basic Usage"},{"location":"usage/#basic-usage","text":"jrnl has two modes: composing and viewing . Basically, whenever you don't supply any arguments that start with a dash or double-dash, you're in composing mode, meaning you can write your entry on the command line or an editor of your choice. We intentionally break a convention on command line arguments: all arguments starting with a single dash will filter your journal before viewing it, and can be combined arbitrarily. Arguments with a double dash will control how your journal is displayed or exported and are mutually exclusive (ie. you can only specify one way to display or export your journal at a time).","title":"Basic Usage"},{"location":"usage/#listing-journals","text":"You can list the journals accessible by jrnl jrnl -ls The journals displayed correspond to those specified in the jrnl configuration file.","title":"Listing Journals"},{"location":"usage/#composing-entries","text":"Composing mode is entered by either starting jrnl without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. Note Most shell contains a certain number of reserved characters, such as # and * . Unbalanced quotes, parenthesis, and so on will also get into the way of your editing. For writing longer entries, just enter jrnl and hit return . Only then enter the text of your journal entry. Alternatively, use an external editor ). You can also import an entry directly from a file jrnl < my_entry.txt","title":"Composing Entries"},{"location":"usage/#smart-timestamps","text":"Timestamps that work: at 6am yesterday last monday sunday at noon 2 march 2012 7 apr 5/20/1998 at 23:42","title":"Smart timestamps"},{"location":"usage/#starring-entries","text":"To mark an entry as a favourite, simply \"star\" it jrnl last sunday *: Best day of my life. If you don't want to add a date (ie. your entry will be dated as now), The following options are equivalent: jrnl *: Best day of my life. jrnl *Best day of my life. jrnl Best day of my life.* Note Just make sure that the asterisk sign is not surrounded by whitespaces, e.g. jrnl Best day of my life! * will not work (the reason being that the * sign has a special meaning on most shells).","title":"Starring entries"},{"location":"usage/#viewing","text":"jrnl -n 10 will list you the ten latest entries (if you're lazy, jrnl -10 will do the same), jrnl -from \"last year\" -until march everything that happened from the start of last year to the start of last march. To only see your favourite entries, use jrnl -starred","title":"Viewing"},{"location":"usage/#using-tags","text":"Keep track of people, projects or locations, by tagging them with an @ in your entries jrnl Had a wonderful day on the @beach with @Tom and @Anna. You can filter your journal entries just like this: jrnl @pinkie @WorldDomination Will print all entries in which either @pinkie or @WorldDomination occurred. jrnl -n 5 -and @pineapple @lubricant the last five entries containing both @pineapple and @lubricant . You can change which symbols you'd like to use for tagging in the configuration. Note jrnl @pinkie @WorldDomination will switch to viewing mode because although no command line arguments are given, all the input strings look like tags - jrnl will assume you want to filter by tag.","title":"Using Tags"},{"location":"usage/#editing-older-entries","text":"You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an editor configured in your journal configuration file (see advanced usage ) jrnl -until 1950 @texas -and @history --edit Will open your editor with all entries tagged with @texas and @history before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated. Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with jrnl work -n 1 --edit . In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor. You can also use this feature for deleting entries from your journal jrnl @girlfriend -until 'june 2012' --edit Just select all text, press delete, and everything is gone...","title":"Editing older entries"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 0697e640..4e075ff6 100755 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,37 +2,37 @@ None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily None - 2019-11-30 + 2020-01-09 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 4fbf208b50c523671b13bd549f8d9a689011bfd6..16af83e868961ee81d41e152b5101a13723cdf0a 100755 GIT binary patch literal 199 zcmV;&06702iwFoE0~lTc|8r?{Wo=<_E_iKh0PT}85`r)gMSD(>Nly}}#0jCZw9*4) zLWInO1hY}}_69-6BUrG_{{8!BU$wk>3>MvW0OMVa3&JqcPWjfjuEyunA>ZLfWc(H^ z=!jC-L5=$u$33OfG!ZaS4{`+JLq|dNX#l#Kl#vRH45gY6EDCY!l{k8*Ii1zVln@8s zijtKqXGPAcv|hb6qI&5%eF^$1T50T)(;sJ{&@W~KZovNrzFT@K@dBceAG?GD007f8 BTM_^O literal 199 zcmV;&06702iwFo>%;H@F|8r?{Wo=<_E_iKh0PT}862c%5Mf;qBp$`OYj6+CgX{85X z2qw%Bh%6ety~ISvBUogc{rmUNzG`{>=q*s4tq++aU@`(?&Sc)hn9ls(g1WZX+cUXGL&jMFe}8ZSK{cM=5$gYQ$p;0 zBQ^yqbH?&*k=Bd1L{ukTt1m%cMI()Ua{A-U6#B)iz!mu4z;{beC0?)YZ(M`}0086E BU7Y{` diff --git a/usage/index.html b/usage/index.html index 5b51e60f..0407ada2 100755 --- a/usage/index.html +++ b/usage/index.html @@ -169,13 +169,13 @@ editor -- or by just writing an entry on the prompt, such as

Note

-

Most shell contains a certain number of reserved characters, such as # and *. Unbalanced quotes, parenthesis, and so on will also get into the way of your editing. For writing longer entries, just enter jrnl and hit return. Only then enter the text of your journal entry. Alternatively, use an external editor <advanced>).

+

You can also import an entry directly from a file

jrnl < my_entry.txt
 
@@ -205,10 +205,10 @@ The following options are equivalent:

Note

-

Just make sure that the asterisk sign is not surrounded by whitespaces, e.g. jrnl Best day of my life! * will not work (the reason being that the * sign has a special meaning on most shells).

+

Viewing

jrnl -n 10
 
@@ -243,10 +243,10 @@ You can change which symbols you'd like to use for tagging in the configuration.

Note

-

jrnl @pinkie @WorldDomination will switch to viewing mode because although no command line arguments are given, all the input strings look like tags - jrnl will assume you want to filter by tag.

+

Editing older entries

You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need