Automatic versioning

This commit is contained in:
Manuel Ebert 2013-04-17 10:19:38 +02:00
parent 24f769cf66
commit b2a5b7b219
4 changed files with 23 additions and 3 deletions

View file

@ -5,6 +5,8 @@ Changelog
* [Improved] Installs pycrypto by default * [Improved] Installs pycrypto by default
* [Improved] Removed clint in favour of colorama * [Improved] Removed clint in favour of colorama
* [Fixed] Smaller fixes and typos
### 1.0.1 (March 12, 2013) ### 1.0.1 (March 12, 2013)
* [Fixed] Requires parsedatetime 1.1.2 or newer * [Fixed] Requires parsedatetime 1.1.2 or newer

View file

@ -44,7 +44,7 @@ The first time you run `jrnl` you will be asked where your journal file should b
Usage Usage
----- -----
_jrnl_ has to modes: __composing__ and __viewing__. _jrnl_ has two modes: __composing__ and __viewing__.
### 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 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 * `~/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. * `~/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: 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:

View file

@ -1,5 +1,16 @@
#!/usr/bin/env python #!/usr/bin/env python
# encoding: utf-8 # 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 Journal import Journal
from jrnl import cli from jrnl import cli

View file

@ -51,9 +51,16 @@ if sys.argv[-1] == 'publish':
base_dir = os.path.dirname(os.path.abspath(__file__)) 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( setup(
name = "jrnl", name = "jrnl",
version = "1.0.1", version = get_version(),
description = "A command line journal application that stores your journal in a plain text file", description = "A command line journal application that stores your journal in a plain text file",
packages = ['jrnl'], packages = ['jrnl'],
install_requires = [ install_requires = [