Merge remote-tracking branch 'upstream/master' into 2.0-rc1-maebert

This commit is contained in:
Craig Moyer 2019-09-29 07:52:02 -04:00
commit 4c68eb193d
84 changed files with 1997 additions and 5803 deletions

17
.github/stale.yml vendored Normal file
View file

@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- ':star:'
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

6
.gitignore vendored
View file

@ -17,6 +17,7 @@ develop-eggs
.installed.cfg .installed.cfg
lib lib
lib64 lib64
.python-version
# Installer logs # Installer logs
pip-log.txt pip-log.txt
@ -28,10 +29,8 @@ Icon
_build _build
_sources _sources
_static _static
*.html
objects.inv objects.inv
searchindex.js searchindex.js
docs/_themes/jrnl/static/css/jrnl.css
# MS Visual Studio (PyTools) # MS Visual Studio (PyTools)
obj obj
@ -43,8 +42,6 @@ obj
env/ env/
env*/ env*/
docs/_themes/jrnl/static/less/3L.less
# PyCharm Project files # PyCharm Project files
.idea/ .idea/
@ -53,3 +50,4 @@ exp/
_extras/ _extras/
*.sublime-* *.sublime-*
site/

View file

@ -1,8 +1,7 @@
dist: xenial # required for Python >= 3.7
language: python language: python
python: python:
- "2.7" - "3.7"
- "3.3"
- "3.4"
install: install:
- "pip install -e ." - "pip install -e ."
- "pip install -q behave" - "pip install -q behave"

66
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,66 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
pledge to making participation in our project and our community a harassment-free experience for
everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity
and expression, level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism Focusing on what is best for the community Showing
* empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks Public or private
* harassment Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are
expected to take appropriate and fair corrective action in response to any instances of unacceptable
behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when an individual is
representing the project or its community in public spaces. Examples of representing a project or
community include using an official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting
the project team. All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further details of specific
enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face
temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

View file

@ -1,35 +1,35 @@
Contributing Contributing
============ ============
If you use jrnl, you can totally make my day by just saying "thanks for the code" or by [tweeting about jrnl](https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert). It's your chance to make a programmer happy today! If you have a minute or two, let me know what you use jrnl for and how, it'll help me to make it even better. If you blog about jrnl, I'll send you a post card! If you use jrnl, you can totally make our day by just saying "thanks for the code." It's your chance to make a programmer happy today! If you have a moment, let us know what you use jrnl for and how; it'll help us to make it even better!
Docs & Typos Docs & Typos
------------ ------------
If you find a typo or a mistake in the docs, just fix it right away and send a pull request. The Right Way™ to fix the docs is to edit the `docs/*.rst` files on the **master** branch. You can see the result if you run `make html` inside the project's root directory, and then open `docs/_build/html/index.html` in your browser. Note that this requires [lessc](http://lesscss.org/#using-less-installation) and [Sphinx](https://pypi.python.org/pypi/Sphinx) to be installed. Changes to the CSS or Javascript should be made on `docs/_themes/jrnl/`. The `gh-pages` branch is automatically maintained and updates from `master`; you should never have to edit that. If you find a typo or a mistake in the docs, please fix it right away and send a pull request. The Right Way™ to fix the docs is to edit the `docs/*.md` files on the **master** branch. You can see the result if you run `make html` inside the project's root directory, which will open a browser that hot-reloads as you change the docs. This requires [mkdocs](https://www.mkdocs.org) to be installed. The `gh-pages` branch is automatically maintained and updates from `master`; you should never have to edit that.
Bugs Bugs
---- ----
They unfortunately happen. Specifically, I don't have a Windows machine to test on, so expect a few rough spots. If you found a bug, please [open a new issue](https://www.github.com/maebert/jrnl/issues/new) and describe it as well as possible. If you're a programmer and have a little time to spare, go ahead, fork the code and fix bugs you spot; it'll be much appreciated! Unfortunately, bugs happen. If you found one, please [open a new issue](https://github.com/jrnl-org/jrnl/issues/new) and describe it as well as possible. If you're a programmer with some time, go ahead and send us a pull request! We'll review as quickly as we can.
Feature requests and ideas Feature requests and ideas
-------------------------- --------------------------
So, you have an idea for a great feature? Awesome. I love you. As with bugs, first you should [open a new issue](https://www.github.com/maebert/jrnl/issues/new) on GitHub, describe the use case and what the feature should accomplish. If we agree that this feature is useful, it will sooner or later get implemented. Even sooner if you roll up your sleeves and code it yourself ;-) So, you have an idea for a great feature? Awesome! We'd love to hear from you! Please [open a new issue](https://github.com/jrnl-org/jrnl/issues) and describe the goal of the feature, and any relvant use cases. We'll discuss the issue with you, and decide if it's a good fit for the project.
Keep in mind that the design goal of jrnl is to be _slim_. That means When discussing new features, please keep in mind our design goals. jrnl strives to do one thing well. To us, that means:
* having as few dependencies as possible * be _slim_
* creating as little interface as possible to boost the learning curve * have a simple interface
* doing one thing and one thing well * avoid dupicating functionality
Beyond that, it should also play nice with other software and tools -- however, avoid duplicating functionality that existing tools already provide. For example, we played around with the idea of a git integrated journal so new entries would be stored in commits. However, the proposed implementation required a rather heavy git module for python as an dependency, and the same feature could be implemented with a little bit of shell scripting around jrnl.
A short note for new programmers and programmers new to python A short note for new programmers and programmers new to python
-------------------------------------------------------------- --------------------------------------------------------------
Although jrnl grew quite a bit since I first started working on it, the overall complexity (for an end-user program) is fairly low, and I hope you'll find the code easy enough to understand -- if you have a question, don't hesitate to ask! Python is known for its great community and openness to novice programmers. Feel free to fork the code and play around with it. If you think you created something worth sharing, create a pull request. I never expect pull requests to be perfect, idiomatic, instantly mergeable code, and we can work through it together. Go for it! Although jrnl has grown quite a bit since its inception. The overall complexity (for an end-user program) is fairly low, and we hope you'll find the code easy enough to understand.
If you have a question, please don't hesitate to ask! Python is known for its welcoming community and openness to novice programmers, so feel free to fork the code and play around with it! If you create something you want to share with us, please create a pull request. We never expect pull requests to be perfect, idiomatic, instantly mergeable code. We can work through it together!

View file

@ -11,28 +11,11 @@ clean:
rm -f *.html rm -f *.html
html: html:
curl https://raw.githubusercontent.com/mateuszkocz/3l/master/3L/3L.less > docs/_themes/jrnl/static/less/3L.less ;\ mkdocs serve
lessc --clean-css docs/_themes/jrnl/static/less/jrnl.less docs/_themes/jrnl/static/css/jrnl.css ;\
cd docs ;\
make html ;\
cd .. ;\
open docs/_build/html/index.html ;\
# Build GitHub Page from docs # Build GitHub Page from docs
docs: docs:
git checkout gh-pages ; \ mkdocs gh-deploy
git checkout master docs ; \
git checkout master jrnl ; \
curl https://raw.githubusercontent.com/mateuszkocz/3l/master/3L/3L.less > docs/_themes/jrnl/static/less/3L.less ;\
lessc --clean-css docs/_themes/jrnl/static/less/jrnl.less docs/_themes/jrnl/static/css/jrnl.css ; \
cd docs ; \
make html ; \
cd .. ; \
cp -r docs/_build/html/* . ; \
git add -A ; \
git commit -m "Updated docs from master" ; \
git push -u origin gh-pages ; \
git checkout master
# Upload to pipy # Upload to pipy
dist: dist:

View file

@ -1,17 +1,15 @@
jrnl [![Build Status](http://img.shields.io/travis/maebert/jrnl.svg?style=flat)](https://travis-ci.org/maebert/jrnl) [![Downloads](http://img.shields.io/pypi/dm/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/) [![Version](http://img.shields.io/pypi/v/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/) jrnl [![Build Status](https://travis-ci.com/jrnl-org/jrnl.svg?branch=master)](https://travis-ci.com/jrnl-org/jrnl) [![Downloads](https://pepy.tech/badge/jrnl)](https://pepy.tech/project/jrnl) [![Version](http://img.shields.io/pypi/v/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/)
==== ====
_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._ _To get help, [submit an issue](https://github.com/jrnl-org/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. *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.
*jrnl* also plays nice with the fabulous [DayOne](http://dayoneapp.com/) and can read and write directly from and to DayOne Journals.
Optionally, your journal can be encrypted using the [256-bit AES](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard). Optionally, your journal can be encrypted using the [256-bit AES](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard).
### Why keep a journal? ### Why keep a journal?
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. 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.
In a Nutshell In a Nutshell
------------- -------------
@ -27,15 +25,17 @@ and hit return. `yesterday:` will be interpreted as a timestamp. Everything unti
If you just call `jrnl`, you will be prompted to compose your entry - but you can also configure _jrnl_ to use your external editor. If you just call `jrnl`, you will be prompted to compose your entry - but you can also configure _jrnl_ to use your external editor.
Known Issues
Installation
------------ ------------
jrnl used to support integration with Day One, but no longer supports it since Day One 2 was released with a different backend. [See the GitHub issue for more information](https://github.com/jrnl-org/jrnl/issues/409).
Install _jrnl_ using pip: Authors
-------
Current maintainers:
pip install jrnl * Jonathan Wren ([wren](https://github.com/wren))
* Micah Ellison ([micahellison](https://github.com/micahellison))
Or, if you want the option to encrypt your journal, Original maintainer:
pip install jrnl[encrypted]
* Manuel Ebert ([maebert](https://github.com/maebert))

2
docs/CNAME Normal file
View file

@ -0,0 +1,2 @@
jrnl.sh

View file

@ -1,177 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/jrnl.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/jrnl.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/jrnl"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/jrnl"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View file

@ -1,93 +0,0 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>jrnl- The Command Line Journal</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ pathto('_static/css/jrnl.css', 1) }}">
<link rel="apple-touch-icon-precomposed" href="{{ pathto('_static/img/favicon-152.png', 1) }}">
<link rel="shortcut icon" href="{{ pathto('_static/img/favicon.ico', 1) }}">
</head>
<body id="landing" class="landing">
<div id="upper">
<a id="twitter" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert">Tell your friends</a>
<div id="title">
<img id="logo" src="{{ pathto('_static/img/logo.png', 1) }}" width="90px" height="98px" title="jrnl"/>
<h1>Collect your thoughts and notes <br />without leaving the command line</h1>
</div>
<div id="prompt">
<div class="pleft" onclick="reset(); prev(); return false;"><i class="icon left"></i></div>
<div class="terminal">$ jrnl <span id="args"></span><span id="input">today: Started writing my memoirs. On the command line. Like a boss.</span><div id="output"></div></div>
<div class="pright" onclick="reset(); next(); return false;"><i class="icon right"></i></div>
</div>
</div>
<div id="nav">
<a href="{{ pathto('overview') }}" title="Documentation">Documentation</a>
<a href="http://github.com/maebert/jrnl" title="View on Github">Fork me on GitHub</a>
<a id="twitter-nav" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert">Tell your friends on twitter</a>
<a href="{{ pathto('installation') }}" title="Quick Start" class="cta">Download &#9654;</a>
</div>
<div id="lower">
<div class="row3">
<div class="col">
<i class="icon nli"></i>
<h3>Human friendly.</h3>
<p>jrnl has a natural-language interface so you don't have to remember cryptic shortcuts when you're writing down your thoughts.</p>
</div>
<div class="col">
<i class="icon future"></i>
<h3>Future-proof.</h3>
<p>your journals are stored in plain-text files that will still be readable in 50 years when all your fancy iPad apps will have gone the way of the Dodo.</p>
</div>
<div class="col">
<i class="icon secure"></i>
<h3>Secure.</h3>
<p>Encrypt your journals with the military-grade AES encryption. Even the NSA won't be able to read your dirty secrets.</p>
</div>
</div>
<div class="row4">
<div class="col">
<i class="icon sync"></i>
<h3>Accessible anywhere.</h3>
<p>Sync your journals with Dropbox and capture your thoughts where ever you are</p>
</div>
<div class="col">
<i class="icon dayone"></i>
<h3>DayOne compatible.</h3>
<p>Read, write and search your DayOne journal from the command line.</p>
</div>
<div class="col">
<i class="icon github"></i>
<h3>Free &amp; Open Source.</h3>
<p>jrnl is made by a bunch of really friendly and remarkably attractive people. Maybe even <a href="https://www.github.com/maebert/jrnl" title="Fork jrnl on GitHub">you</a>?</p>
</div>
<div class="col">
<i class="icon folders"></i>
<h3>For work and play.</h3>
<p>Effortlessly access several journals for all parts of your life.</p>
</div>
</div>
<div class="footer">
{{ copyright }}
</div>
</div>
<script src="{{ pathto('_static/js/landing.js', 1) }}"></script>
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src='//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
{% if pagename == "index" %}
{% include "index.html" %}
{% else %}
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
<link rel="apple-touch-icon-precomposed" href="{{ pathto('_static/img/favicon-152.png', 1) }}">
<link rel="shortcut icon" href="{{ pathto('_static/img/favicon.ico', 1) }}">
{% endblock %}
{%- block relbar1 %}{% endblock %}
{%- block relbar2 %}{% endblock %}
{%- block sidebar2 %}
<aside>
<a href="{{ pathto('index') }}" id="logolink" title="jrnl"><img class="logo" src="{{ pathto('_static/img/logo.png', 1) }}" width="90px" height="98px" title="jrnl"/></a>
<h2>Documentation</h2>
{{ toctree() }}
{%- include "searchbox.html" %}
</aside>
{% endblock %}
{%- block footer %}
<div class="footer">
{{ copyright }}
</div>
{%- endblock %}
{% endif %}

View file

@ -1,19 +0,0 @@
<h3>Related Topics</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
{%- endfor %}
{%- if prev %}
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
}}">{{ prev.title }}</a></li>
{%- endif %}
{%- if next %}
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
}}">{{ next.title }}</a></li>
{%- endif %}
{%- for parent in parents %}
</ul></li>
{%- endfor %}
</ul></li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,109 +0,0 @@
var phrases = [
["", "today: Started writing my memoirs. On the command line. Like a boss.", ""],
["", "yesterday 2pm: used jrnl to keep track of accomplished tasks. The done.txt for my todo.txt", ""],
["-from 2009 -until may", "", "(Displays all entries from January 2009 to last may)"],
["", "A day on the beach with @beth and @frank. Taggidy-tag-tag.", ""],
["--tags", "", "@idea 7<br />@beth 5"],
["--export json", "", "(Exports your entire journal to json)"],
["--encrypt", "", "(256 bit AES encryption. Crack this, NSA.)"]
]
var args = document.getElementById("args");
var input = document.getElementById("input");
var output = document.getElementById("output");
var current = 0
var timer = null;
var fadeInTimer = null;
var fadeOutTimer = null;
var letterTimer = null;
var unletterTimer = null;
var next = function() {
current = (current + 1) % phrases.length;
reveal(current);
timer = setTimeout(next, 5000);
}
var prev = function() {
current = (current === 0) ? phrases.length - 1 : current - 1;
reveal(current);
timer = setTimeout(next, 5000);
}
var reveal = function(idx) {
var args_text = phrases[idx][0];
var input_text = phrases[idx][1];
var output_text = phrases[idx][2];
var old_dix = idx == 0 ? phrases.length - 1 : idx - 1;
console.log(idx, old_dix, "++++++++++++")
var old_args_text = args.innerHTML;
var old_input_text = input.innerHTML;
var old_output_text = output.innerHTML;
console.log(args_text, input_text, output_text)
console.log(old_args_text, old_input_text, old_output_text)
var s4 = function() {fadeIn(output_text, output);}
var s3 = function() {letter(input_text, input, s4);}
var s2 = function() {letter(args_text, args, s3);}
var s1 = function() {unletter(old_args_text, args, s2);}
var s0 = function() {unletter(old_input_text, input, s1);}
fadeOut(old_output_text, output, s0, 10);
}
var fadeIn = function(text, element, next, step) {
step = step || 0
var nx = function() { fadeIn(text, element, next, ++step); }
if (step==0) {
element.innerHTML = "";
fadeInTimer = setTimeout(nx, 550);
return;
}
if (step==1) {element.innerHTML = text;}
if (step>10 || !text) { if (next) {next(); return;} else return;}
element.style.opacity = (step-1)/10;
element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')';
fadeInTimer = setTimeout(nx, 50);
}
var fadeOut = function(text, element, next, step) {
if (step===10) element.innerHTML = text;
if (step<0 || !text) {
element.innerHTML = "";
if (next) {next(); return;}
else return;
}
element.style.opacity = step/10;
element.style.filter = 'alpha(opacity=' + step*10 + ')';
var nx = function() { fadeOut(text, element, next, --step); }
fadeOutTimer = setTimeout(nx, 50);
}
var unletter = function(text, element, next, timeout, index) {
timeout = timeout||10;
if (index==null) index = text.length;
if (index==-1 || !text.length) { if (next) {next(); return;} else return;}
element.innerHTML = text.substring(0, index);
var nx = function() { unletter(text, element, next, timeout, --index); }
unletterTimer = setTimeout(nx, timeout);
}
var letter = function(text, element, next, timeout, index) {
timeout = timeout||35;
index = index||0;
if (index > text.length || !text.length) { if (next) {next(); return;} else return;}
element.innerHTML = text.substring(0, index);
var nx = function() { letter(text, element, next, timeout, ++index); }
letterTimer = setTimeout(nx, timeout);
}
var reset = function() {
var timers = [timer, fadeInTimer, fadeOutTimer, letterTimer, unletterTimer];
timers.forEach(function (t) {
clearTimeout(t);
});
args.innerHTML = "";
input.innerHTML = "";
output.innerHTML = "";
}
timer = setTimeout(next, 3000);

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 208 KiB

View file

@ -1,283 +0,0 @@
body
{
font-family: "Open Sans", "Helvetica Neue", sans-serif;
font-weight: 300;
color: #333;
background: @white;
}
body:not(.landing)
{
padding:0px 20px;
padding-top: 40px;
h2
{
margin-top: 40px;
}
}
input
{
background: transparent;
border: 1px solid #999;
.border-radius(3px);
padding: 2px 5px;
color: #666;
font-family: "Open Sans";
font-weight: 300;
outline: none;
&:focus
{
background: white;
}
}
div.related
{
background: rgba(255,200,200,.2);
}
* > a.headerlink
{
display: none;
}
h1, h2, h3, h4, h5, h6
{
font-weight: 300;
}
a:link, a:visited
{
color: @orange;
text-decoration: none;
}
a:hover, a:active
{
text-decoration: underline;
color: lighten(@orange, 10);
}
.literal
{
color: @purple;
font-size: 1em;
background: lighten(@purple-light, 45);
padding: 1px 2px;
.border-radius(2px);
.box-shadow(inset 0px 0px 0px 1px lighten(@purple-light, 30));
}
.note
{
.gradient(lighten(@purple-light, 10), lighten(@purple-light-shade, 10));
.border-radius(5px);
.box-shadow(0px 2px 3px @purple-shade);
padding: 10px 20px 10px 70px;
position: relative;
color: white;
.admonition-title {display: none;}
a { color: lighten(@orange, 30);}
&:before
{
content: "";
display: block;
.icon;
.icon.info;
position: absolute;
margin: auto;
top: 0; bottom: 0; left: 20px;
}
.literal, .highlight-note
{
color: white;
background: darken(@purple-light, 3);
padding: 1px 3px;
.border-radius(2px);
.box-shadow(inset 0px 0px 0px 1px lighten(@purple-light, 10));
}
.highlight-note
{
padding: 1px 10px;
pre:before
{
content: "$ ";
color: @orange;
}
}
}
.highlight
{
background:transparent !important;
}
.highlight-output, .highlight-javascript, .highlight-sh
{
.pre-block;
background: desaturate(lighten(@terminal,10), 10);
pre {color: white;}
}
.highlight-python
{
.terminal;
pre
{
margin: 0 0 10px 0;
&:before
{
content: "$ ";
color: @orange;
}
}
}
*:hover > a.headerlink
{
display: inline;
color: lighten(@purple-light, 30);
margin-left: 10px;
text-decoration: none;
&:hover { color: @purple-light; }
}
tt
{
color: @purple;
font-size: 1.2em;
}
ul li {
margin-bottom: 10px;
}
div.document
{
max-width: 900px;
margin: 20px auto;
position: relative;
}
div.documentwrapper
{
margin-left: 240px;
padding: 0;
}
aside
{
position: absolute;
width: 220px;
top: 0px;
.logo
{
margin: 0 auto 20px auto;
display: block;
width: 90px;
height: 98px;
}
color: #999;
h2, h3, h3 a:link, h3 a:visited
{
color: #777;
}
a:link, a:visited
{
color: #999;
}
a:hover, a:active
{
color: @orange;
}
input[type=submit]
{
display: none;
}
&>ul
{
margin: 0 4px;
padding: 0;
list-style: none;
&>li
{
margin-bottom: 10px;
font-size: 18px;
color: #777;
a:link, a:visited {color: #777;}
ul
{
margin: 10px 0 0 0;
padding-left: 20px;
font-size: 16px;
color: #999;
a:link, a:visited {color: #999;}
}
}
}
}
div.footer
{
font-size: .8em;
text-align: center;
margin: 40px 0;
color: #999;
a:link, a:visited {color: #555;}
}
@media screen and (max-width: 820px)
{
body:not(.landing){
padding-top: 130px;
.highlight-output,.highlight-python, .highlight-javascript
{
width: auto;
max-width: 500px;
}
.highlight-python
{
pre { margin: -10px 0 10px 0;}
&:before
{
height: 24px !important;
line-height: 24px;
font-size: .7em;
}
&:after
{
background: none;
}
}
aside
{
position: static;
}
div.documentwrapper
{
margin: 0px;
}
h1, .section
{
margin: 0px !important;
}
aside
{
background-color: #f0f0f0;
width: 100%;
margin: 5px -20px;
padding: 5px 20px 10px 20px;
}
#logolink
{
position: absolute;
top: -120px;
left: 50%;
margin-left: -49px;
}
}
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)
{
aside .logo, body#landing #upper #logo
{
width: 90px;
height: 98px;
content: url(../img/logo@2x.png);
}
}

View file

@ -1,317 +0,0 @@
@import "retina";
@import "3L";
@white: #f7f8f9;
@blue: #5e7dc5;
@blue-light: #7c95ca;
@terminal: #2f1e34;
@purple: #47375d;
@purple-shade: #413155;
@purple-light: #725794;
@purple-light-shade: #564371;
@orange: #deaa09;
.normalize();
@import "docs.less";
.icon,
{
.sprite("../img/icons.png", 32px, 5, 3, 8px);
&.secure {.sprite(0, 0)};
&.future {.sprite(1, 0)};
&.search {.sprite(2, 0)};
&.nli {.sprite(3, 0)};
&.share {.sprite(0, 1)};
&.sync {.sprite(0, 1)};
&.dayone {.sprite(1, 1)};
&.github {.sprite(2, 1)};
&.folders{.sprite(3, 1)};
&.cal {.sprite(4, 1)};
&.left {.sprite(0, 2)};
&.right {.sprite(1, 2)};
&.info {.sprite(2, 2)};
}
.pre-block
{
background: @terminal;
.border-radius(6px);
padding: 1px 20px;
margin: 40px auto;
width: 500px;
.box-shadow(0px 1px 8px darken(@white, 30));
position: relative;
color: @white;
font-family: "Monaco", "Courier New";
font-size: 12pt;
#args {color: #f6f7b9}
#output {color: #9278b5}
}
.terminal
{
.pre-block;
@p: 20px;
padding: @p + 30px @p (@p - 10px) @p;
&:before
{
content: "Terminal";
display: block;
width: 100%;
position: absolute;
left: 0;
.box-shadow(inset 0px 1px 0px #f4f4f4, inset 0px -1px 0px #888);
margin-top: -50px;
// margin: -@p -@p 0px -@p;
text-align: center;
height: 30px;
line-height: 30px;
color: #777;
text-shadow: 0px 1px 0px #ddd;
.border-radius(5px 5px 0px 0px);
.gradient(#eaeaea, #bababa);
}
&:after
{
content: "";
width: 48px;
height: 30px;
position: absolute;
top: 0px;
left: 10px;
background: url(../img/terminal.png) no-repeat center center;
}
}
body#landing
{
background-color: @purple;
font-family: "Open Sans", "Helvetica Neue", sans-serif;
font-weight: 300;
#twitter
{
display: block;
position: absolute;
top: 20px;
right: 20px;
border: 1px solid @purple;
padding: 5px 10px 5px 30px;
color: @purple;
.border-radius(3px);
.opacity(.7);
background: url(../img/twitter.png) 8px center no-repeat transparent;
&:hover, &:active
{
.opacity(1);
text-decoration: none;
}
}
#title, .row3, .row4, #prompt
{
width: 900px;
margin: 0px auto;
}
#upper
{
.clearfix;
background: @white;
.box-shadow(inset 0px -6px 6px -3px darken(@white, 10));
#title
{
width: 650px;
margin: 150px auto 75px auto;
}
img
{
float: left;
margin-right: 30px;
}
h1
{
color: @purple-light-shade;
font-weight: 300;
}
#prompt
{
width: 640px;
margin: 0 auto;
.clearfix;
}
.terminal
{
.border-radius(6px 6px 0px 0px);
float: left;
margin: 0px;
width: 500px;
min-height: 134px;
.border-box-sizing;
}
.pleft, .pright
{
text-align: center;
.border-box-sizing;
float: left;
padding-top: 50px;
width: 70px;
i {.opacity(60);}
i:hover {.opacity(1000); cursor: pointer;}
}
}
#nav
{
.gradient(@blue-light, @blue);
height: 60px;
.box-shadow(0px 6px 6px -3px @purple-shade);
text-align: center;
a#twitter-nav {display: none;}
a
{
color: @white;
text-shadow: 0px -1px 0px darken(@blue, 30);
text-decoration: none;
font-size: 14pt;
line-height: 60px;
margin: 0 40px;
&:hover
{
color: lighten(@orange, 20);
text-shadow: 0px -1px 0px darken(@orange, 15);
}
}
a.cta
{
.gradient(@purple-light, @purple-light-shade);
.box-shadow(0px 1px 0px @purple-shade);
.border-radius(5px);
padding: 6px 10px 5px 10px;
white-space: nowrap;
&:hover
{
.gradient(lighten(@orange, 10), darken(@orange, 5));
.box-shadow(0px 1px 0px darken(@orange, 15));
text-shadow: 0px -1px 0px darken(@orange, 15);
color: @white;
}
}
}
#lower
{
color: @white;
padding-top: 40px;
a
{
color: @orange;
text-decoration: none;
&:hover
{
color: lighten(@orange, 20);
text-decoration: underline;
}
}
.row3, .row4 {
.clearfix;
margin-bottom: 20px;
.col
{
position: relative;
padding-left: 40px;
i
{
position: absolute;
left: 0;
top: 16px;
}
h3 {font-size: 12pt; margin-bottom: .5em;}
p {font-size: 10pt; margin: 0;}
float: left;
width: 25%;
padding-right: 2%;
.border-box-sizing;
&:last-child {padding-right: 0;}
}
}
.row3 .col { width: 33.3333%; }
.row4 .col { color: mix(@white, @purple, 80); i {.opacity(80);}}
}
}
@media screen and (max-width: 680px)
{
body#landing
{
#nav
{
height: auto;
padding-bottom: 10px;
a, a#twitter-nav
{
display: block;
}
a.cta
{
margin: 10px;
padding: 1px;
}
}
#upper
{
#twitter { display: none;}
#title
{
margin: 30px 0 10px 0;
}
#logo
{
backgound: red;
display: block;
float: none;
margin: 0px auto;
}
#title br {display: none;}
.pleft, .pright {display: none;}
#prompt, #title
{
width: 100%;
.border-box-sizing;
padding: 0px 20px;
}
.terminal
{
width: 100%;
}
}
}
}
@media screen and (max-width: 900px)
{
body#landing
{
#lower
{
padding: 40px 20px;
.row3, .row4
{
margin: 0px;
width: auto;
}
.row3 .col, .row4 .col
{
float: none;
width: 100%;
text-align: center;
padding: 0px;
margin: 0 0 40px 0;
h3 {font-size: 1.5em;}
p {font-size: 1em;}
i
{
position: static;
margin-bottom: -20px;
}
}
}
}
}

View file

@ -1,35 +0,0 @@
// A helper mixin for applying high-resolution background images (http://www.retinajs.com)
@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";
.at2x(@path, @w: auto, @h: auto) {
background-image: url(@path);
@at2x_path: ~`@{path}.replace(/\.\w+$/, function(match) { return "@2x" + match; })`;
background-size: @w @h;
@media @highdpi {
background-image: url("@{at2x_path}");
}
}
// Sprite mixin, see https://coderwall.com/p/oztebw
.sprite (@path, @size, @w, @h, @pad: 0) when (isstring(@path))
{
background-image: url(@path);
width: @size;
height: @size;
display: inline-block;
@at2x_path: ~`@{path}.replace(/\.[\w\?=]+$/, function(match) { return "@2x" + match; })`;
font-size: @size + @pad;
background-size: (@size + @pad) * @w (@size + @pad) * @h;
@media @highdpi
{
background-image: url("@{at2x_path}");
}
}
.sprite(@x, @y)
{
background-position: -@x * 1em -@y * 1em;
}

View file

@ -1,96 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: IcoMoon.io -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1008"
height="48"
viewBox="0 0 1008 48"
data-tags="bookmark"
style="margin-left: -8px; margin-top: -8px;"
fill="#333333"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="sprites.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs28" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1562"
inkscape:window-height="1153"
id="namedview26"
showgrid="true"
inkscape:zoom="2.7460317"
inkscape:cx="651.02496"
inkscape:cy="38.446605"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2">
<inkscape:grid
type="xygrid"
id="grid3007" />
</sodipodi:namedview>
<path
d="M 141.818,22.909l-15.273-6.545l 6.105-4.361C 129.469,8.651, 124.985,6.545, 120,6.545 C 111.545,6.545, 104.5,12.556, 102.892,20.535L 98.819,18.849C 101.136,9.29, 109.728,2.182, 120,2.182c 6.452,0, 12.227,2.819, 16.224,7.27L 141.818,5.455L 141.818,22.909 z M 107.35,35.998C 110.529,39.349, 115.015,41.455, 120,41.455c 8.487,0, 15.552-6.057, 17.123-14.084l 4.069,1.741C 138.888,38.69, 130.287,45.818, 120,45.818 c-6.452,0-12.229-2.819-16.224-7.27L 98.182,42.545l0-17.455 l 15.273,6.545L 107.35,35.998z"
id="path6" />
<path
d="M 224.71875 2.09375 L 224.71875 10.8125 C 224.71875 10.8125 201.34725 10.877 200.78125 36.125 C 201.12625 32.307 203.78675 17.375 224.71875 17.375 L 224.71875 23.90625 L 240 13 L 224.71875 2.09375 z M 198 7 C 194.676 7 192 9.676 192 13 L 192 40 C 192 43.324 194.676 46 198 46 L 229 46 C 232.324 46 235 43.324 235 40 L 235 23 L 232 25 L 232 40 C 232 41.662 230.662 43 229 43 L 198 43 C 196.338 43 195 41.662 195 40 L 195 13 C 195 11.338 196.338 10 198 10 L 210 10 L 217 7 L 198 7 z "
id="path8" />
<path
d="M 318,0.007c-9.941,0-18,8.059-18,18c0,3.039, 0.76,5.899, 2.093,8.412l-12.516,12.513l 0.011,0.009 C 288.609,39.903, 288,41.235, 288,42.715c0,2.924, 2.37,5.293, 5.293,5.293c 1.478,0, 2.811-0.609, 3.772-1.588l-0.003-0.003l 12.511-12.51 c 2.514,1.337, 5.379,2.1, 8.425,2.1c 9.941,0, 18-8.059, 18-18C 336,8.067, 327.941,0.007, 318,0.007z M 295.192,44.545 c-0.483,0.501-1.152,0.815-1.899,0.815c-1.462,0-2.647-1.183-2.647-2.646c0-0.747, 0.315-1.414, 0.815-1.899l-0.013-0.012l 12.099-12.099 c 1.057,1.426, 2.317,2.686, 3.741,3.747L 295.192,44.545z M 318,33.009c-8.283,0-15-6.719-15-15c0-8.283, 6.717-15, 15-15 c 8.281,0, 15,6.717, 15,15C 333,26.291, 326.282,33.009, 318,33.009zM 318,7.508 C 318.412,7.508 318.75,7.844 318.75,8.258 C 318.75,8.671 318.412,9.008 318,9.008 C 313.029,9.008 309,13.038 309,18.008 C 309,18.422 308.664,18.758 308.25,18.758 C 307.836,18.758 307.5,18.422 307.5,18.008 C 307.5,12.208 312.2,7.508 318,7.508 Z"
id="path10" />
<path
d="M 421.5,19.5L 421.5,13.5 c0-7.457-6.043-13.5-13.5-13.5c-7.457,0-13.5,6.043-13.5,13.5l0,6 c-2.486,0-4.5,2.014-4.5,4.5l0,4.5 l0,1.5 l0,3 l0,1.5 c0,7.457, 6.043,13.5, 13.5,13.5l 9,0 c 7.457,0, 13.5-6.043, 13.5-13.5l0-1.5 l0-3 l0-1.5 l0-4.5 C 426,21.513, 423.984,19.5, 421.5,19.5z M 397.5,13.5c0-5.799, 4.701-10.5, 10.5-10.5c 5.799,0, 10.5,4.701, 10.5,10.5l0,6 l-3,0 L 415.5,13.503 c0-4.143-3.357-7.5-7.5-7.5c-4.143,0-7.5,3.357-7.5,7.5L 400.5,19.5 L 397.5,19.5 L 397.5,13.5 z M 414,13.5l0,0.005 L 414,19.5 l-12,0 L 402,13.503 L 402,13.5 c0-3.314, 2.686-6, 6-6C 411.313,7.5, 414,10.187, 414,13.5z M 423,28.5 l0,1.5 l0,3 l0,1.5 c0,5.788-4.712,10.5-10.5,10.5l-9,0 c-5.788,0-10.5-4.712-10.5-10.5l0-1.5 l0-3 l0-1.5 l0-4.5 c0-0.828, 0.672-1.5, 1.5-1.5c 1.001,0, 1.999,0, 3,0l 21,0 c 0.999,0, 1.998,0, 3,0 c 0.827,0, 1.5,0.672, 1.5,1.5L 423,28.5 zM 408,28.5 C 409.656,28.5 411,29.843 411,31.5 C 411,32.413 410.508,34.152 410.001,35.523 C 409.591,36.63 409.173,37.497 408,37.497 C 406.922,37.497 406.409,36.621 406,35.508 C 405.5,34.14 405,32.41 405,31.5 C 405,29.843 406.344,28.5 408,28.5 Z"
id="path12" />
<path
d="M 524.093,3.87C 521.625,1.405, 518.376,0, 515.174,0c-2.701,0-5.189,1.002-7.005,2.816l-7.3,7.356 c-0.022,0.021-0.048,0.035-0.071,0.057c-0.012,0.012-0.019,0.028-0.032,0.039l 0.003,0.003L 485.276,25.884 c-0.714,0.71-1.232,1.593-1.519,2.558l-3.524,12.762C 480.229,41.238, 480,42.24, 480,42.75C 480,45.648, 482.353,48, 485.256,48 c 0.578,0, 1.695-0.276, 1.736-0.282l 12.717-3.344c 0.966-0.286, 1.844-0.808, 2.558-1.524l 22.895-23.075 C 529.325,15.609, 528.855,8.625, 524.093,3.87z M 504.021,35.693c-0.123-1.353-0.506-2.68-1.079-3.94l 14.183-14.181 c 0.867,2.739, 0.422,5.604-1.479,7.506c-0.012,0.012-0.027,0.019-0.038,0.032l 0.021,0.019l-11.592,11.685 C 504.037,36.439, 504.055,36.073, 504.021,35.693z M 502.189,30.384c-0.559-0.919-1.196-1.808-1.983-2.594 c-0.916-0.916-1.968-1.635-3.066-2.238l 14.298-14.298c 1.122,0.498, 2.198,1.208, 3.147,2.157c 0.812,0.808, 1.438,1.715, 1.921,2.656 L 502.189,30.384z M 495.729,24.843c-1.389-0.559-2.844-0.879-4.302-0.898l 11.555-11.643c 1.768-1.725, 4.344-2.222, 6.88-1.593 L 495.729,24.843z M 486.25,44.809C 486.087,44.847, 485.579,44.976, 485.233,45C 484,44.985, 483,43.983, 483,42.75 c 0.018-0.252, 0.118-0.685, 0.153-0.843l 1.579-5.721c 1.715-0.046, 3.56,0.621, 5.010,2.075c 1.473,1.47, 2.166,3.351, 2.091,5.087 L 486.25,44.809z M 493.311,42.956c-0.036-2.013-0.855-4.107-2.508-5.757C 489.24,35.634, 487.194,34.731, 485.154,34.65l 1.494-5.411 c 0.108-0.36, 0.323-0.716, 0.587-1.026c 3.009-2.154, 7.636-1.518, 10.851,1.7c 3.401,3.399, 3.925,8.379, 1.306,11.352 c-0.174,0.091-0.35,0.178-0.538,0.234L 493.311,42.956z M 523.036,17.658l-2.526,2.546c0-0.339, 0.041-0.664, 0.009-1.011 c-0.264-2.902-1.617-5.709-3.815-7.904c-2.444-2.445-5.684-3.848-8.892-3.857l 2.484-2.505C 511.541,3.687, 513.276,3, 515.174,3 c 2.413,0, 4.893,1.092, 6.8,2.993c 1.79,1.787, 2.856,4.006, 3.009,6.252C 525.123,14.34, 524.431,16.261, 523.036,17.658z"
id="path14" />
<path
d="M 600,10.5 C 600.414,10.5 600.75,10.836 600.75,11.25 C 600.75,11.664 600.412,12 600,12 C 592.009,12 585,16.206 585,21 C 585,21.414 584.664,21.75 584.25,21.75 C 583.836,21.75 583.5,21.414 583.5,21 C 583.5,15.309 591.056,10.5 600,10.5 ZM 600,3C 586.745,3, 576,11.059, 576,21c0,6.191, 4.168,11.649, 10.512,14.889 C 586.512,35.929, 586.5,35.956, 586.5,36c0,2.689-2.008,5.585-2.892,7.104c 0.002,0, 0.003,0, 0.003,0C 583.54,43.269, 583.5,43.45, 583.5,43.641 C 583.5,44.391, 584.107,45, 584.859,45C 585,45, 585.248,44.963, 585.241,44.979c 4.688-0.768, 9.104-5.075, 10.13-6.322C 596.87,38.877, 598.415,39, 600,39 c 13.253,0, 24-8.059, 24-18C 624,11.059, 613.254,3, 600,3z M 600,36c-1.376,0-2.787-0.105-4.194-0.31c-0.146-0.024-0.291-0.032-0.435-0.032 c-0.891,0-1.744,0.396-2.319,1.095c-0.642,0.782-2.469,2.526-4.627,3.809c 0.585-1.343, 1.042-2.847, 1.074-4.398 c 0.009-0.096, 0.013-0.194, 0.013-0.276c0-1.128-0.631-2.159-1.635-2.671C 582.318,30.378, 579,25.811, 579,21C 579,12.729, 588.42,6, 600,6 c 11.577,0, 21,6.729, 21,15C 621,29.271, 611.579,36, 600,36z"
id="path16" />
<path
d="M 774 0 L 771 26.84375 L 773.96875 27.15625 L 776.65625 3 L 807.34375 3 L 810.03125 27.15625 L 813 26.84375 L 810 0 L 774 0 z M 780 6 L 780 9 L 804 9 L 804 6 L 780 6 z M 780 12 L 780 15 L 804 15 L 804 12 L 780 12 z M 780 18 L 780 21 L 804 21 L 804 18 L 780 18 z M 780 24 L 780 27 L 804 27 L 804 24 L 780 24 z M 769.5 30 C 768.675 30 768.20775 30.6545 768.46875 31.4375 L 773.53125 46.5625 C 773.79225 47.3455 774.675 48 775.5 48 L 808.5 48 C 809.325 48 810.20775 47.3455 810.46875 46.5625 L 815.53125 31.4375 C 815.79325 30.6545 815.325 30 814.5 30 L 769.5 30 z M 786 33 L 798 33 L 798 36 L 786 36 L 786 33 z "
id="path20" />
<path
d="M 888 0 C 874.745 0 864 10.745 864 24 C 864 37.255 874.745 48 888 48 C 901.255 48 912 37.255 912 24 C 912 10.745 901.255 0 888 0 z M 888 3 C 899.59798 3 909 12.402018 909 24 C 909 33.513233 902.67471 41.543499 894 44.125 L 894 43.25 L 894 41.53125 L 894 39.65625 C 894 37.76525 893.32825 36.35975 892.03125 35.46875 C 892.84425 35.39075 893.60225 35.29625 894.28125 35.15625 C 894.96025 35.01625 895.6795 34.8275 896.4375 34.5625 C 897.1955 34.2975 897.86675 33.96075 898.46875 33.59375 C 899.07075 33.22675 899.66475 32.74225 900.21875 32.15625 C 900.77275 31.57025 901.21875 30.9295 901.59375 30.1875 C 901.96875 29.4455 902.281 28.539 902.5 27.5 C 902.719 26.461 902.8125 25.3125 902.8125 24.0625 C 902.8125 21.6405 902.04675 19.579 900.46875 17.875 C 901.18775 16 901.09375 13.953 900.21875 11.75 L 899.625 11.6875 C 899.219 11.6405 898.4915 11.82775 897.4375 12.21875 C 896.3835 12.60975 895.21925 13.234 893.90625 14.125 C 892.04725 13.609 890.09375 13.375 888.09375 13.375 C 886.07775 13.375 884.17175 13.61 882.34375 14.125 C 881.51575 13.562 880.742 13.118 880 12.75 C 879.258 12.383 878.66375 12.133 878.21875 12 C 877.77375 11.867 877.35175 11.781 876.96875 11.75 C 876.58575 11.719 876.32775 11.70275 876.21875 11.71875 C 876.10975 11.73475 876.046 11.76525 876 11.78125 C 875.125 14.00025 875.031 16.016 875.75 17.875 C 874.172 19.578 873.375 21.6405 873.375 24.0625 C 873.375 25.3125 873.49975 26.461 873.71875 27.5 C 873.93775 28.539 874.21875 29.4455 874.59375 30.1875 C 874.96875 30.9295 875.445 31.57025 876 32.15625 C 876.555 32.74225 877.149 33.22575 877.75 33.59375 C 878.351 33.96175 879.02325 34.2975 879.78125 34.5625 C 880.53925 34.8275 881.0085 35.01625 881.6875 35.15625 C 882.3665 35.29625 883.1255 35.422 883.9375 35.5 C 882.6565 36.375 882 37.75025 882 39.65625 L 882 41.34375 L 882 43.3125 L 882 44.125 C 873.3253 41.543499 867 33.513233 867 24 C 867 12.402018 876.40203 3 888 3 z "
id="path22" />
<path
d="M 978.072,25.441c-0.267,0.386-0.593,1.352-0.978,1.588c-0.386,0.235-0.821,0.401-1.304,0.492 c-0.485,0.093-0.986,0.134-1.503,0.118l0,2.29 l 3.7,0 L 977.988,39 l 2.987,0 l0-14.994 l-2.376,0 C 978.514,24.578, 978.339,25.056, 978.072,25.441z M 994.5,12l 3,0 c 0.83,0, 1.5-0.672, 1.5-1.5L 999,1.5 c0-0.828-0.67-1.5-1.5-1.5l-3,0 c-0.83,0-1.5,0.672-1.5,1.5l0,9 C 993,11.328, 993.67,12, 994.5,12z M 970.5,12l 3,0 c 0.828,0, 1.5-0.672, 1.5-1.5L 975,1.5 c0-0.828-0.672-1.5-1.5-1.5L 970.5,0 C 969.672,0, 969,0.672, 969,1.5l0,9 C 969,11.328, 969.672,12, 970.5,12z M 1005,6l-3,0 l0,7.5 c0,0.828-0.67,1.5-1.5,1.5l-9,0 c-0.83,0-1.5-0.672-1.5-1.5L 990,6 l-12,0 l0,7.5 c0,0.828-0.672,1.5-1.5,1.5L 967.5,15 c-0.828,0-1.5-0.672-1.5-1.5L 966,6 L 963,6 C 961.344,6, 960,7.344, 960,9l0,36 c0,1.656, 1.344,3, 3,3l 42,0 c 1.656,0, 3-1.344, 3-3L 1008,9 C 1008,7.344, 1006.656,6, 1005,6z M 1005,43.5c0,0.83-0.67,1.5-1.5,1.5L 964.5,45 c-0.828,0-1.5-0.67-1.5-1.5L 963,19.5 c0-0.828, 0.672-1.5, 1.5-1.5l 39,0 c 0.83,0, 1.5,0.672, 1.5,1.5L 1005,43.5 z M 983.977,26.973l 7.452,0 c-1.404,1.728-2.534,3.488-3.397,5.558c-0.862,2.071-0.957,4.227-1.123,6.468l 3.196,0 c 0.013-0.999-0.292-2.078-0.076-3.234c 0.219-1.157, 0.528-2.298, 0.925-3.428c 0.401-1.128, 0.897-2.192, 1.494-3.19 c 0.594-1.001, 1.28-1.844, 2.050-2.529l0-2.613 l-10.522,0 L 983.976,26.973 z"
id="path24" />
<path
style="fill:#333333;fill-opacity:1;stroke:none"
d="M 9.46875,0 C 6.437316,0 4,2.4373158 4,5.46875 l 0,37.0625 C 4,45.562684 6.437316,48 9.46875,48 l 29.0625,0 C 41.562684,48 44,45.562684 44,42.53125 L 44,5.46875 C 44,2.4373158 41.562684,0 38.53125,0 z M 11,3 l 2,0 0,42 -2,0 C 8.784,45 7,43.216 7,41 L 7,7 C 7,4.784 8.784,3 11,3 z m 5,0 11,0 0,13 4,-3 4,3 0,-13 2,0 c 2.216,0 4,1.784 4,4 l 0,34 c 0,2.216 -1.784,4 -4,4 l -21,0 z"
id="rect3009"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ssssssssssccssssccccccsssscc" />
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 697 -1 C 696.25371 -1 695.55642 -0.73689699 695 -0.28125 C 694.44358 0.17439699 694 0.87583597 694 1.71875 L 694 3 L 693 3 L 693 4 L 687.5 4 C 687.448 3.99729 687.39579 3.99729 687.34375 4 C 686.61183 4.0767148 685.99606 4.7640806 686 5.5 L 686 6 L 684.5 6 C 683.71462 6.0000785 683.00008 6.7146233 683 7.5 L 683 8.09375 C 682.42224 8.2980557 682.0033 8.8871877 682 9.5 L 682 12.5 C 682.00008 13.285377 682.71462 13.999921 683.5 14 L 686 14 L 686 39 L 684.75 40.1875 C 684.29266 40.451552 683.9953 40.971929 684 41.5 L 684 44.5 C 684.00008 45.285377 684.71462 45.999921 685.5 46 L 693.40625 46 L 700.5 46 L 700.65625 46 L 708.5 46 C 709.28538 45.999921 709.99992 45.285377 710 44.5 L 710 41.5 C 710.005 40.971929 709.70734 40.451552 709.25 40.1875 L 708 39 L 708 14 L 710.5 14 C 711.28538 13.999921 711.99992 13.285377 712 12.5 L 712 9.5 C 711.997 8.8871877 711.57776 8.2980557 711 8.09375 L 711 7.5 C 710.99992 6.7146233 710.28538 6.0000785 709.5 6 L 708 6 L 708 5.5 C 707.99992 4.7146233 707.28538 4.0000785 706.5 4 L 701 4 L 701 3 L 700 3 L 700 1.71875 C 700 0.87583597 699.55642 0.17439702 699 -0.28125 C 698.44358 -0.73689702 697.74629 -1 697 -1 z M 697 1 C 697.20585 1 697.5132 1.1129297 697.71875 1.28125 C 697.9243 1.4495703 698 1.6095221 698 1.71875 L 698 3 L 696 3 L 696 1.71875 C 696 1.6095221 696.0757 1.4495702 696.28125 1.28125 C 696.4868 1.1129298 696.79415 1 697 1 z M 688 7 L 706 7 L 706 8 L 708 8 C 707.9472 8.7370898 708.11489 9.2632977 709 9.0625 L 709 12 L 705 12 L 689 12 L 685 12 L 685 9.15625 C 685.81891 9.2047089 685.94068 8.6267293 686 8 L 688 8 L 688 7 z M 689 14 L 705 14 L 705 41 L 707 42.375 L 707 43 L 687 43 L 687 42.375 L 689 41 L 689 14 z M 691 16 L 691 20 L 693 20 L 693 16 L 691 16 z M 694 16 L 694 20 L 696 20 L 696 16 L 694 16 z M 698 16 L 698 20 L 700 20 L 700 16 L 698 16 z M 701 16 L 701 20 L 703 20 L 703 16 L 701 16 z M 691 21 L 691 25 L 693 25 L 693 21 L 691 21 z M 694 21 L 694 25 L 696 25 L 696 21 L 694 21 z M 698 21 L 698 25 L 700 25 L 700 21 L 698 21 z M 701 21 L 701 25 L 703 25 L 703 21 L 701 21 z M 699.375 29.625 C 698.61451 29.625 698 30.239511 698 31 C 698 31.760489 698.61451 32.375 699.375 32.375 C 700.13549 32.375 700.75 31.760489 700.75 31 C 700.75 30.239511 700.13549 29.625 699.375 29.625 z "
id="path3858" />
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,7 +0,0 @@
[theme]
inherit = basic
stylesheet = css/jrnl.css
pygments_style = flask_theme_support.FlaskyStyle
[options]
touch_icon =

145
docs/advanced.md Normal file
View file

@ -0,0 +1,145 @@
# Advanced Usage
## Configuration File
You can configure the way jrnl behaves in a configuration file. By
default, this is `~/.jrnl_config`. If you have the `XDG_CONFIG_HOME`
variable set, the configuration file will be saved as
`$XDG_CONFIG_HOME/jrnl/.jrnl_config`.
!!! note
On Windows, The configuration file is typically found at `C:\Users\[Your Username]\.jrnl_config`.
The configuration file is a simple JSON file with the following options
and can be edited with any plain text editor.
- `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 <recipes>` 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](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 `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.
## 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_config` to point
to your DayOne journal. This is a folder named something like
`Journal_dayone` or `Journal.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. So your `.jrnl_config` should look like this:
``` javascript
{
...
"journals": {
"default": "~/journal.txt",
"dayone": "~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone"
}
}
```
## 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:
``` javascript
{
...
"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.
``` sh
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_config` looks like this:
``` javascript
{
...
"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_config`, 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](https://github.com/jrnl-org/jrnl/issues/486))

View file

@ -1,129 +0,0 @@
.. _advanced:
Advanced Usage
==============
Configuration File
-------------------
You can configure the way jrnl behaves in a configuration file. By default, this is ``~/.jrnl_config``. If you have the ``XDG_CONFIG_HOME`` variable set, the configuration file will be saved under ``$XDG_CONFIG_HOME/jrnl``.
.. note::
On Windows, The configuration file is typically found at ``C:\Users\[Your Username]\.jrnl_config``.
The configuration file is a simple JSON file with the following options and can be edited with any plain text editor.
- ``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 :doc:`FAQ <recipes>` 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 <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 ``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
.. code-block:: note
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:
.. code-block:: note
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_config`` to point to your DayOne journal. This is a folder named something like ``Journal_dayone`` or ``Journal.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. So your ``.jrnl_config`` should look like this:
.. code-block:: javascript
{
...
"journals": {
"default": "~/journal.txt",
"dayone": "~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone"
}
Alfred Integration
------------------
You can use _jrnl_ with the popular `Alfred <https://www.alfredapp.com/>`_ app with `this handy workflow <http://www.packal.org/workflow/jrnl>`_.
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:
.. code-block:: javascript
{
...
"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_config`` looks like this:
.. code-block:: javascript
{
...
"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_config``, 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
~~~~~~~~~~~~
- The Windows shell prior to Windows 7 has issues with Unicode encoding. If you want to use non-ASCII characters, change the code page 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.

79
docs/assets/highlight.css Normal file
View file

@ -0,0 +1,79 @@
/*
Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
line-height: 1.3em;
color: #e2e8f2;
background: #383e49;
border-radius: 5px;
font-size: 0.9rem;
line-height: 1.3rem;
}
.hljs-keyword, .hljs-operator {
color: #F92672;
}
.hljs-pattern-match {
color: #F92672;
}
.hljs-pattern-match .hljs-constructor {
color: #61aeee;
}
.hljs-function {
color: #61aeee;
}
.hljs-function .hljs-params {
color: #A6E22E;
}
.hljs-function .hljs-params .hljs-typing {
color: #FD971F;
}
.hljs-module-access .hljs-module {
color: #7e57c2;
}
.hljs-constructor {
color: #e2b93d;
}
.hljs-constructor .hljs-string {
color: #9CCC65;
}
.hljs-comment, .hljs-quote {
color: #b18eb1;
font-style: italic;
}
.hljs-doctag, .hljs-formula {
color: #c678dd;
}
.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst {
color: #e06c75;
}
.hljs-literal {
color: #56b6c2;
}
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string {
color: #98c379;
}
.hljs-built_in, .hljs-class .hljs-title {
color: #e6c07b;
}
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number {
color: #d19a66;
}
.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title {
color: #61aeee;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

196
docs/assets/theme.css Normal file
View file

@ -0,0 +1,196 @@
/* ------------------------------------------------------------ */
/* Overrides for jrnl theme */
/* ------------------------------------------------------------ */
:root {
--sidebar: #604385;
--sidebar-dark: #604385;
--off-white: rgba(255,255,255,.7);
}
body.wy-body-for-nav, section.wy-nav-content-wrap {
background-color: rgb(252,252,252);
}
pre {
background-color: transparent;
border: none;
margin: 1em -1em;
}
pre code {
padding: 1em 1.5em !important;
}
code {
background-color: transparent;
}
h1,h2 ,h3, h4, h5, h6 {
font-family: "Open Sans", "Helvetica Neue", Helvetica, sans-serif;
font-weight: 600;
margin-top: 2rem;
margin-bottom: 0.5rem;
}
p, td, tr, div, li {
font-family: "Open Sans", "Helvetica Neue", Helvetica, sans-serif;
font-weight: 00;
}
p {
margin: 1em 0em;
}
/* No-one likes lines that are 400 characters long. */
div.rst-content {max-width: 54em;}
.wy-side-nav-search, .wy-nav-top, .wy-menu-vertical li.current {
background-color: transparent;
}
.wy-side-nav-search a.icon-home {
width: 100%;
max-width: 250px;
background-size: 100%;
}
a.icon-home:before {
display: block;
width: 84px;
height: 70px;
content: "";
background: url(../img/logo_white.svg) center center no-repeat;
margin: 10px auto;
}
.wy-menu-vertical a, .wy-menu-vertical li ul li a {color: var(--off-white) !important; }
.wy-menu-vertical a:hover, .wy-menu-vertical li.current a:hover { background-color: transparent !important; color: white !important;}
.wy-menu-vertical li.on a, .wy-menu-vertical li.current>a {
background: transparent; !important;
color: white !important;
border: none;
position: relative;
font-weight: 700 !important;
border-right: none !important;
}
.wy-menu-vertical li.on a, .wy-menu-vertical li.current a {
border-right: none;
}
.wy-menu-vertical li.on a, .wy-menu-vertical li.current>a:after {
display: block;
position: absolute;
right: 0em;
top: 0;
z-index: 999 !important;
content: "";
width: 0;
height: 0;
border-top: 1em solid transparent;
border-bottom: 1em solid transparent;
border-right: 1em solid white;
}
.rst-versions, .rst-versions .rst-current-version { display: none; }
.wy-menu-vertical span {
color: white !important;
font-size: 1.2em;
font-weight: 300 !important;
}
.wy-menu-vertical li a {color: var(--off-white) !important; font-weight: 300 !important;}
.wy-nav-side {
background-image: linear-gradient(211deg, #95699C 0%, #604385 100%);
font-weight: 300 !important;
height: 100%;
}
footer {display: none;}
.wy-side-nav-search input[type=text], form .search-query {
background-color: rgba(0,0,0,.1) !important;
border: 1px solid rgba(255,255,255,.3);
box-shadow: none;
margin-bottom: 1em;
color: white !important;
font-weight: 500;
}
.wy-side-nav-search input[type=text]::placeholder, form .search-query::placeholder {
color: var(--off-white) !important;
}
.toctree-l2 a:first-child {display: none;}
/* ------------------------------------------------------------ */
/* Logo: ; */
/* ------------------------------------------------------------ */
.logo {
width: 128px;
height: 128px;
vertical-align: middle;
margin-right: 1em;
}
/* ------------------------------------------------------------ */
/* Code blocks in callouts */
/* ------------------------------------------------------------ */
div.admonition {
border-radius: 5px;
margin: 1em -1em;
}
div.admonition p.admonition-title {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
div.admonition > p {
padding: 0em .5em;
}
div.admonition div.highlight {
background: none !important;
}
div.admonition div.highlight pre {
background-color: rgba(255,255,255,.5) !important;
}
/* ------------------------------------------------------------ */
/* Fancy ordered lists. */
/* ------------------------------------------------------------ */
ol {
counter-reset:li;
margin-left: 0px;
padding: 0;
}
ol li {
list-style: none !important;
margin-bottom: 1.5em;
margin-left: 3em !important;
}
ol > li:before {
content:counter(li);
counter-increment:li;
background-color: var(--sidebar);
border-radius: 50%;
display: block;
float: left;
margin-left: -3em;
margin-top: -.3em;
width: 2em;
height: 2em;
color: var(--sidebar-dark);
text-align: center;
line-height: 2em;
font-weight: 600;
}

View file

@ -1,257 +0,0 @@
# -*- coding: utf-8 -*-
#
# jrnl documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 7 13:22:51 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
sys.path.insert(0, os.path.abspath('..'))
import jrnl
from jrnl import __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'jrnl'
copyright = u'jrnl is made with love by <a href="http://www.1450.me">Manuel Ebert</a> and <a href="https://github.com/maebert/jrnl/graphs/contributors" title="Contributors">other fabulous people</a>. If you need help, tweet to <a href="https://twitter.com/maebert" title="Follow @maebert on twitter">@maebert</a> or <a href="https://github.com/maebert/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'jrnl'
# On read the docs, use their standard theme.
RTD_NEW_THEME = True
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'jrnldoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'jrnl.tex', u'jrnl Documentation',
u'Manuel Ebert', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'jrnl', u'jrnl Documentation',
[u'Manuel Ebert'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'jrnl', u'jrnl Documentation',
u'Manuel Ebert', 'jrnl', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'jrnl'

93
docs/encryption.md Normal file
View file

@ -0,0 +1,93 @@
# Encryption
## Encrypting and decrypting
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
``` sh
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,
``` sh
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.
## 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't have to enter your password every time you want to write or read
your journal.
If you don't initially store the password in the keychain but decide to
do so at a later point -- or maybe want to store it on one computer but
not on another -- 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 -- it's meant to keep journals secure in transit, for example
when storing it on an
[untrusted](http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/)
services such as Dropbox. If you're concerned about security, disable
history logging for journal in your `.bashrc`
``` sh
HISTIGNORE="$HISTIGNORE:jrnl *"
```
If you are using zsh instead of bash, you can get the same behaviour
adding this to your `zshrc`
``` sh
setopt HIST_IGNORE_SPACE
alias jrnl=" 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's a Python script that you can use to
decrypt your journal
``` python
#!/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)
```

View file

@ -1,47 +0,0 @@
.. _encryption:
Encryption
==========
Encrypting and decrypting
-------------------------
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, 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't have to enter your password every time you want to write or read your journal.
If you don't initially store the password in the keychain but decide to do so at a later point -- or maybe want to store it on one computer but not on another -- you can simply run ``jrnl --encrypt`` on an encrypted journal and use the same password again.
A note on security
------------------
While jrnl follows best practices, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history -- it's meant to keep journals secure in transit, for example when storing it on an `untrusted <http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/>`_ services such as Dropbox. If you're concerned about security, disable history logging for journal in your ``.bashrc`` ::
HISTIGNORE="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. 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:])
plain = plain.strip(plain[-1])
plain = plain.decode("utf-8")

76
docs/export.md Normal file
View file

@ -0,0 +1,76 @@
# Import and Export
## Tag export
With
``` sh
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
``` sh
jrnl --short
```
Will only display the date and title of each entry.
## JSON export
Can do
``` sh
jrnl --export json
```
Why not create a [beautiful timeline](http://timeline.verite.co/) of
your journal?
## Markdown export
Use
``` sh
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
``` sh
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
``` sh
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
``` sh
jrnl --export json -o my_entries/
```
The contents of `my\_entries/` will then look like this:
``` output
my_entries/
|- 2013_06_03_a-beautiful-day.json
|- 2013_06_07_dinner-with-gabriel.json
|- ...
```

View file

@ -1,78 +0,0 @@
.. _export:
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 <http://timeline.verite.co/>`_ 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.
XML export
-----------
::
jrnl --export xml
Why anyone would want to export stuff to XML is beyond me, but here you go.
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:
.. code-block:: output
my_entries/
|- 2013_06_03_a-beautiful-day.json
|- 2013_06_07_dinner-with-gabriel.json
|- ...

View file

@ -1,20 +0,0 @@
.. jrnl documentation master file, created by
sphinx-quickstart on Wed Aug 7 13:22:51 2013.
jrnl: The command-line journal
==============================
Release v\ |version|.
Contents:
.. toctree::
:maxdepth: 3
overview
installation
usage
encryption
export
advanced
recipes

55
docs/installation.md Normal file
View file

@ -0,0 +1,55 @@
# Getting started
## Installation
On OS X, the easiest way to install *jrnl* is using
[Homebrew](http://brew.sh/)
``` sh
brew install jrnl
```
On other platforms, install *jrnl* using pip
``` sh
pip install jrnl
```
Or, if you want the option to encrypt your journal,
``` sh
pip install jrnl[encrypted]
```
to install the dependencies for encrypting journals as well.
!!! note
Installing the encryption library, `pycrypto`, requires a `gcc` compiler. For this reason, jrnl will
not install `pycrypto` unless explicitly told so like this. You can [install PyCrypto manually](https://www.dlitz.net/software/pycrypto/)
first or install it with `pip install pycrypto` if you have a `gcc` compiler.
Also note that when using zsh, the correct syntax is `pip install "jrnl[encrypted]"` (note the quotes).
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
``` sh
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:
``` output
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.

View file

@ -1,35 +0,0 @@
.. _download:
Getting started
===============
Installation
------------
Install *jrnl* using pip ::
pip install jrnl
Alternatively, on OS X with [Homebrew](http://brew.sh/) installed:
brew 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:
.. code-block:: output
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.

31
docs/overview.md Normal file
View file

@ -0,0 +1,31 @@
# 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.
`jrnl` also plays nice with the fabulous
[DayOne](http://dayoneapp.com) and can read and write directly from and
to DayOne Journals.
Optionally, your journal can be encrypted using the [256-bit
AES](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard).
## 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.

View file

@ -1,23 +0,0 @@
.. _overview:
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.
`jrnl` also plays nice with the fabulous `DayOne <http://dayoneapp.com>`_ and can read and write directly from and to DayOne Journals.
Optionally, your journal can be encrypted using the `256-bit AES <http://en.wikipedia.org/wiki/Advanced_Encryption_Standard>`_.
Why keep a journal?
-------------------
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. Or use it as a quick way to keep a change log. Or use it to keep a lab book.

197
docs/recipes.md Normal file
View file

@ -0,0 +1,197 @@
# 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
``` sh
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
``` sh
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?
``` sh
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?
``` sh
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
``` sh
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`
``` sh
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](../advanced) set up, you can use this:
```sh
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):
``` sh
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
To use external editors for writing and editing journal entries, set
them up in your `.jrnl_config` (see `advanced usage <advanced>` 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_config` like this:
``` json
{
"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`:
``` json
{
"editor": "mvim -f"
}
```
### iA Writer
On OS X, you can use the fabulous [iA
Writer](http://www.iawriter.com/mac) to write entries. Configure your
`.jrnl_config` like this:
``` json
{
"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:
``` sh
grep -A 1 CFBundleIdentifier /Applications/iA\ Writer.app/Contents/Info.plist
```
### Notepad++ on Windows
To set [Notepad++](http://notepad-plus-plus.org/) as your editor, edit
the jrnl config file (`.jrnl_config`) like this:
``` json
{
"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](https://code.visualstudio.com) as your editor on Linux, edit `.jrnl_config` like this:
```json
{
"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:
```sh
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:
```javascript
{
"editor": "code --wait",
}
```
to ``.jrnl_config``. See also the [Visual Studio Code documentation](https://code.visualstudio.com/docs/setup/mac)

View file

@ -1,152 +0,0 @@
.. _recipes:
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``
.. code-block:: sh
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>`_:
.. code-block:: sh
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
----------------
To use external editors for writing and editing journal entries, set them up in your ``.jrnl_config`` (see :doc:`advanced usage <advanced>` 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_config`` like this:
.. code-block:: javascript
"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``:
.. code-block:: javascript
"editor": "mvim -f"
iA Writer
~~~~~~~~~
On OS X, you can use the fabulous `iA Writer <http://www.iawriter.com/mac>`_ to write entries. Configure your ``.jrnl_config`` like this:
.. code-block:: javascript
"editor": "open -b jp.informationarchitects.WriterForMacOSX -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.
Notepad++ on Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To set `Notepad++ <http://notepad-plus-plus.org/>`_ as your editor, edit the jrnl config file (``.jrnl_config``) like this:
.. code-block:: javascript
"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 <https://code.visualstudio.com/>`_ as your editor on Linux, edit ``.jrnl_config`` like this:
.. code-block:: javascript
"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:
.. code-block:: bash
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:
.. code-block:: javascript
"editor": "code --wait",
to ``.jrnl_config``. See also `the Visual Studio Code documentation <https://code.visualstudio.com/docs/setup/mac>`_.

BIN
docs/theme/img/banner_og.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

BIN
docs/theme/img/banner_twitter.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
docs/theme/img/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

15
docs/theme/img/favicon.svg vendored Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
<title>favicon</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#986B9D" offset="0%"></stop>
<stop stop-color="#664C8B" offset="100%"></stop>
</linearGradient>
</defs>
<g id="favicon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M47,9.75231557 L47,37 L42,32 L37,37 L37,7 L25,7 C17.8202983,7 12,12.8202983 12,20 L12,44 C12,51.1797017 17.8202983,57 25,57 L32,57 L32,7 L34,7 L34,57 L39,57 C46.1797017,57 52,51.1797017 52,44 L52,20 C52,15.8373552 50.0435392,12.1316662 47,9.75231557 Z M47.097641,7.37132944 C51.2495133,10.039075 54,14.6983322 54,20 L54,44 C54,49.3016678 51.2495133,53.960925 47.097641,56.6286706 C52.7817736,55.2392133 57,50.1122164 57,44 L57,20 C57,13.8877836 52.7817736,8.76078667 47.097641,7.37132944 Z M16.902359,56.6286706 C12.7504867,53.960925 10,49.3016678 10,44 L10,20 C10,14.6983322 12.7504867,10.039075 16.902359,7.37132944 C11.2182264,8.76078667 7,13.8877836 7,20 L7,44 C7,50.1122164 11.2182264,55.2392133 16.902359,56.6286706 Z M52.097641,7.37132944 C56.2495133,10.039075 59,14.6983322 59,20 L59,44 C59,49.3016678 56.2495133,53.960925 52.097641,56.6286706 C57.7817736,55.2392133 62,50.1122164 62,44 L62,20 C62,13.8877836 57.7817736,8.76078667 52.097641,7.37132944 Z M11.902359,56.6286706 C7.7504867,53.960925 5,49.3016678 5,44 L5,20 C5,14.6983322 7.7504867,10.039075 11.902359,7.37132944 C6.21822638,8.76078667 2,13.8877836 2,20 L2,44 C2,50.1122164 6.21822638,55.2392133 11.902359,56.6286706 Z M15,5 L49,5 C57.2842712,5 64,11.7157288 64,20 L64,44 C64,52.2842712 57.2842712,59 49,59 L15,59 C6.71572875,59 0,52.2842712 0,44 L0,20 C2.0539126e-15,11.7157288 6.71572875,5 15,5 Z" id="Combined-Shape" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

10
docs/theme/img/jrnl_white.svg vendored Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="90px" height="98px" viewBox="0 0 90 98" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
<title>jrnl_white</title>
<desc>Created with Sketch.</desc>
<g id="jrnl_white" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M63,5.34786368 L63,43 L58,38 L53,43 L53,5 L30,5 C22.8202983,5 17,10.8202983 17,18 L17,58 C17,65.1797017 22.8202983,71 30,71 L45,71 L45,5 L47,5 L47,71 L60,71 C67.1797017,71 73,65.1797017 73,58 L73,18 C73,11.8528367 68.7334,6.70219128 63,5.34786368 Z M67.6693542,5.10618565 C72.0593056,7.72299627 75,12.5180801 75,18 L75,58 C75,63.4819199 72.0593056,68.2770037 67.6693542,70.8938143 C74.060623,70.0745197 79,64.6140865 79,58 L79,18 C79,11.3859135 74.060623,5.92548026 67.6693542,5.10618565 Z M22.3306458,70.8938143 C17.9406944,68.2770037 15,63.4819199 15,58 L15,18 C15,12.5180801 17.9406944,7.72299627 22.3306458,5.10618565 C15.939377,5.92548026 11,11.3859135 11,18 L11,58 C11,64.6140865 15.939377,70.0745197 22.3306458,70.8938143 Z M73.6693542,5.10618565 C78.0593056,7.72299627 81,12.5180801 81,18 L81,58 C81,63.4819199 78.0593056,68.2770037 73.6693542,70.8938143 C80.060623,70.0745197 85,64.6140865 85,58 L85,18 C85,11.3859135 80.060623,5.92548026 73.6693542,5.10618565 Z M16.3306458,70.8938143 C11.9406944,68.2770037 9,63.4819199 9,58 L9,18 C9,12.5180801 11.9406944,7.72299627 16.3306458,5.10618565 C9.93937703,5.92548026 5,11.3859135 5,18 L5,58 C5,64.6140865 9.93937703,70.0745197 16.3306458,70.8938143 Z M18,3 L72,3 C80.2842712,3 87,9.71572875 87,18 L87,58 C87,66.2842712 80.2842712,73 72,73 L18,73 C9.71572875,73 3,66.2842712 3,58 L3,18 C3,9.71572875 9.71572875,3 18,3 Z" id="Combined-Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M24.22,95.092 C24.0293324,95.092 23.7616684,95.0736668 23.417,95.037 C23.0723316,95.0003332 22.7680013,94.9306672 22.504,94.828 L22.856,92.65 C23.1786683,92.7526672 23.5673311,92.804 24.022,92.804 C24.6380031,92.804 25.0706654,92.6243351 25.32,92.265 C25.5693346,91.9056649 25.694,91.3666703 25.694,90.648 L25.694,82.642 L28.356,82.285 L28.356,90.692 C28.356,92.1880075 28.0003369,93.2953297 27.289,94.014 C26.5776631,94.7326703 25.5546733,95.092 24.22,95.092 Z M41.4,84.892 C41.1799989,84.8186663 40.8756686,84.7416671 40.487,84.661 C40.0983314,84.5803329 39.6473359,84.54 39.134,84.54 C38.8406652,84.54 38.5290017,84.569333 38.199,84.628 C37.8689984,84.686667 37.6380007,84.7379998 37.506,84.782 L37.506,94 L34.844,94 L34.844,83.044 C35.3573359,82.8533324 35.9989962,82.6736675 36.769,82.505 C37.5390039,82.3363325 38.3933286,82.252 39.332,82.252 C39.5080009,82.252 39.7133322,82.2629999 39.948,82.285 C40.1826678,82.3070001 40.4173322,82.3363332 40.652,82.373 C40.8866678,82.4096669 41.1139989,82.4536664 41.334,82.505 C41.5540011,82.5563336 41.7299993,82.6039998 41.862,82.648 L41.4,84.892 Z M46.81,82.868 C47.3233359,82.7213326 47.9906626,82.5820007 48.812,82.45 C49.6333374,82.3179993 50.5426617,82.252 51.54,82.252 C52.4786714,82.252 53.2633302,82.3803321 53.894,82.637 C54.5246698,82.893668 55.0269981,83.2529977 55.401,83.715 C55.7750019,84.1770023 56.0389992,84.7343301 56.193,85.387 C56.3470008,86.0396699 56.424,86.7546628 56.424,87.532 L56.424,94 L53.762,94 L53.762,87.95 C53.762,87.3339969 53.7216671,86.8096688 53.641,86.377 C53.5603329,85.9443312 53.4283342,85.5923347 53.245,85.321 C53.0616658,85.0496653 52.8123349,84.8516673 52.497,84.727 C52.1816651,84.6023327 51.7966689,84.54 51.342,84.54 C51.004665,84.54 50.6526685,84.5619998 50.286,84.606 C49.9193315,84.6500002 49.6480009,84.6866665 49.472,84.716 L49.472,94 L46.81,94 L46.81,82.868 Z M66.784,94.22 C65.991996,94.2053333 65.3356693,94.1173341 64.815,93.956 C64.2943307,93.7946659 63.8800015,93.5636682 63.572,93.263 C63.2639985,92.9623318 63.0476673,92.5883356 62.923,92.141 C62.7983327,91.6936644 62.736,91.1840029 62.736,90.612 L62.736,82.692 L65.398,82.252 L65.398,90.106 C65.398,90.4286683 65.4236664,90.6999989 65.475,90.92 C65.5263336,91.1400011 65.6179993,91.3269992 65.75,91.481 C65.8820007,91.6350008 66.0616655,91.7523329 66.289,91.833 C66.5163345,91.9136671 66.8059982,91.9759998 67.158,92.02 L66.784,94.22 Z" id="jrnl" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

16
docs/theme/img/logo.svg vendored Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="90px" height="98px" viewBox="0 0 90 98" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
<title>logo</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#986B9D" offset="0%"></stop>
<stop stop-color="#664C8B" offset="100%"></stop>
</linearGradient>
</defs>
<g id="logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M63,5.34786368 L63,43 L58,38 L53,43 L53,5 L30,5 C22.8202983,5 17,10.8202983 17,18 L17,58 C17,65.1797017 22.8202983,71 30,71 L45,71 L45,5 L47,5 L47,71 L60,71 C67.1797017,71 73,65.1797017 73,58 L73,18 C73,11.8528367 68.7334,6.70219128 63,5.34786368 Z M67.6693542,5.10618565 C72.0593056,7.72299627 75,12.5180801 75,18 L75,58 C75,63.4819199 72.0593056,68.2770037 67.6693542,70.8938143 C74.060623,70.0745197 79,64.6140865 79,58 L79,18 C79,11.3859135 74.060623,5.92548026 67.6693542,5.10618565 Z M22.3306458,70.8938143 C17.9406944,68.2770037 15,63.4819199 15,58 L15,18 C15,12.5180801 17.9406944,7.72299627 22.3306458,5.10618565 C15.939377,5.92548026 11,11.3859135 11,18 L11,58 C11,64.6140865 15.939377,70.0745197 22.3306458,70.8938143 Z M73.6693542,5.10618565 C78.0593056,7.72299627 81,12.5180801 81,18 L81,58 C81,63.4819199 78.0593056,68.2770037 73.6693542,70.8938143 C80.060623,70.0745197 85,64.6140865 85,58 L85,18 C85,11.3859135 80.060623,5.92548026 73.6693542,5.10618565 Z M16.3306458,70.8938143 C11.9406944,68.2770037 9,63.4819199 9,58 L9,18 C9,12.5180801 11.9406944,7.72299627 16.3306458,5.10618565 C9.93937703,5.92548026 5,11.3859135 5,18 L5,58 C5,64.6140865 9.93937703,70.0745197 16.3306458,70.8938143 Z M18,3 L72,3 C80.2842712,3 87,9.71572875 87,18 L87,58 C87,66.2842712 80.2842712,73 72,73 L18,73 C9.71572875,73 3,66.2842712 3,58 L3,18 C3,9.71572875 9.71572875,3 18,3 Z" id="Combined-Shape" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
<path d="M24.22,95.092 C24.0293324,95.092 23.7616684,95.0736668 23.417,95.037 C23.0723316,95.0003332 22.7680013,94.9306672 22.504,94.828 L22.856,92.65 C23.1786683,92.7526672 23.5673311,92.804 24.022,92.804 C24.6380031,92.804 25.0706654,92.6243351 25.32,92.265 C25.5693346,91.9056649 25.694,91.3666703 25.694,90.648 L25.694,82.642 L28.356,82.285 L28.356,90.692 C28.356,92.1880075 28.0003369,93.2953297 27.289,94.014 C26.5776631,94.7326703 25.5546733,95.092 24.22,95.092 Z M41.4,84.892 C41.1799989,84.8186663 40.8756686,84.7416671 40.487,84.661 C40.0983314,84.5803329 39.6473359,84.54 39.134,84.54 C38.8406652,84.54 38.5290017,84.569333 38.199,84.628 C37.8689984,84.686667 37.6380007,84.7379998 37.506,84.782 L37.506,94 L34.844,94 L34.844,83.044 C35.3573359,82.8533324 35.9989962,82.6736675 36.769,82.505 C37.5390039,82.3363325 38.3933286,82.252 39.332,82.252 C39.5080009,82.252 39.7133322,82.2629999 39.948,82.285 C40.1826678,82.3070001 40.4173322,82.3363332 40.652,82.373 C40.8866678,82.4096669 41.1139989,82.4536664 41.334,82.505 C41.5540011,82.5563336 41.7299993,82.6039998 41.862,82.648 L41.4,84.892 Z M46.81,82.868 C47.3233359,82.7213326 47.9906626,82.5820007 48.812,82.45 C49.6333374,82.3179993 50.5426617,82.252 51.54,82.252 C52.4786714,82.252 53.2633302,82.3803321 53.894,82.637 C54.5246698,82.893668 55.0269981,83.2529977 55.401,83.715 C55.7750019,84.1770023 56.0389992,84.7343301 56.193,85.387 C56.3470008,86.0396699 56.424,86.7546628 56.424,87.532 L56.424,94 L53.762,94 L53.762,87.95 C53.762,87.3339969 53.7216671,86.8096688 53.641,86.377 C53.5603329,85.9443312 53.4283342,85.5923347 53.245,85.321 C53.0616658,85.0496653 52.8123349,84.8516673 52.497,84.727 C52.1816651,84.6023327 51.7966689,84.54 51.342,84.54 C51.004665,84.54 50.6526685,84.5619998 50.286,84.606 C49.9193315,84.6500002 49.6480009,84.6866665 49.472,84.716 L49.472,94 L46.81,94 L46.81,82.868 Z M66.784,94.22 C65.991996,94.2053333 65.3356693,94.1173341 64.815,93.956 C64.2943307,93.7946659 63.8800015,93.5636682 63.572,93.263 C63.2639985,92.9623318 63.0476673,92.5883356 62.923,92.141 C62.7983327,91.6936644 62.736,91.1840029 62.736,90.612 L62.736,82.692 L65.398,82.252 L65.398,90.106 C65.398,90.4286683 65.4236664,90.6999989 65.475,90.92 C65.5263336,91.1400011 65.6179993,91.3269992 65.75,91.481 C65.8820007,91.6350008 66.0616655,91.7523329 66.289,91.833 C66.5163345,91.9136671 66.8059982,91.9759998 67.158,92.02 L66.784,94.22 Z" id="jrnl" fill="#674C8B" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

9
docs/theme/img/logo_white.svg vendored Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="84px" height="70px" viewBox="0 0 84 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
<title>logo_white</title>
<desc>Created with Sketch.</desc>
<g id="logo_white" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M60,2.34786368 L60,40 L55,35 L50,40 L50,2 L27,2 C19.8202983,2 14,7.82029825 14,15 L14,55 C14,62.1797017 19.8202983,68 27,68 L42,68 L42,2 L44,2 L44,68 L57,68 C64.1797017,68 70,62.1797017 70,55 L70,15 C70,8.85283673 65.7334,3.70219128 60,2.34786368 Z M64.6693542,2.10618565 C69.0593056,4.72299627 72,9.51808015 72,15 L72,55 C72,60.4819199 69.0593056,65.2770037 64.6693542,67.8938143 C71.060623,67.0745197 76,61.6140865 76,55 L76,15 C76,8.38591347 71.060623,2.92548026 64.6693542,2.10618565 Z M19.3306458,67.8938143 C14.9406944,65.2770037 12,60.4819199 12,55 L12,15 C12,9.51808015 14.9406944,4.72299627 19.3306458,2.10618565 C12.939377,2.92548026 8,8.38591347 8,15 L8,55 C8,61.6140865 12.939377,67.0745197 19.3306458,67.8938143 Z M70.6693542,2.10618565 C75.0593056,4.72299627 78,9.51808015 78,15 L78,55 C78,60.4819199 75.0593056,65.2770037 70.6693542,67.8938143 C77.060623,67.0745197 82,61.6140865 82,55 L82,15 C82,8.38591347 77.060623,2.92548026 70.6693542,2.10618565 Z M13.3306458,67.8938143 C8.94069436,65.2770037 6,60.4819199 6,55 L6,15 C6,9.51808015 8.94069436,4.72299627 13.3306458,2.10618565 C6.93937703,2.92548026 2,8.38591347 2,15 L2,55 C2,61.6140865 6.93937703,67.0745197 13.3306458,67.8938143 Z M15,0 L69,0 C77.2842712,-1.33226763e-15 84,6.71572875 84,15 L84,55 C84,63.2842712 77.2842712,70 69,70 L15,70 C6.71572875,70 2.66453526e-15,63.2842712 0,55 L0,15 C-8.8817842e-16,6.71572875 6.71572875,1.33226763e-15 15,0 Z" id="Combined-Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

18
docs/theme/img/sprites.svg vendored Normal file
View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="400px" height="160px" viewBox="0 0 400 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
<title>sprites</title>
<desc>Created with Sketch.</desc>
<g id="sprites" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M200.001666,7.10542736e-15 C186.746448,7.10542736e-15 176.000667,10.745781 176.000667,24.0009999 C176.000667,28.0531687 177.014042,31.8666609 178.791449,35.2174671 L162.102754,51.9021622 L162.117422,51.9141627 C160.812034,53.1968828 160,54.9729568 160,56.9463723 C160,60.8452014 163.160132,64.0039997 167.057627,64.0039997 C169.028376,64.0039997 170.805783,63.1919658 172.08717,61.8865781 L172.08317,61.882578 L188.765198,45.2018831 C192.117338,46.984624 195.937497,48.0019997 199.999,48.0019997 C213.254219,48.0019997 224,37.2562187 224,24.0009999 C224.002666,10.7471144 213.256885,7.10542736e-15 200.001666,7.10542736e-15 Z M169.589733,59.386474 C168.945706,60.0545018 168.053669,60.4731859 167.057627,60.4731859 C165.108213,60.4731859 163.528147,58.8957869 163.528147,56.9450389 C163.528147,55.9489974 163.948164,55.0596271 164.614859,54.4129335 L164.597525,54.3969328 L180.730197,38.2642607 C182.139589,40.1656733 183.819659,41.8457432 185.718405,43.2604689 L169.589733,59.386474 Z M200.001666,44.0044998 C188.957206,44.0044998 180.000833,35.04546 180.000833,24.0036666 C180.000833,12.9592065 188.957206,4.00283342 200.001666,4.00283342 C211.04346,4.00283342 220.0025,12.9592065 220.0025,24.0036666 C220.0025,35.0467933 211.044793,44.0044998 200.001666,44.0044998 Z M200.001666,10.00175 C200.551023,10.00175 201.001708,10.4497687 201.001708,11.0017917 C201.001708,11.5524813 200.551023,12.0018333 200.001666,12.0018333 C193.37339,12.0018333 188.001166,17.3753905 188.001166,24.0023332 C188.001166,24.5543562 187.553148,25.0023749 187.001125,25.0023749 C186.449102,25.0023749 186.001083,24.5543562 186.001083,24.0023332 C186.001083,16.2686777 192.268011,10.00175 200.001666,10.00175 Z" id="path10" fill="#684688" fill-rule="nonzero"></path>
<path d="M42,26 L42,18 C42,8.05733333 33.9426667,0 24,0 C14.0573333,0 6,8.05733333 6,18 L6,26 C2.68533333,26 0,28.6853333 0,32 L0,38 L0,40 L0,44 L0,46 C0,55.9426667 8.05733333,64 18,64 L30,64 C39.9426667,64 48,55.9426667 48,46 L48,44 L48,40 L48,38 L48,32 C48,28.684 45.312,26 42,26 Z M10,18 C10,10.268 16.268,4 24,4 C31.732,4 38,10.268 38,18 L38,26 L34,26 L34,18.004 C34,12.48 29.524,8.004 24,8.004 C18.476,8.004 14,12.48 14,18.004 L14,26 L10,26 L10,18 Z M32,18 L32,18.0066667 L32,26 L16,26 L16,18.004 L16,18 C16,13.5813333 19.5813333,10 24,10 C28.4173333,10 32,13.5826667 32,18 Z M44,38 L44,40 L44,44 L44,46 C44,53.7173333 37.7173333,60 30,60 L18,60 C10.2826667,60 4,53.7173333 4,46 L4,44 L4,40 L4,38 L4,32 C4,30.896 4.896,30 6,30 C7.33466667,30 8.66533333,30 10,30 L38,30 C39.332,30 40.664,30 42,30 C43.1026667,30 44,30.896 44,32 L44,38 Z M24,38 C26.208,38 28,39.7906667 28,42 C28,43.2173333 27.344,45.536 26.668,47.364 C26.1213333,48.84 25.564,49.996 24,49.996 C22.5626667,49.996 21.8786667,48.828 21.3333333,47.344 C20.6666667,45.52 20,43.2133333 20,42 C20,39.7906667 21.792,38 24,38 Z" id="path12" fill="#684688" fill-rule="nonzero"></path>
<path d="M56,110.174879 L37.4495142,102.225364 L44.8646072,96.9285223 C41.0009854,92.8572051 35.5547484,90.2992712 29.5,90.2992712 C19.2306123,90.2992712 10.6738014,97.6001925 8.72073517,107.291434 L3.77369603,105.243629 C6.58790907,93.6333303 17.023696,85 29.5,85 C37.336557,85 44.3508342,88.4239389 49.2055642,93.8300944 L56,88.9753644 L56,110.174879 Z M14.1353928,126.072692 C17.9965854,130.142795 23.4452516,132.700729 29.5,132.700729 C39.8082547,132.700729 48.3893574,125.343936 50.2974837,115.594395 L55.2396645,117.709002 C52.4412412,129.342378 41.9945229,138 29.5,138 C21.663443,138 14.6467366,134.576061 9.79443579,129.169906 L3,134.024636 L3,112.823907 L21.5504858,120.773421 L14.1353928,126.072692 Z" id="path6" fill="#684688" fill-rule="nonzero"></path>
<path d="M110.666667,136 L110.666667,88 L114.666667,88 L114.666667,136 L124,136 C129.154658,136 133.333333,131.821324 133.333333,126.666667 L133.333333,97.3333333 C133.333333,94.1616732 131.751312,91.3595139 129.333333,89.672919 L129.333333,109.333333 L124,105.333333 L118.666667,109.333333 L118.666667,88 L121.333333,88 L100,88 C94.8453423,88 90.6666667,92.1786757 90.6666667,97.3333333 L90.6666667,126.666667 C90.6666667,131.821324 94.8453423,136 100,136 L110.666667,136 Z M134.130346,88.6638236 C136.127154,90.9949079 137.333333,94.0232615 137.333333,97.3333333 L137.333333,126.666667 C137.333333,129.976739 136.127154,133.005092 134.130346,135.336176 C137.570042,133.9607 140,130.597457 140,126.666667 L140,97.3333333 C140,93.4025432 137.570042,90.0393001 134.130346,88.6638236 Z M89.8696538,135.336176 C87.872846,133.005092 86.6666667,129.976739 86.6666667,126.666667 L86.6666667,97.3333333 C86.6666667,94.0232615 87.872846,90.9949079 89.8696538,88.6638236 C86.4299578,90.0393001 84,93.4025432 84,97.3333333 L84,126.666667 C84,130.597457 86.4299578,133.9607 89.8696538,135.336176 Z M93.3333333,84 L130.666667,84 C138.030463,84 144,89.9695367 144,97.3333333 L144,126.666667 C144,134.030463 138.030463,140 130.666667,140 L93.3333333,140 C85.9695367,140 80,134.030463 80,126.666667 L80,97.3333333 C80,89.9695367 85.9695367,84 93.3333333,84 Z" id="Combined-Shape" fill="#684688" fill-rule="nonzero"></path>
<path d="M363.625,2 L363.625,13.625 C363.625,13.625 332.463,13.711 331.708333,47.375 C332.168333,42.2843333 335.715667,22.375 363.625,22.375 L363.625,31.0833333 L384,16.5416667 L363.625,2 Z M328,8.54166667 C323.568,8.54166667 320,12.1096667 320,16.5416667 L320,52.5416667 C320,56.9736667 323.568,60.5416667 328,60.5416667 L369.333333,60.5416667 C373.765333,60.5416667 377.333333,56.9736667 377.333333,52.5416667 L377.333333,29.875 L373.333333,32.5416667 L373.333333,52.5416667 C373.333333,54.7576667 371.549333,56.5416667 369.333333,56.5416667 L328,56.5416667 C325.784,56.5416667 324,54.7576667 324,52.5416667 L324,16.5416667 C324,14.3256667 325.784,12.5416667 328,12.5416667 L344,12.5416667 L353.333333,8.54166667 L328,8.54166667 Z" id="path8" fill="#684688" fill-rule="nonzero"></path>
<path d="M272,13 C272.552,13 273,13.448 273,14 C273,14.552 272.549333,15 272,15 C261.345333,15 252,20.608 252,27 C252,27.552 251.552,28 251,28 C250.448,28 250,27.552 250,27 C250,19.412 260.074667,13 272,13 Z M272,3 C254.326667,3 240,13.7453333 240,27 C240,35.2546667 245.557333,42.532 254.016,46.852 C254.016,46.9053333 254,46.9413333 254,47 C254,50.5853333 251.322667,54.4466667 250.144,56.472 C250.146667,56.472 250.148,56.472 250.148,56.472 C250.053333,56.692 250,56.9333333 250,57.188 C250,58.188 250.809333,59 251.812,59 C252,59 252.330667,58.9506667 252.321333,58.972 C258.572,57.948 264.46,52.2053333 265.828,50.5426667 C267.826667,50.836 269.886667,51 272,51 C289.670667,51 304,40.2546667 304,27 C304,13.7453333 289.672,3 272,3 Z M272,47 C270.165333,47 268.284,46.86 266.408,46.5866667 C266.213333,46.5546667 266.02,46.544 265.828,46.544 C264.64,46.544 263.502667,47.072 262.736,48.004 C261.88,49.0466667 259.444,51.372 256.566667,53.0826667 C257.346667,51.292 257.956,49.2866667 257.998667,47.2186667 C258.010667,47.0906667 258.016,46.96 258.016,46.8506667 C258.016,45.3466667 257.174667,43.972 255.836,43.2893333 C248.424,39.504 244,33.4146667 244,27 C244,15.972 256.56,7 272,7 C287.436,7 300,15.972 300,27 C300,38.028 287.438667,47 272,47 Z" id="path16" fill="#684688" fill-rule="nonzero"></path>
<path d="M192,80 C174.326667,80 160,94.3266667 160,112 C160,129.673333 174.326667,144 192,144 C209.673333,144 224,129.673333 224,112 C224,94.3266667 209.673333,80 192,80 Z M192,84 C207.463973,84 220,96.536024 220,112 C220,124.684311 211.56628,135.391332 200,138.833333 L200,137.666667 L200,135.375 L200,132.875 C200,130.353667 199.104333,128.479667 197.375,127.291667 C198.459,127.187667 199.469667,127.061667 200.375,126.875 C201.280333,126.688333 202.239333,126.436667 203.25,126.083333 C204.260667,125.73 205.155667,125.281 205.958333,124.791667 C206.761,124.302333 207.553,123.656333 208.291667,122.875 C209.030333,122.093667 209.625,121.239333 210.125,120.25 C210.625,119.260667 211.041333,118.052 211.333333,116.666667 C211.625333,115.281333 211.75,113.75 211.75,112.083333 C211.75,108.854 210.729,106.105333 208.625,103.833333 C209.583667,101.333333 209.458333,98.604 208.291667,95.6666667 L207.5,95.5833333 C206.958667,95.5206667 205.988667,95.7703333 204.583333,96.2916667 C203.178,96.813 201.625667,97.6453333 199.875,98.8333333 C197.396333,98.1453333 194.791667,97.8333333 192.125,97.8333333 C189.437,97.8333333 186.895667,98.1466667 184.458333,98.8333333 C183.354333,98.0826667 182.322667,97.4906667 181.333333,97 C180.344,96.5106667 179.551667,96.1773333 178.958333,96 C178.365,95.8226667 177.802333,95.708 177.291667,95.6666667 C176.781,95.6253333 176.437,95.6036667 176.291667,95.625 C176.146333,95.6463333 176.061333,95.687 176,95.7083333 C174.833333,98.667 174.708,101.354667 175.666667,103.833333 C173.562667,106.104 172.5,108.854 172.5,112.083333 C172.5,113.75 172.666333,115.281333 172.958333,116.666667 C173.250333,118.052 173.625,119.260667 174.125,120.25 C174.625,121.239333 175.26,122.093667 176,122.875 C176.74,123.656333 177.532,124.301 178.333333,124.791667 C179.134667,125.282333 180.031,125.73 181.041667,126.083333 C182.052333,126.436667 182.678,126.688333 183.583333,126.875 C184.488667,127.061667 185.500667,127.229333 186.583333,127.333333 C184.875333,128.5 184,130.333667 184,132.875 L184,135.125 L184,137.75 L184,138.833333 C172.433733,135.391332 164,124.684311 164,112 C164,96.536024 176.53604,84 192,84 Z" id="path22" fill="#684688" fill-rule="nonzero"></path>
<path d="M100,1.0658141e-14 C99.0049467,1.0658141e-14 98.0752267,0.350804013 97.3333333,0.958333333 C96.59144,1.56586265 96,2.50111463 96,3.625 L96,5.33333333 L94.6666667,5.33333333 L94.6666667,6.66666667 L87.3333333,6.66666667 C87.264,6.66305333 87.1943867,6.66305333 87.125,6.66666667 C86.1491067,6.76895307 85.32808,7.6854408 85.3333333,8.66666667 L85.3333333,9.33333333 L83.3333333,9.33333333 C82.28616,9.333438 81.33344,10.2861644 81.3333333,11.3333333 L81.3333333,12.125 C80.5629867,12.3974076 80.0044,13.1829169 80,14 L80,18 C80.0001067,19.0471693 80.9528267,19.9998947 82,20 L85.3333333,20 L85.3333333,53.3333333 L83.6666667,54.9166667 C83.05688,55.268736 82.6604,55.962572 82.6666667,56.6666667 L82.6666667,60.6666667 C82.6667733,61.713836 83.6194933,62.6665613 84.6666667,62.6666667 L95.2083333,62.6666667 L104.666667,62.6666667 L104.875,62.6666667 L115.333333,62.6666667 C116.380507,62.6665613 117.333227,61.713836 117.333333,60.6666667 L117.333333,56.6666667 C117.34,55.962572 116.94312,55.268736 116.333333,54.9166667 L114.666667,53.3333333 L114.666667,20 L118,20 C119.047173,19.9998947 119.999893,19.0471693 120,18 L120,14 C119.996,13.1829169 119.437013,12.3974076 118.666667,12.125 L118.666667,11.3333333 C118.66656,10.2861644 117.71384,9.333438 116.666667,9.33333333 L114.666667,9.33333333 L114.666667,8.66666667 C114.66656,7.61949773 113.71384,6.66677133 112.666667,6.66666667 L105.333333,6.66666667 L105.333333,5.33333333 L104,5.33333333 L104,3.625 C104,2.50111463 103.40856,1.56586269 102.666667,0.958333333 C101.924773,0.350803973 100.995053,1.0658141e-14 100,1.0658141e-14 Z M100,2.66666667 C100.274467,2.66666667 100.684267,2.8172396 100.958333,3.04166667 C101.2324,3.26609373 101.333333,3.4793628 101.333333,3.625 L101.333333,5.33333333 L98.6666667,5.33333333 L98.6666667,3.625 C98.6666667,3.4793628 98.7676,3.2660936 99.0416667,3.04166667 C99.3157333,2.81723973 99.7255333,2.66666667 100,2.66666667 Z M88,10.6666667 L112,10.6666667 L112,12 L114.666667,12 C114.596267,12.9827864 114.819853,13.6843969 116,13.4166667 L116,17.3333333 L110.666667,17.3333333 L89.3333333,17.3333333 L84,17.3333333 L84,13.5416667 C85.09188,13.6062785 85.25424,12.8356391 85.3333333,12 L88,12 L88,10.6666667 Z M89.3333333,20 L110.666667,20 L110.666667,56 L113.333333,57.8333333 L113.333333,58.6666667 L86.6666667,58.6666667 L86.6666667,57.8333333 L89.3333333,56 L89.3333333,20 Z M92,22.6666667 L92,28 L94.6666667,28 L94.6666667,22.6666667 L92,22.6666667 Z M96,22.6666667 L96,28 L98.6666667,28 L98.6666667,22.6666667 L96,22.6666667 Z M101.333333,22.6666667 L101.333333,28 L104,28 L104,22.6666667 L101.333333,22.6666667 Z M105.333333,22.6666667 L105.333333,28 L108,28 L108,22.6666667 L105.333333,22.6666667 Z M92,29.3333333 L92,34.6666667 L94.6666667,34.6666667 L94.6666667,29.3333333 L92,29.3333333 Z M96,29.3333333 L96,34.6666667 L98.6666667,34.6666667 L98.6666667,29.3333333 L96,29.3333333 Z M101.333333,29.3333333 L101.333333,34.6666667 L104,34.6666667 L104,29.3333333 L101.333333,29.3333333 Z M105.333333,29.3333333 L105.333333,34.6666667 L108,34.6666667 L108,29.3333333 L105.333333,29.3333333 Z M103.166667,40.8333333 C102.15268,40.8333333 101.333333,41.6526813 101.333333,42.6666667 C101.333333,43.680652 102.15268,44.5 103.166667,44.5 C104.180653,44.5 105,43.680652 105,42.6666667 C105,41.6526813 104.180653,40.8333333 103.166667,40.8333333 Z" id="path3858" fill="#684688" fill-rule="nonzero"></path>
<path d="M247.471598,80 L243.471598,115.791667 L247.429931,116.208333 L251.013264,84 L291.929931,84 L295.513264,116.208333 L299.471598,115.791667 L295.471598,80 L247.471598,80 Z M255.471598,88 L255.471598,92 L287.471598,92 L287.471598,88 L255.471598,88 Z M255.471598,96 L255.471598,100 L287.471598,100 L287.471598,96 L255.471598,96 Z M255.471598,104 L255.471598,108 L287.471598,108 L287.471598,104 L255.471598,104 Z M255.471598,112 L255.471598,116 L287.471598,116 L287.471598,112 L255.471598,112 Z M241.471598,120 C240.371598,120 239.748598,120.872667 240.096598,121.916667 L246.846598,142.083333 C247.194598,143.127333 248.371598,144 249.471598,144 L293.471598,144 C294.571598,144 295.748598,143.127333 296.096598,142.083333 L302.846598,121.916667 C303.195931,120.872667 302.571598,120 301.471598,120 L241.471598,120 Z M263.471598,124 L279.471598,124 L279.471598,128 L263.471598,128 L263.471598,124 Z" id="path20" fill="#684688" fill-rule="nonzero"></path>
<path d="M384,92.1508074 C381.644441,93.1945738 379.116959,93.9024443 376.461373,94.2184709 C379.172907,92.5947297 381.248518,90.0192484 382.232259,86.9597924 C379.688777,88.4634811 376.881243,89.5553522 373.889761,90.1472486 C371.494254,87.5917412 368.086876,86 364.307523,86 C357.056897,86 351.177986,91.8789116 351.177986,99.1255639 C351.177986,100.15333 351.29396,101.157149 351.51796,102.117046 C340.608034,101.569071 330.933874,96.3420823 324.459092,88.399481 C323.327273,90.3351705 322.683403,92.5906513 322.683403,94.9982892 C322.683403,99.5534862 325.002989,103.572735 328.522367,105.924216 C326.370729,105.852268 324.347092,105.260371 322.575481,104.276527 L322.575481,104.440501 C322.575481,110.799308 327.102652,116.106298 333.105485,117.314143 C332.005667,117.610091 330.845926,117.774065 329.646133,117.774065 C328.798341,117.774065 327.978471,117.690091 327.1746,117.530091 C328.846237,122.749132 333.693408,126.54438 339.436372,126.648432 C334.945175,130.167811 329.282211,132.259422 323.131404,132.259422 C322.071637,132.259422 321.027766,132.195422 320,132.079448 C325.810938,135.8108 332.709668,137.986386 340.124268,137.986386 C364.275732,137.986386 377.477323,117.982065 377.477323,100.633331 L377.433296,98.9336682 C380.012752,97.0938743 382.244285,94.7823411 384,92.1508074 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

307
docs/theme/index.css vendored Normal file
View file

@ -0,0 +1,307 @@
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}
body
{
background-color: #FAFDFE;
background-color: #f7f8f9;
font-family: "Open Sans", "Helvetica Neue", sans-serif;
font-weight: 300;
}
.icon {
background-image: url("img/sprites.svg");
width: 32px;
height: 32px;
display: inline-block;
font-size: 40px;
background-size: 200px 80px;
}
h3 { font-weight: 400; }
.icon.secure {
background-position: 0em 0em;
}
.icon.future {
background-position: -1em 0em;
}
.icon.search {
background-position: -2em 0em;
}
.icon.nli {
background-position: -3em 0em;
}
.icon.share {
background-position: 0em -1em;
}
.icon.sync {
background-position: 0em -1em;
}
.icon.dayone {
background-position: -1em -1em;
}
.icon.github {
background-position: -2em -1em;
}
.icon.folders {
background-position: -3em -1em;
}
.icon.twitter {
background-position: -4em -1em;
}
header {
background-image: linear-gradient(211deg, #95699C 0%, #604385 100%);
color: white;
border: 0px solid transparent;
display: relative;
padding-top: 150px;
overflow: hidden;
}
#terminal {
background: #1B1C2E;
max-width: 520px;
box-shadow: 0 -2px 16px 0 rgba(0,0,0,0.35);
border-radius: 6px 6px 0 0;
min-height: 100px;
margin: 0px auto;
position: relative;
/*transform: translateY(40px);*/
color: #f7f8f9;
font-family: "Monaco", "Courier New";
font-size: 12pt;
padding: 45px 20px 0px 20px;
line-height: 165%;
}
#terminal b {
font-weight: normal;
color: #C2CDD9;
}
#terminal i {
font-style: normal;
color: #BB97BA;
}
#terminal:before {
content: '';
position: absolute;
top: 15px;
left: 15px;
display: inline-block;
width: 15px;
height: 15px;
border-radius: 50%;
background: #3B3B4A;
box-shadow: 25px 0 0 #3B3B4A, 50px 0 0 #3B3B4A;
}
#typed:before {
content: "$ ";
color: #A879A7;
}
#twitter {
display: block;
position: absolute;
text-decoration: none;
top: 20px;
right: 20px;
border: 1px solid white;
padding: 5px 10px;
color: white;
border-radius: 3px;
opacity: .7;
}
#twitter .icon {
transform: scale(.5);
vertical-align: -18%;
margin: 0;
padding: 0;
}
#twitter:hover,
#twitter:active {
opacity: 1;
text-decoration: none;
}
#title {
max-width: 630px;
margin: 0 auto;
padding: 0px 20px;
}
#prompt {
max-width: 700px;
margin: 100px auto 0px auto;
padding: 0px 20px;
}
header img {
float: left;
margin-right: 30px;
}
h1 {
color: white;
font-weight: 300;
}
nav {
text-align: center;
}
nav a#twitter-nav {
display: none;
}
a {
color: #684688;
text-decoration: underline;
}
nav a {
font-size: 14pt;
line-height: 40pt;
margin: 0 40px;
}
a:hover {
color: #A3629F;
}
nav a.cta {
display: inline-block;
color: white;
background-image: linear-gradient(259deg, #A3629F 0%, #604385 100%);
box-shadow: 0 2px 8px 0 rgba(0,0,0,0.25);
border-radius: 50px;
padding: 0px 30pt;
white-space: nowrap;
transition: all .1s ease;
font-weight: 600;
text-decoration: none;
}
nav a.cta:hover {
text-decoration: none;
background-image: linear-gradient(259deg, #AE57A8 0%, #68419C 100%);
box-shadow: 0 4px 16px 0 rgba(0,0,0,0.25);
color: #f7f8f9;
}
main {
padding: 50px 0 0 0;
}
.flex {
display: flex;
margin: 0 auto;
max-width: 920px;
flex-wrap: wrap;
padding: 20px 20px;
justify-content: space-between;
}
.flex section {
/*margin: 20px;*/
margin-top: 40px;
width: 32%;
}
.flex section:first-child {
margin-left: 0px;
}
.flex section:last-child {
margin-right: 0px;
}
.flex section i {
float: left;
left: 0;
display: block;
margin: 0px auto 10px auto;
}
.flex section h3 {
margin-top: 0;
font-size: 14pt;
color: #684688;
margin-bottom: .5em;
font-weight: 300;
margin-left: 40px;
}
.flex section p {
padding-left: 40px;
color: #888;
font-size: 12pt;
margin: 0;
}
footer {
max-width: 700px;
margin: 20px auto;
padding: 0 20px 20px 20px;
font-size: 10pt;
opacity: .5;
text-align: center;
}
@media screen and (max-width: 680px) {
.flex {
display: block;
padding: 0;
}
.flex section {
width: 100%;
}
main {
padding: 20px;
margin: 0;
width: calc(100% - 40px);
}
nav a,
nav a#twitter-nav {
display: inline-block;
margin: 0px 10px;
}
nav a.cta {
display: block;
margin: 20px;
}
header #twitter {
display: none;
}
header #logo {
display: block;
float: none;
margin: 0px auto;
}
header #title br {
display: none;
}
}

126
docs/theme/index.html vendored Executable file
View file

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jrnl - The Command Line Journal</title>
<meta name="description" content="Collect your thoughts and notes without leaving the command line.">
<meta name="image" content="https://jrnl.sh/img/banner.png">
<meta itemprop="name" content="jrnl - The Command Line Journal">
<meta itemprop="description" content="Collect your thoughts and notes without leaving the command line.">
<meta itemprop="image" content="https://jrnl.sh/img/banner_og.png">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="jrnl - The Command Line Journal">
<meta name="twitter:description" content="Collect your thoughts and notes without leaving the command line.">
<meta name="twitter:creator" content="jrnl">
<meta name="twitter:image:src" content="https://jrnl.sh/img/banner_twitter.png">
<meta name="og:title" content="jrnl - The Command Line Journal">
<meta name="og:description" content="Collect your thoughts and notes without leaving the command line.">
<meta name="og:image" content="https://jrnl.sh/img/banner_og.png">
<meta name="og:url" content="https://jrnl.sh">
<meta name="og:site_name" content="jrnl - The Command Line Journal">
<meta name="og:type" content="website">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="index.css">
<link rel="shortcut icon" href="img/favicon.ico">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"applicationCategory": "https://schema.org/LifestyleApplication",
"name": "jrnl",
"description": "Collect your thoughts and notes without leaving the command line.",
"operatingSystem": ["macOS", "Windows", "Linux"],
"thumbnailUrl": "https://jrnl.sh/img/banner_og.png",
"installUrl": "https://jrnl.sh/installation",
"softwareVersion": "2.0.0rc2"
}
</script>
</head>
<body>
<header>
<aside>
<a id="twitter" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fjrnl.sh&via=maebert"><i class="icon twitter"></i>Tell your friends</a>
</aside>
<div id="title">
<img id="logo" src="img/jrnl_white.svg" width="90px" height="98px" title="jrnl" />
<h1>Collect your thoughts and notes <br />without leaving the command line.</h1>
</div>
<div id="prompt">
<div id="terminal">
<div id="typed"></div>
</div>
</div>
</header>
<main>
<nav>
<a href="overview">Documentation</a>
<a href="http://github.com/jrnl-org/jrnl" title="View on Github">Fork me on GitHub</a>
<a id="twitter-nav" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fjrnl.sh&via=maebert">Tell your friends on twitter</a>
<a href="installation" class="cta">Download</a>
</nav>
<div class="flex">
<section>
<i class="icon nli"></i>
<h3>Human friendly.</h3>
<p>jrnl has a natural-language interface so you don't have to remember cryptic shortcuts when you're writing down your thoughts.</p>
</section>
<section>
<i class="icon future"></i>
<h3>Future-proof.</h3>
<p>Your journals are stored in plain-text files that will still be readable in 50 years when all your fancy iPad apps will have gone the way of the Dodo.</p>
</section>
<section>
<i class="icon secure"></i>
<h3>Secure.</h3>
<p>Encrypt your journals with the industry-strength AES encryption. The NSA won't be able to read your dirty secrets.</p>
</section>
<section>
<i class="icon sync"></i>
<h3>Accessible anywhere.</h3>
<p>Sync your journals with Dropbox and capture your thoughts where ever you are</p>
</section>
<section>
<i class="icon dayone"></i>
<h3>DayOne compatible.</h3>
<p>Read, write and search your DayOne journal from the command line.</p>
</section>
<section>
<i class="icon github"></i>
<h3>Free &amp; Open Source.</h3>
<p>jrnl is made by a bunch of really friendly and remarkably attractive people. Maybe even <a href="https://www.github.com/jrnl-org/jrnl" title="Fork jrnl on GitHub">you</a>?</p>
</section>
<section>
<i class="icon folders"></i>
<h3>For work and play.</h3>
<p>Effortlessly access several journals for all parts of your life.</p>
</section>
</div>
</main>
<footer>
jrnl is made with love by <a rel="author" href="http://www.1450.me">Manuel Ebert</a> and <a href="https://github.com/jrnl-org/jrnl/graphs/contributors" title="Contributors">many other fabulous people</a>. If you need help, <a href="https://github.com/jrnl-org/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.
</footer>
<script src="//cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.10/typed.min.js"></script>
<script>
new Typed("#typed", {
strings: [
"jrnl today: Started writing my memoirs. On the command line. Like a boss.",
"jrnl yesterday 2pm: used jrnl to keep track of accomplished tasks. The done.txt for my todo.txt",
"jrnl <b>-from</b> 2009 <b>-until</b> may<br /><i>`(Displays all entries from January 2009 to last may)`</i>",
"jrnl A day on the beach with @beth and @frank. Taggidy-tag-tag.",
"jrnl <b>--tags</b><br /><i>`@idea 7<br />@beth 5</i>`",
"jrnl <b>--export</b> json<br /><i>`(Exports your entire journal to json)</i>`",
"jrnl <b>--encrypt</b><br /><i>`(256 bit AES encryption. Crack this, NSA)</i>`"
],
typeSpeed: 35,
backSpeed: 15,
backDelay: 2000,
loop: true,
showCursor: false
});
</script>
</body>
</html>

1
docs/theme/index.js vendored Normal file
View file

@ -0,0 +1 @@
var typed2 =

182
docs/usage.md Normal file
View file

@ -0,0 +1,182 @@
# 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
``` sh
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
``` sh
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 <advanced>`).
You can also import an entry directly from a file
``` sh
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
``` sh
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
``` sh
jrnl -n 10
```
will list you the ten latest entries (if you're lazy, `jrnl -10` will do
the same),
``` sh
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
``` sh
jrnl -starred
```
## Using Tags
Keep track of people, projects or locations, by tagging them with an `@`
in your entries
``` sh
jrnl Had a wonderful day on the @beach with @Tom and @Anna.
```
You can filter your journal entries just like this:
``` sh
jrnl @pinkie @WorldDomination
```
Will print all entries in which either `@pinkie` or `@WorldDomination`
occurred.
``` sh
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 or if you're using a DayOne
journal. To use this feature, you need to have an editor configured in
your journal configuration file (see `advanced usage <advanced>`)
``` sh
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
``` sh
jrnl @girlfriend -until 'june 2012' --edit
```
Just select all text, press delete, and everything is gone...
### Editing DayOne Journals
DayOne journals can be edited exactly the same way, however the output
looks a little bit different because of the way DayOne stores its
entries:
```md
# af8dbd0d43fb55458f11aad586ea2abf
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
But late at night when we're alone we mostly play Battleship.
# 2391048fe24111e1983ed49a20be6f9e
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
I just figured I'd be on the other side.
```
The long strings starting with hash symbol are the so-called UUIDs,
unique identifiers for each entry. Don't touch them. If you do, then the
old entry would get deleted and a new one written, which means that you
could lose DayOne data that jrnl can't handle (such as as the entry's
geolocation).

View file

@ -1,134 +0,0 @@
.. _usage:
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, :doc:`use an external editor <advanced>`).
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 or if you're using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see :doc:`advanced usage <advanced>`)::
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...
Editing DayOne Journals
~~~~~~~~~~~~~~~~~~~~~~~
DayOne journals can be edited exactly the same way, however the output looks a little bit different because of the way DayOne stores its entries:
.. code-block:: output
# af8dbd0d43fb55458f11aad586ea2abf
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
But late at night when we're alone we mostly play Battleship.
# 2391048fe24111e1983ed49a20be6f9e
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
I just figured I'd be on the other side.
The long strings starting with hash symbol are the so-called UUIDs, unique identifiers for each entry. Don't touch them. If you do, then the old entry would get deleted and a new one written, which means that you could lose DayOne data that jrnl can't handle (such as as the entry's geolocation).

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/brackets.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/mostlyreadabledates.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -9,6 +9,9 @@ journals:
ideas: features/journals/nothing.journal ideas: features/journals/nothing.journal
simple: features/journals/simple.journal simple: features/journals/simple.journal
work: features/journals/work.journal work: features/journals/work.journal
new_encrypted:
encrypt: true
journal: features/journals/new_encrypted.journal
linewrap: 80 linewrap: 80
password: '' password: ''
tagsymbols: '@' tagsymbols: '@'

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/unreadabledates.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -0,0 +1,2 @@
[2019-07-08 05:42] Entry subject
[1] line starting with 1

View file

@ -0,0 +1,8 @@
[2019-07-18 14:23] Entry subject
Time machines are possible. I know, because I've built one in my garage.
[2019-07-19 14:23] Entry subject
I'm going to activate the machine. Nobody knows what comes next after this. Or before this?
[2019-07 14:23] Entry subject
I've crossed so many timelines. Is there any going back?

View file

@ -1,3 +1,13 @@
2010-06-10 15:00 A life without chocolate is like a bad analogy. 2010-06-10 15:00 A life without chocolate is like a bad analogy.
2013-06-10 15:40 He said "[this] is the best time to be alive". 2013-06-10 15:40 He said "[this] is the best time to be alive".
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent malesuada
quis est ac dignissim. Aliquam dignissim rutrum pretium. Phasellus pellentesque
augue et venenatis facilisis.
[2019-08-03 12:55] Some chat log or something
Suspendisse potenti. Sed dignissim sed nisl eu consequat. Aenean ante ex,
elementum ut interdum et, mattis eget lacus. In commodo nulla nec tellus
placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at dolor
dui.

View file

@ -0,0 +1,5 @@
[ashasd7zdskhz7asdkjasd] Entry subject
I've lost track of time.
[sadfhakjsdf88sdf7sdff] Entry subject
Time has no meaning.

View file

@ -1,57 +0,0 @@
Feature: DayOne Ingetration
Scenario: Loading a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl -from 'feb 2013'"
Then we should get no error
and the output should be
"""
2013-05-17 11:39 This entry has tags!
2013-06-17 20:38 This entry has a location.
2013-07-17 11:38 This entry is starred!
"""
@skip
Scenario: Entries without timezone information will be interpreted as in the current timezone
Given we use the config "dayone.yaml"
When we run "jrnl -until 'feb 2013'"
Then we should get no error
and the output should contain "2013-01-17T18:37Z" in the local time
Scenario: Writing into Dayone
Given we use the config "dayone.yaml"
When we run "jrnl 01 may 1979: Being born hurts."
and we run "jrnl -until 1980"
Then the output should be
"""
1979-05-01 09:00 Being born hurts.
"""
Scenario: Loading tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl --tags"
Then the output should be
"""
@work : 1
@play : 1
"""
Scenario: Saving tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl A hard day at @work"
and we run "jrnl --tags"
Then the output should be
"""
@work : 2
@play : 1
"""
Scenario: Filtering by tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl @work"
Then the output should be
"""
2013-05-17 11:39 This entry has tags!
"""

View file

@ -29,14 +29,3 @@
When we run "jrnl simple -n 1" When we run "jrnl simple -n 1"
Then we should not see the message "Password" Then we should not see the message "Password"
and the output should contain "2013-06-10 15:40 Life is good" and the output should contain "2013-06-10 15:40 Life is good"
Scenario: Upgrading a journal encrypted with jrnl 1.x
Given we use the config "encrypted_old.json"
When we run "jrnl -n 1" and enter
"""
Y
bad doggie no biscuit
bad doggie no biscuit
"""
Then we should see the message "Password"
and the output should contain "2013-06-10 15:40 Life is good"

View file

@ -20,13 +20,6 @@ Feature: Exporting a Journal
and "tags" in the json output should contain "@journal" and "tags" in the json output should contain "@journal"
and "tags" in the json output should not contain "@dan" and "tags" in the json output should not contain "@dan"
Scenario: Exporting dayone to json
Given we use the config "dayone.yaml"
When we run "jrnl --export json"
Then we should get no error
and the output should be parsable as json
and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1"
Scenario: Exporting using custom templates Scenario: Exporting using custom templates
Given we use the config "basic.yaml" Given we use the config "basic.yaml"
Given we load template "sample.template" Given we load template "sample.template"
@ -49,11 +42,9 @@ Feature: Exporting a Journal
When we run "jrnl --export markdown" When we run "jrnl --export markdown"
Then the output should be Then the output should be
""" """
2015 # 2015
====
April ## April
-----
### 2015-04-14 13:23 Heading Test ### 2015-04-14 13:23 Heading Test

View file

@ -39,3 +39,8 @@ Feature: Multiple journals
Given we use the config "bug343.yaml" Given we use the config "bug343.yaml"
When we run "jrnl a long day in the office" When we run "jrnl a long day in the office"
Then we should see the message "No default journal configured" Then we should see the message "No default journal configured"
Scenario: Don't crash if no file exists for a configured encrypted journal
Given we use the config "multiple.yaml"
When we run "jrnl new_encrypted Adding first entry" and enter "these three eyes"
Then we should see the message "Journal 'new_encrypted' created"

View file

@ -8,12 +8,6 @@ Feature: Zapped bugs should stay dead.
When we run "jrnl -n 1" When we run "jrnl -n 1"
Then the output should not contain "Life is good" Then the output should not contain "Life is good"
Scenario: Opening an folder that's not a DayOne folder gives a nice error message
Given we use the config "empty_folder.yaml"
When we run "jrnl Herro"
Then we should get an error
Then we should see the message "is a directory, but doesn't seem to be a DayOne journal either"
Scenario: Date with time should be parsed correctly Scenario: Date with time should be parsed correctly
# https://github.com/maebert/jrnl/issues/117 # https://github.com/maebert/jrnl/issues/117
Given we use the config "basic.yaml" Given we use the config "basic.yaml"
@ -49,32 +43,22 @@ Feature: Zapped bugs should stay dead.
| Hope to get a lot of traffic. | Hope to get a lot of traffic.
""" """
Scenario: Upgrade and parse journals with square brackets Scenario: Integers in square brackets should not be read as dates
Given we use the config "upgrade_from_195.json" Given we use the config "brackets.yaml"
When we run "jrnl -2" and enter "Y"
Then the output should contain
"""
2010-06-10 15:00 A life without chocolate is like a bad analogy.
2013-06-10 15:40 He said "[this] is the best time to be alive".
"""
Scenario: Title with an embedded period on DayOne journal
Given we use the config "dayone.yaml"
When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch.""
Then we should see the message "Entry added"
When we run "jrnl -1" When we run "jrnl -1"
Then the output should be Then the output should contain "[1] line starting with 1"
"""
2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. Scenario: Journals with unreadable dates should still be viewable
| I'm feeling sore because I forgot to stretch. Given we use the config "unreadabledates.yaml"
""" When we run "jrnl -2"
Then the output should contain "I've lost track of time."
Then the output should contain "Time has no meaning."
Scenario: Journals with readable dates AND unreadable dates should still contain all data.
Given we use the config "mostlyreadabledates.yaml"
When we run "jrnl -3"
Then the output should contain "Time machines are possible."
When we run "jrnl -1"
Then the output should contain "I'm going to activate the machine."
Then the output should contain "I've crossed so many timelines. Is there any going back?"
Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case.
# https://github.com/maebert/jrnl/issues/354
Given we use the config "dayone.yaml"
When we run "jrnl @plAy"
Then the output should contain
"""
2013-05-17 11:39 This entry has tags!
"""

View file

@ -50,3 +50,35 @@ Feature: Tagging
@foo : 1 @foo : 1
@bar : 1 @bar : 1
""" """
Scenario: Excluding a tag should filter it
Given we use the config "basic.yaml"
When we run "jrnl today: @foo came over, we went to a bar"
When we run "jrnl I have decided I did not enjoy that @bar"
When we run "jrnl --tags -not @bar"
Then the output should be
"""
@foo : 1
"""
Scenario: Excluding a tag should filter an entry, even if an unfiltered tag is in that entry
Given we use the config "basic.yaml"
When we run "jrnl today: I do @not think this will show up @thought"
When we run "jrnl today: I think this will show up @thought"
When we run "jrnl --tags -not @not"
Then the output should be
"""
@thought : 1
"""
Scenario: Excluding multiple tags should filter them
Given we use the config "basic.yaml"
When we run "jrnl today: I do @not think this will show up @thought"
When we run "jrnl today: I think this will show up @thought"
When we run "jrnl today: This should @never show up @thought"
When we run "jrnl today: What a nice day for filtering @thought"
When we run "jrnl --tags -not @not @never"
Then the output should be
"""
@thought : 2
"""

23
features/upgrade.feature Normal file
View file

@ -0,0 +1,23 @@
Feature: Upgrading Journals from 1.x.x to 2.x.x
Scenario: Upgrade and parse journals with square brackets
Given we use the config "upgrade_from_195.json"
When we run "jrnl -9" and enter "Y"
Then the output should contain
"""
2010-06-10 15:00 A life without chocolate is like a bad analogy.
2013-06-10 15:40 He said "[this] is the best time to be alive".
"""
Then the journal should have 2 entries
Scenario: Upgrading a journal encrypted with jrnl 1.x
Given we use the config "encrypted_old.json"
When we run "jrnl -n 1" and enter
"""
Y
bad doggie no biscuit
bad doggie no biscuit
"""
Then we should see the message "Password"
and the output should contain "2013-06-10 15:40 Life is good"

View file

@ -5,7 +5,13 @@ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
import hashlib import hashlib
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends import default_backend
import sys
import os
import base64 import base64
import getpass
import logging
log = logging.getLogger()
def make_key(password): def make_key(password):
@ -27,6 +33,33 @@ class EncryptedJournal(Journal.Journal):
super(EncryptedJournal, self).__init__(name, **kwargs) super(EncryptedJournal, self).__init__(name, **kwargs)
self.config['encrypt'] = True self.config['encrypt'] = True
def open(self, filename=None):
"""Opens the journal file defined in the config and parses it into a list of Entries.
Entries have the form (date, title, body)."""
filename = filename or self.config['journal']
if not os.path.exists(filename):
password = util.getpass("Enter password for new journal: ")
if password:
if util.yesno("Do you want to store the password in your keychain?", default=True):
util.set_keychain(self.name, password)
else:
util.set_keychain(self.name, None)
self.config['password'] = password
text = ""
self._store(filename, text)
util.prompt("[Journal '{0}' created at {1}]".format(self.name, filename))
else:
util.prompt("No password supplied for encrypted journal")
sys.exit(1)
else:
text = self._load(filename)
self.entries = self._parse(text)
self.sort()
log.debug("opened %s with %d entries", self.__class__.__name__, len(self))
return self
def _load(self, filename, password=None): def _load(self, filename, password=None):
"""Loads an encrypted journal from a file and tries to decrypt it. """Loads an encrypted journal from a file and tries to decrypt it.
If password is not provided, will look for password in the keychain If password is not provided, will look for password in the keychain

View file

@ -84,9 +84,20 @@ class Journal(object):
def write(self, filename=None): def write(self, filename=None):
"""Dumps the journal into the config file, overwriting it""" """Dumps the journal into the config file, overwriting it"""
filename = filename or self.config['journal'] filename = filename or self.config['journal']
text = "\n".join([e.__unicode__() for e in self.entries]) text = self._to_text()
self._store(filename, text) self._store(filename, text)
def validate_parsing(self):
"""Confirms that the jrnl is still parsed correctly after being dumped to text."""
new_entries = self._parse(self._to_text())
for i, entry in enumerate(self.entries):
if entry != new_entries[i]:
return False
return True
def _to_text(self):
return "\n".join([e.__unicode__() for e in self.entries])
def _load(self, filename): def _load(self, filename):
raise NotImplementedError raise NotImplementedError
@ -99,8 +110,14 @@ class Journal(object):
def _parse(self, journal_txt): def _parse(self, journal_txt):
"""Parses a journal that's stored in a string and returns a list of entries""" """Parses a journal that's stored in a string and returns a list of entries"""
# Return empty array if the journal is blank
if not journal_txt:
return []
# Initialise our current entry # Initialise our current entry
entries = [] entries = []
date_blob_re = re.compile("(?:^|\n)\[([^\\]]+)\] ") date_blob_re = re.compile("(?:^|\n)\[([^\\]]+)\] ")
last_entry_pos = 0 last_entry_pos = 0
for match in date_blob_re.finditer(journal_txt): for match in date_blob_re.finditer(journal_txt):
@ -111,8 +128,12 @@ class Journal(object):
entries[-1].text = journal_txt[last_entry_pos:match.start()] entries[-1].text = journal_txt[last_entry_pos:match.start()]
last_entry_pos = match.end() last_entry_pos = match.end()
entries.append(Entry.Entry(self, date=new_date)) entries.append(Entry.Entry(self, date=new_date))
# Finish the last entry
if entries: # If no entries were found, treat all the existing text as an entry made now
if not entries:
entries.append(Entry.Entry(self, date=time.parse("now")))
# Fill in the text of the last entry
entries[-1].text = journal_txt[last_entry_pos:] entries[-1].text = journal_txt[last_entry_pos:]
for entry in entries: for entry in entries:
@ -165,7 +186,7 @@ class Journal(object):
tag_counts = set([(tags.count(tag), tag) for tag in tags]) tag_counts = set([(tags.count(tag), tag) for tag in tags])
return [Tag(tag, count=count) for count, tag in sorted(tag_counts)] return [Tag(tag, count=count) for count, tag in sorted(tag_counts)]
def filter(self, tags=[], start_date=None, end_date=None, starred=False, strict=False, short=False): def filter(self, tags=[], start_date=None, end_date=None, starred=False, strict=False, short=False, exclude=[]):
"""Removes all entries from the journal that don't match the filter. """Removes all entries from the journal that don't match the filter.
tags is a list of tags, each being a string that starts with one of the tags is a list of tags, each being a string that starts with one of the
@ -176,19 +197,24 @@ class Journal(object):
starred limits journal to starred entries starred limits journal to starred entries
If strict is True, all tags must be present in an entry. If false, the If strict is True, all tags must be present in an entry. If false, the
entry is kept if any tag is present."""
exclude is a list of the tags which should not appear in the results.
entry is kept if any tag is present, unless they appear in exclude."""
self.search_tags = set([tag.lower() for tag in tags]) self.search_tags = set([tag.lower() for tag in tags])
excluded_tags = set([tag.lower() for tag in exclude])
end_date = time.parse(end_date, inclusive=True) end_date = time.parse(end_date, inclusive=True)
start_date = time.parse(start_date) start_date = time.parse(start_date)
# If strict mode is on, all tags have to be present in entry # If strict mode is on, all tags have to be present in entry
tagged = self.search_tags.issubset if strict else self.search_tags.intersection tagged = self.search_tags.issubset if strict else self.search_tags.intersection
excluded = lambda tags: len([tag for tag in tags if tag in excluded_tags]) > 0
result = [ result = [
entry for entry in self.entries entry for entry in self.entries
if (not tags or tagged(entry.tags)) if (not tags or tagged(entry.tags))
and (not starred or entry.starred) and (not starred or entry.starred)
and (not start_date or entry.date >= start_date) and (not start_date or entry.date >= start_date)
and (not end_date or entry.date <= end_date) and (not end_date or entry.date <= end_date)
and (not exclude or not excluded(entry.tags))
] ]
self.entries = result self.entries = result
@ -207,7 +233,11 @@ class Journal(object):
if not date: if not date:
colon_pos = first_line.find(": ") colon_pos = first_line.find(": ")
if colon_pos > 0: if colon_pos > 0:
date = time.parse(raw[:colon_pos], default_hour=self.config['default_hour'], default_minute=self.config['default_minute']) date = time.parse(
raw[:colon_pos],
default_hour=self.config['default_hour'],
default_minute=self.config['default_minute']
)
if date: # Parsed successfully, strip that from the raw text if date: # Parsed successfully, strip that from the raw text
starred = raw[:colon_pos].strip().endswith("*") starred = raw[:colon_pos].strip().endswith("*")
raw = raw[colon_pos + 1:].strip() raw = raw[colon_pos + 1:].strip()
@ -269,6 +299,7 @@ class LegacyJournal(Journal):
# Initialise our current entry # Initialise our current entry
entries = [] entries = []
current_entry = None current_entry = None
new_date_format_regex = re.compile(r'(^\[[^\]]+\].*?$)')
for line in journal_txt.splitlines(): for line in journal_txt.splitlines():
line = line.rstrip() line = line.rstrip()
try: try:
@ -288,7 +319,9 @@ class LegacyJournal(Journal):
current_entry = Entry.Entry(self, date=new_date, text=line[date_length + 1:], starred=starred) current_entry = Entry.Entry(self, date=new_date, text=line[date_length + 1:], starred=starred)
except ValueError: except ValueError:
# Happens when we can't parse the start of the line as an date. # Happens when we can't parse the start of the line as an date.
# In this case, just append line to our body. # In this case, just append line to our body (after some
# escaping for the new format).
line = new_date_format_regex.sub(r' \1', line)
if current_entry: if current_entry:
current_entry.text += line + u"\n" current_entry.text += line + u"\n"
@ -314,7 +347,10 @@ def open_journal(name, config, legacy=False):
from . import DayOneJournal from . import DayOneJournal
return DayOneJournal.DayOne(**config).open() return DayOneJournal.DayOne(**config).open()
else: else:
util.prompt(u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal'])) util.prompt(
u"[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal'])
)
sys.exit(1) sys.exit(1)
if not config['encrypt']: if not config['encrypt']:

View file

@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line.
from __future__ import absolute_import from __future__ import absolute_import
__title__ = 'jrnl' __title__ = 'jrnl'
__version__ = '2.0.0-rc2' __version__ = '2.0.0-rc3'
__author__ = 'Manuel Ebert' __author__ = 'Manuel Ebert'
__license__ = 'MIT License' __license__ = 'MIT License'
__copyright__ = 'Copyright 2012 - 2016 Manuel Ebert' __copyright__ = 'Copyright 2012 - 2016 Manuel Ebert'

View file

@ -13,7 +13,7 @@ from . import Journal
from . import util from . import util
from . import install from . import install
from . import plugins from . import plugins
from .util import ERROR_COLOR, RESET_COLOR from .util import ERROR_COLOR, RESET_COLOR, UserAbort
import jrnl import jrnl
import argparse import argparse
import sys import sys
@ -39,6 +39,7 @@ def parse_args(args=None):
reading.add_argument('-and', dest='strict', action="store_true", help='Filter by tags using AND (default: OR)') reading.add_argument('-and', dest='strict', action="store_true", help='Filter by tags using AND (default: OR)')
reading.add_argument('-starred', dest='starred', action="store_true", help='Show only starred entries') reading.add_argument('-starred', dest='starred', action="store_true", help='Show only starred entries')
reading.add_argument('-n', dest='limit', default=None, metavar="N", help="Shows the last n entries matching the filter. '-n 3' and '-3' have the same effect.", nargs="?", type=int) reading.add_argument('-n', dest='limit', default=None, metavar="N", help="Shows the last n entries matching the filter. '-n 3' and '-3' have the same effect.", nargs="?", type=int)
reading.add_argument('-not', dest='excluded', nargs='+', default=[], metavar="E", help="Exclude entries with these tags")
exporting = parser.add_argument_group('Export / Import', 'Options for transmogrifying your journal') exporting = parser.add_argument_group('Export / Import', 'Options for transmogrifying your journal')
exporting.add_argument('-s', '--short', dest='short', action="store_true", help='Show only titles or line containing the search tags') exporting.add_argument('-s', '--short', dest='short', action="store_true", help='Show only titles or line containing the search tags')
@ -143,7 +144,12 @@ def run(manual_args=None):
print(util.py2encode(version_str)) print(util.py2encode(version_str))
sys.exit(0) sys.exit(0)
try:
config = install.load_or_install_jrnl() config = install.load_or_install_jrnl()
except UserAbort as err:
util.prompt("\n{}".format(err))
sys.exit(1)
if args.ls: if args.ls:
util.prnt(list_journals(config)) util.prnt(list_journals(config))
sys.exit(0) sys.exit(0)
@ -234,7 +240,8 @@ def run(manual_args=None):
start_date=args.start_date, end_date=args.end_date, start_date=args.start_date, end_date=args.end_date,
strict=args.strict, strict=args.strict,
short=args.short, short=args.short,
starred=args.starred) starred=args.starred,
exclude=args.excluded)
journal.limit(args.limit) journal.limit(args.limit)
# Reading mode # Reading mode

View file

@ -12,8 +12,10 @@ from . import upgrade
from . import __version__ from . import __version__
from .Journal import PlainJournal from .Journal import PlainJournal
from .EncryptedJournal import EncryptedJournal from .EncryptedJournal import EncryptedJournal
from .util import UserAbort
import yaml import yaml
import logging import logging
import sys
DEFAULT_CONFIG_NAME = 'jrnl.yaml' DEFAULT_CONFIG_NAME = 'jrnl.yaml'
DEFAULT_JOURNAL_NAME = 'journal.txt' DEFAULT_JOURNAL_NAME = 'journal.txt'
@ -86,12 +88,26 @@ def load_or_install_jrnl():
if os.path.exists(config_path): if os.path.exists(config_path):
log.debug('Reading configuration from file %s', config_path) log.debug('Reading configuration from file %s', config_path)
config = util.load_config(config_path) config = util.load_config(config_path)
try:
upgrade.upgrade_jrnl_if_necessary(config_path) upgrade.upgrade_jrnl_if_necessary(config_path)
except upgrade.UpgradeValidationException:
util.prompt("Aborting upgrade.")
util.prompt("Please tell us about this problem at the following URL:")
util.prompt("https://github.com/jrnl-org/jrnl/issues/new?title=UpgradeValidationException")
util.prompt("Exiting.")
sys.exit(1)
upgrade_config(config) upgrade_config(config)
return config return config
else: else:
log.debug('Configuration file not found, installing jrnl...') log.debug('Configuration file not found, installing jrnl...')
return install() try:
config = install()
except KeyboardInterrupt:
raise UserAbort("Installation aborted")
return config
def install(): def install():

View file

@ -3,6 +3,7 @@
from __future__ import absolute_import, unicode_literals, print_function from __future__ import absolute_import, unicode_literals, print_function
from .text_exporter import TextExporter from .text_exporter import TextExporter
import os
import re import re
import sys import sys
from ..util import WARNING_COLOR, RESET_COLOR from ..util import WARNING_COLOR, RESET_COLOR
@ -30,17 +31,17 @@ class MarkdownExporter(TextExporter):
previous_line = '' previous_line = ''
warn_on_heading_level = False warn_on_heading_level = False
for line in body.splitlines(True): for line in body.splitlines(True):
if re.match(r"#+ ", line): if re.match(r"^#+ ", line):
"""ATX style headings""" """ATX style headings"""
newbody = newbody + previous_line + heading + line newbody = newbody + previous_line + heading + line
if re.match(r"#######+ ", heading + line): if re.match(r"^#######+ ", heading + line):
warn_on_heading_level = True warn_on_heading_level = True
line = '' line = ''
elif re.match(r"=+$", line) and not re.match(r"^$", previous_line): elif re.match(r"^=+$", line.rstrip()) and not re.match(r"^$", previous_line.strip()):
"""Setext style H1""" """Setext style H1"""
newbody = newbody + heading + "# " + previous_line newbody = newbody + heading + "# " + previous_line
line = '' line = ''
elif re.match(r"-+$", line) and not re.match(r"^$", previous_line): elif re.match(r"^-+$", line.rstrip()) and not re.match(r"^$", previous_line.strip()):
"""Setext style H2""" """Setext style H2"""
newbody = newbody + heading + "## " + previous_line newbody = newbody + heading + "## " + previous_line
line = '' line = ''
@ -68,12 +69,12 @@ class MarkdownExporter(TextExporter):
for e in journal.entries: for e in journal.entries:
if not e.date.year == year: if not e.date.year == year:
year = e.date.year year = e.date.year
out.append(str(year)) out.append("# " + str(year))
out.append("=" * len(str(year)) + "\n") out.append("")
if not e.date.month == month: if not e.date.month == month:
month = e.date.month month = e.date.month
out.append(e.date.strftime("%B")) out.append("## " + e.date.strftime("%B"))
out.append('-' * len(e.date.strftime("%B")) + "\n") out.append("")
out.append(cls.export_entry(e, False)) out.append(cls.export_entry(e, False))
result = "\n".join(out) result = "\n".join(out)
return result return result

View file

@ -39,7 +39,8 @@ class Template(object):
return self._expand(self.blocks[block], **vars) return self._expand(self.blocks[block], **vars)
def _eval_context(self, vars): def _eval_context(self, vars):
e = asteval.Interpreter(symtable=vars, use_numpy=False, writer=None) e = asteval.Interpreter(use_numpy=False, writer=None)
e.symtable.update(vars)
e.symtable['__last_iteration'] = vars.get("__last_iteration", False) e.symtable['__last_iteration'] = vars.get("__last_iteration", False)
return e return e

View file

@ -3,6 +3,7 @@
from __future__ import absolute_import, unicode_literals, print_function from __future__ import absolute_import, unicode_literals, print_function
from .text_exporter import TextExporter from .text_exporter import TextExporter
import os
import re import re
import sys import sys
from ..util import WARNING_COLOR, ERROR_COLOR, RESET_COLOR from ..util import WARNING_COLOR, ERROR_COLOR, RESET_COLOR
@ -34,17 +35,17 @@ class YAMLExporter(TextExporter):
previous_line = '' previous_line = ''
warn_on_heading_level = False warn_on_heading_level = False
for line in entry.body.splitlines(True): for line in entry.body.splitlines(True):
if re.match(r"#+ ", line): if re.match(r"^#+ ", line):
"""ATX style headings""" """ATX style headings"""
newbody = newbody + previous_line + heading + line newbody = newbody + previous_line + heading + line
if re.match(r"#######+ ", heading + line): if re.match(r"^#######+ ", heading + line):
warn_on_heading_level = True warn_on_heading_level = True
line = '' line = ''
elif re.match(r"=+$", line) and not re.match(r"^$", previous_line): elif re.match(r"^=+$", line.rstrip()) and not re.match(r"^$", previous_line.strip()):
"""Setext style H1""" """Setext style H1"""
newbody = newbody + heading + "# " + previous_line newbody = newbody + heading + "# " + previous_line
line = '' line = ''
elif re.match(r"-+$", line) and not re.match(r"^$", previous_line): elif re.match(r"^-+$", line.rstrip()) and not re.match(r"^$", previous_line.strip()):
"""Setext style H2""" """Setext style H2"""
newbody = newbody + heading + "## " + previous_line newbody = newbody + heading + "## " + previous_line
line = '' line = ''

View file

@ -19,6 +19,10 @@ def parse(date_str, inclusive=False, default_hour=None, default_minute=None):
elif isinstance(date_str, datetime): elif isinstance(date_str, datetime):
return date_str return date_str
# Don't try to parse anything with 6 or less characters. It's probably a markdown footnote
if len(date_str) <= 6:
return None
default_date = DEFAULT_FUTURE if inclusive else DEFAULT_PAST default_date = DEFAULT_FUTURE if inclusive else DEFAULT_PAST
date = None date = None
year_present = False year_present = False

View file

@ -4,7 +4,7 @@ from . import __version__
from . import Journal from . import Journal
from . import util from . import util
from .EncryptedJournal import EncryptedJournal from .EncryptedJournal import EncryptedJournal
import sys from .util import UserAbort
import os import os
import codecs import codecs
@ -44,6 +44,7 @@ older versions of jrnl anymore.
encrypted_journals = {} encrypted_journals = {}
plain_journals = {} plain_journals = {}
other_journals = {} other_journals = {}
all_journals = []
for journal_name, journal_conf in config['journals'].items(): for journal_name, journal_conf in config['journals'].items():
if isinstance(journal_conf, dict): if isinstance(journal_conf, dict):
@ -76,28 +77,44 @@ older versions of jrnl anymore.
for journal, path in other_journals.items(): for journal, path in other_journals.items():
util.prompt(" {:{pad}} -> {}".format(journal, path, pad=longest_journal_name)) util.prompt(" {:{pad}} -> {}".format(journal, path, pad=longest_journal_name))
try:
cont = util.yesno("\nContinue upgrading jrnl?", default=False) cont = util.yesno("\nContinue upgrading jrnl?", default=False)
if not cont: if not cont:
util.prompt("jrnl NOT upgraded, exiting.") raise KeyboardInterrupt
sys.exit(1) except KeyboardInterrupt:
raise UserAbort("jrnl NOT upgraded, exiting.")
for journal_name, path in encrypted_journals.items(): for journal_name, path in encrypted_journals.items():
util.prompt("\nUpgrading encrypted '{}' journal stored in {}...".format(journal_name, path)) util.prompt("\nUpgrading encrypted '{}' journal stored in {}...".format(journal_name, path))
backup(path, binary=True) backup(path, binary=True)
old_journal = Journal.open_journal(journal_name, util.scope_config(config, journal_name), legacy=True) old_journal = Journal.open_journal(journal_name, util.scope_config(config, journal_name), legacy=True)
new_journal = EncryptedJournal.from_journal(old_journal) all_journals.append(EncryptedJournal.from_journal(old_journal))
new_journal.write()
util.prompt(" Done.")
for journal_name, path in plain_journals.items(): for journal_name, path in plain_journals.items():
util.prompt("\nUpgrading plain text '{}' journal stored in {}...".format(journal_name, path)) util.prompt("\nUpgrading plain text '{}' journal stored in {}...".format(journal_name, path))
backup(path) backup(path)
old_journal = Journal.open_journal(journal_name, util.scope_config(config, journal_name), legacy=True) old_journal = Journal.open_journal(journal_name, util.scope_config(config, journal_name), legacy=True)
new_journal = Journal.PlainJournal.from_journal(old_journal) all_journals.append(Journal.PlainJournal.from_journal(old_journal))
new_journal.write()
util.prompt(" Done.") # loop through lists to validate
failed_journals = [j for j in all_journals if not j.validate_parsing()]
if len(failed_journals) > 0:
util.prompt("\nThe following journal{} failed to upgrade:\n{}".format(
's' if len(failed_journals) > 1 else '', "\n".join(j.name for j in failed_journals))
)
raise UpgradeValidationException
# write all journals - or - don't
for j in all_journals:
j.write()
util.prompt("\nUpgrading config...") util.prompt("\nUpgrading config...")
backup(config_path) backup(config_path)
util.prompt("\nWe're all done here and you can start enjoying jrnl 2.".format(config_path)) util.prompt("\nWe're all done here and you can start enjoying jrnl 2.".format(config_path))
class UpgradeValidationException(Exception):
"""Raised when the contents of an upgraded journal do not match the old journal"""
pass

View file

@ -47,6 +47,10 @@ SENTENCE_SPLITTER = re.compile(r"""
)""", re.UNICODE | re.VERBOSE) )""", re.UNICODE | re.VERBOSE)
class UserAbort(Exception):
pass
def getpass(prompt="Password: "): def getpass(prompt="Password: "):
if not TEST: if not TEST:
return gp.getpass(bytes(prompt)) return gp.getpass(bytes(prompt))

23
mkdocs.yml Normal file
View file

@ -0,0 +1,23 @@
site_name: jrnl
theme:
name: readthedocs
custom_dir: docs/theme
static_templates:
- index.html
extra_css:
- https://fonts.googleapis.com/css?family=Open+Sans:300,600
- assets/theme.css
- assets/highlight.css
markdown_extensions:
- admonition
repo_url: https://github.com/jrnl-org/jrnl/
site_author: Manuel Ebert
site_description: Never Worry about Money Again.
nav:
- Overview: overview.md
- Quickstart: installation.md
- Basic Usage: usage.md
- Encryption: encryption.md
- Import and Export: export.md
- Advanced Usage: advanced.md
- Recipes: recipes.md

View file

@ -83,9 +83,9 @@ setup(
"parsedatetime>=1.5", "parsedatetime>=1.5",
"pytz>=2015.7", "pytz>=2015.7",
"six>=1.10.0", "six>=1.10.0",
"cryptography>=1.8", "cryptography>=1.4",
"tzlocal>=1.2", "tzlocal>=1.2",
"pyyaml>=3.11", "pyyaml>=5.1",
"keyring>=7.3", "keyring>=7.3",
"passlib>=1.6.2", "passlib>=1.6.2",
"pyxdg>=0.25", "pyxdg>=0.25",
@ -105,10 +105,7 @@ setup(
'Natural Language :: English', 'Natural Language :: English',
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Office/Business :: News/Diary', 'Topic :: Office/Business :: News/Diary',
'Topic :: Text Processing' 'Topic :: Text Processing'
], ],