mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Merge branch 'master' of https://github.com/maebert/jrnl into fromfix
This commit is contained in:
commit
a9cef019ad
7 changed files with 31 additions and 2 deletions
|
@ -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)
|
||||
|
|
14
features/data/configs/tags-216.json
Normal file
14
features/data/configs/tags-216.json
Normal file
|
@ -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": "@"
|
||||
}
|
2
features/data/journals/tags-216.journal
Normal file
2
features/data/journals/tags-216.journal
Normal file
|
@ -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#).
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
"""
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue