mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Merge pull request #154 from maebert/1.7.19
Create path to journal during installation
This commit is contained in:
commit
17361d7be5
5 changed files with 21 additions and 6 deletions
|
@ -3,6 +3,7 @@ python:
|
|||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
# - "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"
|
||||
|
@ -11,6 +12,3 @@ install:
|
|||
script:
|
||||
- python --version
|
||||
- behave
|
||||
matrix:
|
||||
allow_failures: # python 3 support for travis is shaky....
|
||||
- python: 3.3
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
----------------------
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue