From f9af744a29062b11061e6114419a62843aa9940e Mon Sep 17 00:00:00 2001 From: B Krishna Chaitanya Date: Fri, 27 Jun 2014 11:58:59 +0530 Subject: [PATCH 01/16] Changed regex to accept symbols --- jrnl/Entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 461014fe..66109f32 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -18,7 +18,7 @@ class Entry: def parse_tags(self): fulltext = " ".join([self.title, self.body]).lower() - tags = re.findall(r'(?u)([{tags}]\w+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) + tags = re.findall(r'(?u)([{tags}][^\s]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) self.tags = tags return set(tags) From 8b45458f90411b7423abe51765e3c01216c4e973 Mon Sep 17 00:00:00 2001 From: B Krishna Chaitanya Date: Fri, 27 Jun 2014 21:08:10 +0530 Subject: [PATCH 02/16] Include [-+/*#] in tag characters --- jrnl/Entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 66109f32..9ff4f64a 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -18,7 +18,7 @@ class Entry: def parse_tags(self): fulltext = " ".join([self.title, self.body]).lower() - tags = re.findall(r'(?u)([{tags}][^\s]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) + tags = re.findall(r'(?u)([{tags}][\w\+/\-\*#]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) self.tags = tags return set(tags) From 3f5b5ff3c361dcb62ae1492799aafe2e12f4137e Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Sat, 28 Jun 2014 17:55:08 +0200 Subject: [PATCH 03/16] Restrict --export argument Fixes #187 --- jrnl/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/cli.py b/jrnl/cli.py index 1428a535..ceb37c57 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -41,8 +41,8 @@ def parse_args(args=None): exporting = parser.add_argument_group('Export / Import', 'Options for transmogrifying your journal') exporting.add_argument('--short', dest='short', action="store_true", help='Show only titles or line containing the search tags') exporting.add_argument('--tags', dest='tags', action="store_true", help='Returns a list of all tags and number of occurences') - exporting.add_argument('--export', metavar='TYPE', dest='export', help='Export your journal. Options: json, text, markdown', default=False, const=None) - exporting.add_argument('-o', metavar='OUTPUT', dest='output', help='The output of the file can be provided when using with --export', default=False, const=None) + exporting.add_argument('--export', metavar='TYPE', dest='export', choices=['text','txt','markdown','md','json'], help='Export your journal. TYPE can be json, markdown, or text.', default=False, const=None) + exporting.add_argument('-o', metavar='OUTPUT', dest='output', help='Optionally specifies output file when using --export. If OUTPUT is a directory, exports each entry into an individual file instead.', default=False, const=None) exporting.add_argument('--encrypt', metavar='FILENAME', dest='encrypt', help='Encrypts your existing journal with a new password', nargs='?', default=False, const=None) exporting.add_argument('--decrypt', metavar='FILENAME', dest='decrypt', help='Decrypts your journal and stores it in plain text', nargs='?', default=False, const=None) exporting.add_argument('--edit', dest='edit', help='Opens your editor to edit the selected entries.', action="store_true") From b423bfc96326643991a8c5b191eb84082275676d Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Mon, 30 Jun 2014 07:01:33 +0200 Subject: [PATCH 04/16] Include the year in exported file name --- jrnl/exporters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/exporters.py b/jrnl/exporters.py index bdab3987..71919f34 100644 --- a/jrnl/exporters.py +++ b/jrnl/exporters.py @@ -100,7 +100,7 @@ def export(journal, format, output=None): def write_files(journal, path, format): """Turns your journal into separate files for each entry. Format should be either json, md or txt.""" - make_filename = lambda entry: e.date.strftime("%C-%m-%d_{0}.{1}".format(slugify(u(e.title)), format)) + make_filename = lambda entry: e.date.strftime("%Y-%m-%d_{0}.{1}".format(slugify(u(e.title)), format)) for e in journal.entries: full_path = os.path.join(path, make_filename(e)) if format == 'json': From 3a65ce227da5d346f4223944b3df87d5a7adb210 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 30 Jun 2014 10:26:54 +0200 Subject: [PATCH 05/16] Version bump & new recipes --- CHANGELOG.md | 1 + docs/recipes.rst | 34 ++++++++++++++++++++++++++++++++++ jrnl/__init__.py | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f39fbf4..1ebae8f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.8 (May 22, 2014) +* __1.8.5__ Fixed: file names when exporting to individual files contain full year (thanks to @jdevera) * __1.8.4__ Improved: using external editors (thanks to @chrissexton) * __1.8.3__ Fixed: export to text files and improves help (thanks to @igniteflow and @mpe) * __1.8.2__ Better integration with environment variables (thanks to @ajaam and @matze) diff --git a/docs/recipes.rst b/docs/recipes.rst index ffcc0643..98fce943 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -37,6 +37,40 @@ Will give you the number of words you wrote in 2013. How long is my average entr 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`` :: + + 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 ` 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 `_ :: + + 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 ---------------- diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 260d7f10..0984ff98 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.8.4' +__version__ = '1.8.5' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' From a2be5d25fc4900d015a478f43f078f89f7f49542 Mon Sep 17 00:00:00 2001 From: B Krishna Chaitanya Date: Mon, 30 Jun 2014 14:38:00 +0530 Subject: [PATCH 06/16] Unescaped -, + and * in regex --- jrnl/Entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 9ff4f64a..31b607c9 100644 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -18,7 +18,7 @@ class Entry: def parse_tags(self): fulltext = " ".join([self.title, self.body]).lower() - tags = re.findall(r'(?u)([{tags}][\w\+/\-\*#]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) + tags = re.findall(r'(?u)([{tags}][-+*#/\w]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) self.tags = tags return set(tags) From 2332fca6fe5800c7479df580781db519cdf7bee8 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 30 Jun 2014 11:14:25 +0200 Subject: [PATCH 07/16] New make options --- CONTRIBUTING.md | 2 +- Makefile | 7 +++++++ docs/_themes/jrnl/static/less/docs.less | 8 ++------ docs/recipes.rst | 10 +++++++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e4bddef..2a6dfe7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ If you use jrnl, you can totally make my day by just saying "thanks for the code 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 docs, and then open `docs/_build/html/index.html` in your browser. Changes to the CSS or Javascript should be made on `docs/_themes/jrnl/`. The `gh-pages` branch is automatically maintained and updates from `master`. +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) 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. Bugs ---- diff --git a/Makefile b/Makefile index 51939f90..56eb4598 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,13 @@ clean: rm -rf _static rm -f *.html +html: + 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 .. ;\ + open docs/_build/html/index.html ;\ # Build GitHub Page from docs docs: diff --git a/docs/_themes/jrnl/static/less/docs.less b/docs/_themes/jrnl/static/less/docs.less index 3eaa34b3..eb12bb48 100644 --- a/docs/_themes/jrnl/static/less/docs.less +++ b/docs/_themes/jrnl/static/less/docs.less @@ -108,15 +108,11 @@ a:hover, a:active { background:transparent !important; } -.highlight-output - { - .pre-block; - background: desaturate(lighten(@terminal,10), 10); - } -.highlight-javascript +.highlight-output, .highlight-javascript, .highlight-sh { .pre-block; background: desaturate(lighten(@terminal,10), 10); + pre {color: white;} } .highlight-python { diff --git a/docs/recipes.rst b/docs/recipes.rst index 98fce943..e1aef9a9 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -44,7 +44,9 @@ If you want to import a file as an entry to jrnl, you can just do ``jrnl < entry 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`` :: +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 @@ -57,9 +59,11 @@ Using templates Say you always want to use the same template for creating new entries. If you have an :doc:`external editor ` set up, you can use this :: jrnl < my_template.txt - jrnl -1 --edit + $ jrnl -1 --edit -Another nice solution that allows you to define individual prompts comes from `Jacobo de Vera `_ :: +Another nice solution that allows you to define individual prompts comes from `Jacobo de Vera `_: + +.. code-block:: sh function log_question() { From 9871221fb20901907595bea1c4527a5e30e53bc3 Mon Sep 17 00:00:00 2001 From: grplyler Date: Mon, 30 Jun 2014 18:39:06 +0800 Subject: [PATCH 08/16] Fixed typo in CONTRIBUTING.md Changed "sooner or later get implement it" to "sooner or later get implemented." --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e4bddef..c8f8d0e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ They unfortunately happen. Specifically, I don't have a Windows machine to test 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 implement it. Even sooner if you roll up your sleeves and code it yourself ;-) +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 ;-) Keep in mind that the design goal of jrnl is to be _slim_. That means From 15b7d2603c7015c53cc2558536703312f4ca29e4 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 30 Jun 2014 18:00:38 +0200 Subject: [PATCH 09/16] Notes on encryption --- .gitignore | 2 ++ CONTRIBUTING.md | 2 +- docs/encryption.rst | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1a8fd1b8..40fd38d0 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,5 @@ obj # virtaulenv env/ env*/ + +docs/_themes/jrnl/static/less/3L.less diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a6dfe7b..55d53ce7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ If you use jrnl, you can totally make my day by just saying "thanks for the code 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) 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, 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. Bugs ---- diff --git a/docs/encryption.rst b/docs/encryption.rst index 9d420df6..37d341a8 100644 --- a/docs/encryption.rst +++ b/docs/encryption.rst @@ -25,6 +25,12 @@ Whenever you encrypt your journal, you are asked whether you want to store the e 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 `_ services such as Dropbox. If you're concerned about security, disable history logging for journal in your ``.bashrc`` :: + + HISTINGNORE="jrnl *" Manual decryption ----------------- From 4df3571b47d7f3e05b428a3e1959dab3b7d13291 Mon Sep 17 00:00:00 2001 From: Ryan Plyler Date: Wed, 2 Jul 2014 21:34:31 +0800 Subject: [PATCH 10/16] Added PyCharm project files to .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 40fd38d0..3b171aba 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,9 @@ env/ env*/ docs/_themes/jrnl/static/less/3L.less + +# PyCharm Project files +.idea/ + +# export testing director +exp/ From c05fdfdad71dc6f4eef7ce0e0714837430a9f675 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Wed, 2 Jul 2014 15:34:08 +0200 Subject: [PATCH 11/16] Tests for tagging --- features/data/configs/tags-216.json | 14 ++++++++++++++ features/data/journals/tags-216.journal | 2 ++ features/data/journals/tags.journal | 1 + features/tagging.feature | 11 +++++++++++ 4 files changed, 28 insertions(+) create mode 100644 features/data/configs/tags-216.json create mode 100644 features/data/journals/tags-216.journal diff --git a/features/data/configs/tags-216.json b/features/data/configs/tags-216.json new file mode 100644 index 00000000..4164d6f5 --- /dev/null +++ b/features/data/configs/tags-216.json @@ -0,0 +1,14 @@ +{ + "default_hour": 9, + "timeformat": "%Y-%m-%d %H:%M", + "linewrap": 80, + "encrypt": false, + "editor": "", + "default_minute": 0, + "highlight": true, + "password": "", + "journals": { + "default": "features/journals/tags-216.journal" + }, + "tagsymbols": "@" +} diff --git a/features/data/journals/tags-216.journal b/features/data/journals/tags-216.journal new file mode 100644 index 00000000..4bd942b9 --- /dev/null +++ b/features/data/journals/tags-216.journal @@ -0,0 +1,2 @@ +2013-06-10 15:40 I programmed for @OS/2. +Almost makes me want to go back to @C++, though. (Still better than @C#). diff --git a/features/data/journals/tags.journal b/features/data/journals/tags.journal index bfd49cf4..b4186a53 100644 --- a/features/data/journals/tags.journal +++ b/features/data/journals/tags.journal @@ -5,3 +5,4 @@ 2013-06-10 15:40 I met with @dan. As alway's he shared his latest @idea on how to rule the world with me. +inst diff --git a/features/tagging.feature b/features/tagging.feature index a30c1052..2d317938 100644 --- a/features/tagging.feature +++ b/features/tagging.feature @@ -20,3 +20,14 @@ Feature: Tagging @idea : 1 @dan : 1 """ + + Scenario: Tags should allow certain special characters + Given we use the config "tags-216.json" + When we run "jrnl --tags" + Then we should get no error + and the output should be + """ + @os/2 : 1 + @c++ : 1 + @c# : 1 + """ From 53e947ac18d020f23d53032a415a7caf1ddc3ac5 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Wed, 2 Jul 2014 15:36:04 +0200 Subject: [PATCH 12/16] 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 1ebae8f5..11d5e9ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.8 (May 22, 2014) +* __1.8.5__ Improved: Tags like @C++ and @OS/2 work, too (thanks to @chaitan94) * __1.8.5__ Fixed: file names when exporting to individual files contain full year (thanks to @jdevera) * __1.8.4__ Improved: using external editors (thanks to @chrissexton) * __1.8.3__ Fixed: export to text files and improves help (thanks to @igniteflow and @mpe) diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 0984ff98..5e4bb1af 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.8.5' +__version__ = '1.8.6' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' From 6f4ab856d3145cc85084dfcbbe591bcd249b43c2 Mon Sep 17 00:00:00 2001 From: Ryan Plyler Date: Wed, 2 Jul 2014 21:43:38 +0800 Subject: [PATCH 13/16] 'jrnl -from' times now match greater/less than or equal to start and end times --- jrnl/Journal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 35bdc395..0eb0ce5c 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -220,8 +220,8 @@ class Journal(object): entry for entry in self.entries if (not tags or tagged(entry.tags)) and (not starred or entry.starred) - and (not start_date or entry.date > start_date) - and (not end_date or entry.date < end_date) + and (not start_date or entry.date >= start_date) + and (not end_date or entry.date <= end_date) ] if short: if tags: From f3871aab02265243ab5837f82664434f9aca04a1 Mon Sep 17 00:00:00 2001 From: Ryan Plyler Date: Wed, 2 Jul 2014 21:34:31 +0800 Subject: [PATCH 14/16] Added PyCharm project files to .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 40fd38d0..3b171aba 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,9 @@ env/ env*/ docs/_themes/jrnl/static/less/3L.less + +# PyCharm Project files +.idea/ + +# export testing director +exp/ From 85826ca77bb877cf2fdac58eda1c1e20e08d2cfa Mon Sep 17 00:00:00 2001 From: Ryan Plyler Date: Wed, 2 Jul 2014 21:43:38 +0800 Subject: [PATCH 15/16] 'jrnl -from' times now match greater/less than or equal to start and end times --- jrnl/Journal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 35bdc395..0eb0ce5c 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -220,8 +220,8 @@ class Journal(object): entry for entry in self.entries if (not tags or tagged(entry.tags)) and (not starred or entry.starred) - and (not start_date or entry.date > start_date) - and (not end_date or entry.date < end_date) + and (not start_date or entry.date >= start_date) + and (not end_date or entry.date <= end_date) ] if short: if tags: From fd529a485c49bec5ae7e4fa9f1d735db1ef9ed36 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 3 Jul 2014 09:13:07 +0200 Subject: [PATCH 16/16] Version bump to 1.8.7 --- CHANGELOG.md | 3 ++- jrnl/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11d5e9ff..b3629c27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ Changelog ### 1.8 (May 22, 2014) -* __1.8.5__ Improved: Tags like @C++ and @OS/2 work, too (thanks to @chaitan94) +* __1.8.7__ Fixed: -from and -to filters are inclusive (thanks to @grplyler) +* __1.8.6__ Improved: Tags like @C++ and @OS/2 work, too (thanks to @chaitan94) * __1.8.5__ Fixed: file names when exporting to individual files contain full year (thanks to @jdevera) * __1.8.4__ Improved: using external editors (thanks to @chrissexton) * __1.8.3__ Fixed: export to text files and improves help (thanks to @igniteflow and @mpe) diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 5e4bb1af..516b60f5 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.8.6' +__version__ = '1.8.7' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'