From 3ee749c26cdb12628c7f4b780831a7507a453666 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Tue, 22 Oct 2013 13:24:16 -1000 Subject: [PATCH] Glorious. --- README.md | 226 +------- docs/_themes/jrnl/index.html | 20 +- docs/_themes/jrnl/layout.html | 18 +- docs/_themes/jrnl/static/css/jrnl.css | 228 +++++++- docs/_themes/jrnl/static/css/main.css | 223 -------- docs/_themes/jrnl/static/flasky.css_t | 481 ----------------- docs/_themes/jrnl/static/img/favicon-152.png | Bin 0 -> 3261 bytes docs/_themes/jrnl/static/img/favicon.ico | Bin 318 -> 5558 bytes docs/_themes/jrnl/static/img/favicon.png | Bin 661 -> 0 bytes docs/_themes/jrnl/static/img/twitter.png | Bin 0 -> 1550 bytes docs/_themes/jrnl/static/js/landing.js | 4 + docs/_themes/jrnl/static/landing.svg | 160 +++++- docs/_themes/jrnl/static/less/docs.less | 139 ++++- docs/_themes/jrnl/static/less/jrnl.less | 102 +++- docs/_themes/jrnl/static/normalize.css | 527 ------------------- docs/_themes/jrnl/static/small_flask.css | 91 ---- docs/_themes/jrnl/static/sprites.css | 41 -- docs/advanced.rst | 100 ++++ docs/encryption.rst | 39 ++ docs/export.rst | 69 +++ docs/index.rst | 23 +- docs/installation.rst | 6 +- docs/overview.rst | 19 + docs/recipes.rst | 17 + 24 files changed, 886 insertions(+), 1647 deletions(-) delete mode 100755 docs/_themes/jrnl/static/css/main.css delete mode 100755 docs/_themes/jrnl/static/flasky.css_t create mode 100644 docs/_themes/jrnl/static/img/favicon-152.png delete mode 100644 docs/_themes/jrnl/static/img/favicon.png create mode 100644 docs/_themes/jrnl/static/img/twitter.png delete mode 100755 docs/_themes/jrnl/static/normalize.css delete mode 100755 docs/_themes/jrnl/static/small_flask.css delete mode 100755 docs/_themes/jrnl/static/sprites.css create mode 100644 docs/advanced.rst create mode 100644 docs/encryption.rst create mode 100644 docs/export.rst create mode 100644 docs/overview.rst create mode 100644 docs/recipes.rst diff --git a/README.md b/README.md index 77ef006f..e88c9545 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ jrnl [![Build Status](https://travis-ci.org/maebert/jrnl.png?branch=master)](https://travis-ci.org/maebert/jrnl) ==== -_For news on updates or to get help, follow [@maebert](https://twitter.com/maebert) or [submit an issue](https://github.com/maebert/jrnl/issues/new) on Github._ +_For news on updates or to get help, [read the docs](http://maebert.github.io/jrnl), follow [@maebert](https://twitter.com/maebert) or [submit an issue](https://github.com/maebert/jrnl/issues/new) on Github._ *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. @@ -39,230 +39,6 @@ Or, if you want the option to encrypt your journal, pip install jrnl[encrypted] -To install `pycrypto` as well (Note: this requires a `gcc` compiler. You can also [install PyCyrypto manually](https://www.dlitz.net/software/pycrypto/) first)). Alternatively, install _jrnl_ manually by cloning the repository: - - git clone git://github.com/maebert/jrnl.git - cd jrnl - python setup.py install - -The first time you run `jrnl` you will be asked where your journal file should be created and whether you wish to encrypt it. - -Usage ------ - -_jrnl_ has two modes: __composing__ and __viewing__. - -### Viewing: - - jrnl -n 10 - -will list you the ten latest entries, - - jrnl -from "last year" -until march - -everything that happened from the start of last year to the start of last march. If you only want to see the titles of your entries, use - - jrnl -short - -### 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. - -### Composing: - -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. - - -### Smart timestamps: - -Timestamps that work: - -* at 6am -* yesterday -* last monday -* sunday at noon -* 2 march 2012 -* 7 apr -* 5/20/1998 at 23:42 - -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. - -### JSON export - -Can do: - - jrnl --export json - -Why not create a beautiful [timeline](http://timeline.verite.co/) of your journal? - -### Markdown export - -Use: - - jrnl --export markdown - -or - - jrnl --export md - -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 - -or - - jrnl --export txt - -Prettyprints 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 - |- ... - -Encryption ----------- - -If you don't 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 - - 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 by a Journal in plain text. You can also specify a filename, ie. `jrnl --decrypt plain_text_copy.txt`, to leave your original file untouched. - - -Advanced usages --------------- - -The first time launched, _jrnl_ will create a file configuration file at `~/.jrnl_config` or, if the `XDG_CONFIG_HOME` environment variable is set, `$XDG_CONFIG_HOME/jrnl`. - -### .jrnl_config - -The configuration file is a simple JSON file with the following options. - -- `journals`: paths to your journal files -- `editor`: if set, executes this command to launch an external editor for writing your entries, e.g. `vim` or `subl -w` (note the `-w` flag to make sure _jrnl_ waits for Sublime Text to close the file before writing into the journal). -- `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](http://docs.python.org/library/time.html#time.strftime) for reference -- `highlight`: if `true`, tags will be highlighted in cyan. -- `linewrap`: controls the width of the output. Set to `0` or `false` if you don't want to wrap long lines. - -> __Note on `tagsymbols`:__ 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. - -### DayOne Integration - -Using your DayOne journal instead of a flat text file is dead simple - instead of pointing to a text file, change your `.jrnl_conf` to point to your DayOne journal. This is a folder ending with `.dayone`, and it's located at - -* `~/Library/Application Support/Day One/` by default -* `~/Dropbox/Apps/Day One/` if you're syncing with Dropbox and -* `~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/` if you're syncing with iCloud. - -Instead of all entries being in a single file, each entry will live in a separate `plist` file. You can also star entries when you write them: - - jrnl -star yesterday: Lunch with @Arthur - -### Multiple journal files - -You can configure _jrnl_ to use with multiple journals (eg. `private` and `work`) by defining more journals in your `.jrnl_config`, 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 you `.jrnl_conf` 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_conf`, just make sure that at the very least you specify a `"journal": ...` key that points to the journal file of that journal. - -### Manual decryption - -Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm. The key used for encryption is the SHA-256-hash of your password, and the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. So, to decrypt a journal file in python, run - - import hashlib, Crypto.Cipher - key = hashlib.sha256(my_password).digest() - with open("my_journal.txt") as f: - cipher = f.read() - crypto = AES.new(key, AES.MODE_CBC, iv = cipher[:16]) - plain = crypto.decrypt(cipher[16:]) - -Known Issues ------------- - -- The Windows shell prior to Windows 7 has issues with unicode encoding. If you want to use non-ascii characters, change the codepage with `chcp 1252` before using `jrnl` (Thanks to Yves Pouplard for solving this!) -- _jrnl_ relies on the `PyCrypto` package to encrypt journals, which has some known problems with installing on Windows and within virtual environments. If you have trouble installing __jrnl__, [install PyCyrypto manually](https://www.dlitz.net/software/pycrypto/) first. - - [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/maebert/jrnl/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/docs/_themes/jrnl/index.html b/docs/_themes/jrnl/index.html index 335b062e..4e5cbb94 100755 --- a/docs/_themes/jrnl/index.html +++ b/docs/_themes/jrnl/index.html @@ -6,22 +6,22 @@ - + jrnl- The Command Line Journal - - - + + - +
+ Tell your friends
-

Collect your thoughts and notes
without leaving the command line

+

Collect your thoughts and notes
without leaving the command line

@@ -30,8 +30,9 @@
@@ -74,8 +75,13 @@

Effortlessly access several journals for all parts of your life.

+ + +