mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Version bump & new recipes
This commit is contained in:
parent
9c592cfd36
commit
be1a90db3d
3 changed files with 36 additions and 1 deletions
|
@ -4,6 +4,7 @@ Changelog
|
|||
|
||||
### 1.8 (May 22, 2014)
|
||||
|
||||
* __1.8.5__ Fixed: file names when exporting to individual files contain full year (thanks to @jdevera)
|
||||
* __1.8.4__ Improved: using external editors (thanks to @chrissexton)
|
||||
* __1.8.3__ Fixed: export to text files and improves help (thanks to @igniteflow and @mpe)
|
||||
* __1.8.2__ Better integration with environment variables (thanks to @ajaam and @matze)
|
||||
|
|
|
@ -37,6 +37,40 @@ Will give you the number of words you wrote in 2013. How long is my average entr
|
|||
|
||||
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 :doc:`external editor <advanced>` 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 <https://github.com/maebert/jrnl/issues/194#issuecomment-47402869>`_ ::
|
||||
|
||||
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?'
|
||||
|
||||
|
||||
External editors
|
||||
----------------
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line.
|
|||
from __future__ import absolute_import
|
||||
|
||||
__title__ = 'jrnl'
|
||||
__version__ = '1.8.4'
|
||||
__version__ = '1.8.5'
|
||||
__author__ = 'Manuel Ebert'
|
||||
__license__ = 'MIT License'
|
||||
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
||||
|
|
Loading…
Add table
Reference in a new issue