From b2a5b7b219531686cf3897f6ce7d9555a74d04c7 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Wed, 17 Apr 2013 10:19:38 +0200 Subject: [PATCH] Automatic versioning --- CHANGELOG.md | 2 ++ README.md | 4 ++-- jrnl/__init__.py | 11 +++++++++++ setup.py | 9 ++++++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 768d63bf..f83c9c6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Changelog * [Improved] Installs pycrypto by default * [Improved] Removed clint in favour of colorama +* [Fixed] Smaller fixes and typos + ### 1.0.1 (March 12, 2013) * [Fixed] Requires parsedatetime 1.1.2 or newer diff --git a/README.md b/README.md index 35d32bf5..f3c1d2ba 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The first time you run `jrnl` you will be asked where your journal file should b Usage ----- -_jrnl_ has to modes: __composing__ and __viewing__. +_jrnl_ has two modes: __composing__ and __viewing__. ### Viewing: @@ -168,7 +168,7 @@ The configuration file is a simple JSON file with the following options. Using your DayOne journal instead of a flat text file is dead simple - instead of pointing to a text file, set the `"journal"` key in your `.jrnl_conf` to point to your DayOne journal. This is a folder ending with `.dayone`, and it's located at * `~/Library/Application Support/Day One/` by default - * `~/Dropbox/Apps/Day One/` if you're syncing with Dropbox and + * `~/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. You can also star entries when you write them: diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 2c6ba2a0..9ef435f4 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -1,5 +1,16 @@ #!/usr/bin/env python # encoding: utf-8 + +""" +jrnl is a simple journal application for your command line. +""" + +__title__ = 'jrnl' +__version__ = '1.0.2' +__author__ = 'Manuel Ebert' +__license__ = 'MIT License' +__copyright__ = 'Copyright 2013 Manuel Ebert' + from Journal import Journal from jrnl import cli diff --git a/setup.py b/setup.py index cdf8ee38..67bf45e1 100644 --- a/setup.py +++ b/setup.py @@ -51,9 +51,16 @@ if sys.argv[-1] == 'publish': base_dir = os.path.dirname(os.path.abspath(__file__)) +def get_version(filename="kerouac/__init__.py"): + with open(os.path.join(base_dir, filename)) as initfile: + for line in initfile.readlines(): + m = re.match("__version__ *= *['\"](.*)['\"]", line) + if m: + return m.group(1) + setup( name = "jrnl", - version = "1.0.1", + version = get_version(), description = "A command line journal application that stores your journal in a plain text file", packages = ['jrnl'], install_requires = [