jrnl/index.html
2012-04-16 14:54:42 +02:00

270 lines
10 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jrnl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Manuel Ebert">
<!-- Le styles -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/jrnl.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" href="img/favicon.png">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30926613-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body data-spy="scroll">
<a href="http://github.com/maebert/jrnl"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
<div class="container">
<div class="logo row">
<div class="span2">&nbsp;</div>
<div class="span10">&nbsp;</div>
</div>
<div class="row">
<div class="span2 navcontain">
<div class="leftlogo"></div>
<div class="sidebar-nav" id='navbar'>
<ul class="nav nav-list">
</ul>
</div>
&nbsp;
</div>
<div class="span10 content">
<h1>jrnl</h1>
<p><em>jrnl</em> 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 syncinc 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.</p>
<p>Optionally, your journal can be encrypted using AES encryption</p>
<h3>Why keep a journal?</h3>
<p>Journals aren't only for 13-year old girls and 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.</p>
<h2>In a Nutshell</h2>
<p>to make a new entry, just type</p>
<pre><code>jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.
</code></pre>
<p>and hit return. <code>yesterday:</code> will be interpreted as a timestamp. Everything until the first sentence mark (<code>.?!</code>) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this:</p>
<pre><code>2012-03-29 09:00 Called in sick.
Used the time to clean the house and spent 4h on writing my book.
</code></pre>
<p>If you just call <code>jrnl</code>, you will be prompted to compose your entry - but you can also configure <em>jrnl</em> to use your external editor.</p>
<h2>Usage</h2>
<p><em>jrnl</em> has to modes: <strong>composing</strong> and <strong>viewing</strong>. </p>
<h3>Viewing:</h3>
<pre><code>jrnl -n 10
</code></pre>
<p>will list you the ten latest entries,</p>
<pre><code>jrnl -from "last year" -to march
</code></pre>
<p>everything that happened from the start of last year to the start of last march. </p>
<h3>Using Tags:</h3>
<p>Keep track of people, projects or locations, by tagging them with an <code>@</code> in your entries:</p>
<pre><code>jrnl Had a wonderful day on the #beach with @Tom and @Anna.
</code></pre>
<p>You can filter your journal entries just like this:</p>
<pre><code>jrnl @pinkie @WorldDomination
</code></pre>
<p>Will print all entries in which either <code>@pinkie</code> or <code>@WorldDomination</code> occurred.</p>
<pre><code>jrnl -n 5 -and @pineapple @lubricant
</code></pre>
<p>the last five entries containing both <code>@pineapple</code> <strong>and</strong> <code>@lubricant</code>. You can change which symbols you'd like to use for tagging in the configuration.</p>
<blockquote>
<p><strong>Note:</strong> <code>jrnl @pinkie @WorldDomination</code> will switch to viewing mode because although now command line arguments are given, all the input strings look like tags - <em>jrnl</em> will assume you want to filter by tag. </p>
</blockquote>
<h3>Smart timestamps:</h3>
<p>Timestamps that work:</p>
<ul>
<li>at 6am</li>
<li>yesterday</li>
<li>last monday</li>
<li>sunday at noon</li>
<li>2 march 2012</li>
<li>7 apr</li>
<li>5/20/1998 at 23:42</li>
</ul>
<h2>Installation</h2>
<p>You can install <em>jrnl</em> manually by cloning the repository:</p>
<pre><code>git clone git://github.com/maebert/jrnl.git
cd jrnl
python setup.py install
</code></pre>
<p>or by using pip:</p>
<pre><code>pip install jrnl
</code></pre>
<p>Afterwards, you may want to create an alias in your <code>.bashrc</code> or <code>.bash_profile</code> or whatever floats your shell:</p>
<pre><code>alias jrnl="jrnl.py"
</code></pre>
<h3>Known Issues</h3>
<p><em>jrnl</em> relies on the <code>Crypto</code> package to encrypt journals, which has some known problems in automatically installing within virtual environments.</p>
<h2>Advanced usage</h2>
<p>The first time launched, <em>jrnl</em> will create a file called <code>.jrnl_config</code> in your home directory.</p>
<h3>.jrnl_config</h3>
<p>It's just a regular <code>json</code> file:</p>
<pre><code>{
journal: "~/journal.txt",
editor: "",
encrypt: false,
key: ""
tagsymbols: '@'
default_hour: 9,
default_minute: 0,
timeformat: "%Y-%m-%d %H:%M",
}
</code></pre>
<ul>
<li><code>journal</code>: path to your journal file</li>
<li><code>editor</code>: if set, executes this command to launch an external editor for writing your entries, e.g. <code>vim</code> or <code>subl -w</code> (note the <code>-w</code> flag to make sure <em>jrnl</em> waits for Sublime Text to close the file before writing into the journal).</li>
<li><code>encrypt</code>: if true, encrypts your journal using AES encryption.</li>
<li><code>key</code>: you may store the key you used to encrypt your journal in plaintext here. This is useful if your journal file lives in an unsecure space (ie. your Dropbox), but the config file itself is more or less safe.</li>
<li><code>tagsymbols</code>: Symbols to be interpreted as tags. (<strong>See note below</strong>)</li>
<li><code>default_hour</code> and <code>default_minute</code>: if you supply a date, such as <code>last thursday</code>, but no specific time, the entry will be created at this time</li>
<li><code>timeformat</code>: how to format the timestamps in your journal, see the <a href="http://docs.python.org/library/time.html#time.strftime">python docs</a> for reference</li>
</ul>
<blockquote>
<p><strong>Note on <code>tagsymbols</code>:</strong> Although it seems intuitive to use the <code>#</code> 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</p>
<pre><code>jrnl Implemented endless scrolling on the #frontend of our website.
</code></pre>
<p>your bash will chop off everything after the <code>#</code> before passing it to <em>jrnl</em>). To avoid this, wrap your input into quotation marks like this:</p>
<pre><code>jrnl "Implemented endless scrolling on the #frontend of our website."
</code></pre>
<p>Or use the built-in prompt or an external editor to compose your entries.</p>
</blockquote>
<h3>Encryption</h3>
<p>Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm and the passwords you entered when running <em>jrnl</em> for the first time. Since AES requires keys to be a multiple of 16 characters, passwords will be padded with trailing white spaces before using it to encrypt or decrypt your journal. Sow, if your password is <code>rosebud</code> (which I hope it isn't), the key with which to decrypt your journal is <code>rosebud_________</code> (the underscores represent whitespaces).</p>
<h3>JSON export</h3>
<p>Can do:</p>
<pre><code>jrnl -json
</code></pre>
<h1>Changelog</h1>
<h3>0.1.1</h3>
<ul>
<li>Removed unnecessary print commands</li>
<li>Created the documentation</li>
<li>Registered jrnl in the python package repository</li>
</ul>
<h3>0.1.0</h3>
<ul>
<li>Supports encrypted journals using AES encryption</li>
<li>Support external editors for composing entries</li>
</ul>
<h3>0.0.2</h3>
<ul>
<li>Filtering by tags and dates</li>
<li>Now using dedicated classes for Journals and entries</li>
</ul>
<h3>0.0.1</h3>
<ul>
<li>Composing entries works. That's pretty much it.</li>
</ul>
</div> <!-- /span10 -->
<div class="row">
<footer class="span10 offset2">
<b>jrnl</b> is an open source project created with love by <a href="http://www.portwempreludium.de">Manuel Ebert</a> and <a href="http://www.github.com/dedan">Stephan Gabler</a>.
</footer>
</div>
</div>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="js/jrnl.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>