From 89bcc2306fbc29c5bb675c5030e4df48ee82a9fa Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 10 Apr 2014 14:43:36 -0400 Subject: [PATCH 1/5] Improved docs for day one --- docs/advanced.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index 89771f28..e28975fe 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -51,13 +51,23 @@ The configuration file is a simple JSON file with the following options and can 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 ending with ``.dayone``, and it's located at +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. +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" + } + Multiple journal files ---------------------- From 02a2ecbf97da60d8410602a8e21fbea5ac0babbc Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 10 Apr 2014 15:57:24 -0400 Subject: [PATCH 2/5] Create path to journal during installation Fixes #152 --- jrnl/install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jrnl/install.py b/jrnl/install.py index fa78ca0c..128c7827 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -81,6 +81,12 @@ def install_jrnl(config_path='~/.jrnl_config'): password = None print("PyCrypto not found. To encrypt your journal, install the PyCrypto package from http://www.pycrypto.org or with 'pip install pycrypto' and run 'jrnl --encrypt'. For now, your journal will be stored in plain text.") + path = os.path.split(default_config['journals']['default'])[0] # If the folder doesn't exist, create it + try: + os.makedirs(path) + except OSError: + pass + open(default_config['journals']['default'], 'a').close() # Touch to make sure it's there # Write config to ~/.jrnl_conf From fc998b37585edd29f7670577bb778bc380773217 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 10 Apr 2014 15:57:35 -0400 Subject: [PATCH 3/5] Test on Python 3.4 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 12928624..35f34a63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ python: - "2.6" - "2.7" - "3.3" + - "3.4" install: - "pip install -e . --use-mirrors" - "pip install pycrypto>=2.6 --use-mirrors" @@ -11,6 +12,3 @@ install: script: - python --version - behave -matrix: - allow_failures: # python 3 support for travis is shaky.... - - python: 3.3 From f9b3e8ef1c8d900273b3a3949e554a839589a7ba Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 10 Apr 2014 15:58:06 -0400 Subject: [PATCH 4/5] Version bump --- CHANGELOG.md | 1 + jrnl/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 137cc1d3..e3887a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.7 (December 22, 2013) +* __1.7.19__ Creates full path to journal during installation if it doesn't exist yet * __1.7.18__ Small update to parsing regex * __1.7.17__ Fixes writing new lines between entries * __1.7.16__ Even more unicode fixes! diff --git a/jrnl/__init__.py b/jrnl/__init__.py index a96791e4..abed03dd 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line. from __future__ import absolute_import __title__ = 'jrnl' -__version__ = '1.7.18' +__version__ = '1.7.19' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' From a4304f2504aac29eed338b650f3b57d29fb9ffac Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 10 Apr 2014 16:18:36 -0400 Subject: [PATCH 5/5] No 3.4 on Travis yet :-( --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 35f34a63..278906eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ python: - "2.6" - "2.7" - "3.3" - - "3.4" +# - "3.4" # Not available on Travis yet, see https://github.com/travis-ci/travis-ci/issues/1989 install: - "pip install -e . --use-mirrors" - "pip install pycrypto>=2.6 --use-mirrors"