jrnl-org / jrnl Goto Github PK
View Code? Open in Web Editor NEWCollect your thoughts and notes without leaving the command line.
Home Page: https://jrnl.sh
License: GNU General Public License v3.0
Collect your thoughts and notes without leaving the command line.
Home Page: https://jrnl.sh
License: GNU General Public License v3.0
I want @paper or @papers be the same. In the statistics and also in search.
this could either be defined in a separate file or much nice throuh just using them. Once you write somewhere @paper=@papers we will always use this identity. Nothing complicated needed, no new interface introduced, but when people know about it they can use it easily
otherwise you see this long tail of tags you used once
Pulled the latest version and tried the pip version,
I get an error on startup. Here's the trace:
Path to your journal file (leave blank for ~/journal.txt):
Enter password for journal (leave blank for no encryption):
clint not found. To turn on highlighting, install clint and set highlight to true in your .jrnl_conf.
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 9, in
load_entry_point('jrnl==1.0.0', 'console_scripts', 'jrnl')()
File "/usr/local/lib/python2.7/dist-packages/jrnl-1.0.0-py2.7.egg/jrnl/jrnl.py", line 165, in cli
journal = Journal.Journal(**config)
File "/usr/local/lib/python2.7/dist-packages/jrnl-1.0.0-py2.7.egg/jrnl/Journal.py", line 44, in init
consts = pdt.Constants()
File "/usr/local/lib/python2.7/dist-packages/parsedatetime/init.py", line 1733, in init
self.locale = pdtLocales'icu'
File "/usr/local/lib/python2.7/dist-packages/parsedatetime/pdt_locales.py", line 151, in init
self.icu = pyicu.Locale(localeID)
icu.InvalidArgsError: (<type 'icu.Locale'>, 'init', (None,))
Running OS X 10.8.3 and got the following message after attempting to run for the first time:
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pycrypto>=2.6
pycrypto doesn't play well in virtual environments and is potentially not fully platform-agnostic, so maybe it'd be wise to make it a recommended package to allow jrnl to work with unencrypted journals without the package.
I have a private diary and then often a labbook of a project I am working on. Sometimes several at the same time. It would be nice to tell jrnl on the commandline in which file I want to write. e.g.
jrnl lab
or
jrnl private
one could be set as default
to implement this we need the possibility to create a new file, delete one, set the default. etc..
should we provide commandline parameters to do this or should it be done by editing the config.json and we just document how this could be done?
If journal file lives in a git repository, commit journal file and push current branch after saving.
I am planning to add support for Jekyll and Letterpress blogs.
Will implement it the way DayOne journals are taken care of.
Any suggestions of any kind?
example
jrnl ma "@reading the @paper of schmucker 2007"
see discussion in #26
Not sure what the best practise regarding line separators is, though - should we use the system's default, or check what newline sequence the journal file uses and use that one for writing as well (ie. if the journal was created on Windows, use CR+LF even os.linesep is LF on *nix?
jrnl --decrypt plain.txt
Should leave the encrypted journal (and .jrnl_config
) untouched and create a new file plain.txt
with the decrypted version. Analogously for jrnl --encrypt cipher.txt
add an option to the config dictionary where one can set his favorite editor.
parsedatetime
supports German, Spanish and Australian (?) locales - these could be used with a config.locale
parameter
On the http://maebert.github.io/jrnl/ page, under the Usage heading, there is a spelling error. The first line of that section reads
jrnl has to modes: composing and viewing.
but it should read
jrnl has two modes: composing and viewing.
(Sorry for being such a pedant, but it jumped out at me.)
pip install worked fine but running jrnl gave me this error:
C:\Python27\Lib\site-packages\nvpy>jrnl
Traceback (most recent call last):
File "C:\Python27\Scripts\jrnl-script.py", line 9, in <module>
load_entry_point('jrnl==1.0.1', 'console_scripts', 'jrnl')()
File "C:\Python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 343,
in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2309
, in load_entry_point
return ep.load()
File "C:\Python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2015
, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "C:\Python27\lib\site-packages\jrnl\__init__.py", line 4, in <module>
from Journal import Journal
File "C:\Python27\lib\site-packages\jrnl\Journal.py", line 13, in <module>
import readline, glob
ImportError: No module named readline
Googling around eventually found this: http://stackoverflow.com/questions/6024952/readline-functionality-on-windows-with-python-2-7
Then: pip install pyreadline allowed me to run jrnl without modifying any jrnl code.
Installing collected packages: pyreadline
Running setup.py install for pyreadline
package init file 'pyreadline\configuration\__init__.py' not found (or not a regular file)
Successfully installed pyreadline
Cleaning up...
C:\Python27\Lib\site-packages\nvpy>jrnl
Path to your journal file (leave blank for ~/journal.txt):
add option (or even make it default behaviour) that when searching for a tag it does not return all entries containing the tag, but only the line containing the tag (or the 20 words around).
Could we maybe even highlight the tag? in color? this should be possible on a terminal.
Mac with homebrew installed and shipped with python 2.7.2. jrnl can be installed from repository just fine, or through pip. No matter which way I try, I always get the following error:
cmd# jrnl
Path to your journal file (leave blank for ~/journal.txt):
Enter password for journal (leave blank for no encryption):
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 8, in <module>
load_entry_point('jrnl==0.3.0', 'console_scripts', 'jrnl')()
File "/Library/Python/2.7/site-packages/jrnl/jrnl.py", line 147, in cli
journal = Journal.Journal(config=config)
File "/Library/Python/2.7/site-packages/jrnl/Journal.py", line 39, in __init__
self.entries = self.parse(journal_txt)
File "/Library/Python/2.7/site-packages/jrnl/Journal.py", line 126, in parse
current_entry.body += line + "\n"
AttributeError: 'NoneType' object has no attribute 'body'
add an option to jrnl to list all tags that were ever used. maye even with the number of how often they have been used, sorted in a way that the most frequently used tag appears first.
@maebert
As the title dictates. I want to use this wonderful little app on Arch Linux. I can't find a wiki entry for it, nor a package for it in the AUR.
Could it be possible you also offer a .tar.gz file? Or that you add it as an entry to the AUR packages?
Would really love to use this on Arch Linux or Linux in general. 😉
Hi,
(BTW, really enjoy using jrnl.)
I was wondering if there was some way of adding carriage returns as part of an entry, like if I wanted a list or just a new paragraph. I had 2 ideas of how to do this:
Thanks!
DayOne stores it's entries in individual plist files, so importing should be relatively easy. Can anyone supply a plist file from DayOne?
Eg. May 16
, entered on May 18 2012, will get May 16, 2013 instead of 2012. Default should always be past dates. The proper way to solve this may be a patch to parsedatetime
rather than jrnl itself, though.
Hi. jrnl is a beautiful thing! I am French, still using Windows XP, where Windows encoding is either Windows-1252 (in graphic mode) or OEM-863 (in old Dos console).
I also have Cygwin on my PC, but jrnl doesn't work with Cygwin's python 2.6.7, so I try to use it from Windows console, where I have ActivePython 2.7.2.5 running.
Trouble comes with special chars of French language: for example, I type 'à' in Dos console, get a 'à' in journal.txt (with is encoded in ANSI, as Notepad++ tells me), but that's a 'Ó' which displays back in looking at the journal. It seems like encoding was fine, but decoding was wrong, like writing in ANSI but reading in UTF-8. Or am I wrong?
Best regards,
Yves Pouplard
PS: some French, sample text:
2012-05-21 16:06 Ceci, celà, et ceci encore.
Amongst beaucoup, beaucoup d'autres choses !!!
2012-05-21 16:10 With some French, special chars.
From my azerty, French keyboard: éèçàù âêûîô äëÿüïö. §%$£¤~#.
Hi there,
I was looking into coding a program such as this one, thanks for your work.
However, I just lost one day of journal entries because one of the entry I added corrupted and deleted the whole journal.txt.
The character is a right single quotation mark. Ascii decimal code is 8217. I just tried with the sign € which has a similar code and same issue.
Here's my example:
jrnl You believe you’re right
[Entry added to default journal]
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 9, in
load_entry_point('jrnl==1.0.4', 'console_scripts', 'jrnl')()
File "/usr/local/lib/python2.7/dist-packages/jrnl-1.0.4-py2.7.egg/jrnl/jrnl.py", line 197, in cli
journal.write()
File "/usr/local/lib/python2.7/dist-packages/jrnl-1.0.4-py2.7.egg/jrnl/Journal.py", line 190, in write
journal_file.write(journal)
File "/usr/lib/python2.7/codecs.py", line 691, in write
return self.writer.write(data)
File "/usr/lib/python2.7/codecs.py", line 351, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 124: ordinal not in range(128)
After that, the journal is just empty. Everything's been deleted.
Any work around?
Thanks again
PS: This is my first time contributing/reporting an error in a program so I hope I am doing it right ;)
Since quite some time I use evernote to write down text and snippets. basically for what I now use jrnl for. But what I mainly used it for is organization of pictures, pdf, etc. some documents that I needed to tag and organize, maybe annotate. basic simple things which still cannot be done by the normal file system. I would like to use jrnl also for this. Here my ideas of how to achieve this..
I have installed jrnl with pip on my Archlinux. Then I tried to start it and get.
Traceback (most recent call last):
File "/usr/bin/jrnl", line 9, in <module>
load_entry_point('jrnl==1.0.1', 'console_scripts', 'jrnl')()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2310, in load_entry_point
return ep.load()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2016, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python3.3/site-packages/jrnl/__init__.py", line 4, in <module>
from Journal import Journal
ImportError: No module named 'Journal'
When an editor is configured, journal is started to compose a new entry but then the editor is closed without saving we receive an error message:
(jrnl)dedan@neuroinf37:~/projects/jrnl: jrnl
Traceback (most recent call last):
File "/Users/dedan/bin/jrnl", line 333, in <module>
with open(tmpfile) as f:
IOError: [Errno 2] No such file or directory: '/var/folders/j7/t878w0453x1gdl69d6mrcpqr0000gn/T/jrnl'
this could be handled in a nicer way
I noticed that jrnl
doesn't have man pages despite being a Linux command line tool. Personally I think this is a big problem.
Are there any plans to implement this soon? Is there any way I could probably help?
As the code gets longer and longer, we might split everything into smaller chunks. Proposed structrure
- LICENSE, README, CHANGELOG
- setup.py
- jrnl.py (only contains what is now in __main__)
+ jrnl
- Journal.py (contains the Journal class)
- Entry.py
- config.py (contains the setup() routine)
- jrnl_test.py
Objections / considerations?
Another issue trying to install 56a9c0b this afternoon:
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 8, in
load_entry_point('jrnl==1.0.4', 'console_scripts', 'jrnl')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1954, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "build/bdist.macosx-10.8-intel/egg/jrnl/init.py", line 15, in
File "build/bdist.macosx-10.8-intel/egg/jrnl/Journal.py", line 15, in
File "build/bdist.macosx-10.8-intel/egg/readline.py", line 6, in
File "build/bdist.macosx-10.8-intel/egg/pyreadline/init.py", line 11, in
File "build/bdist.macosx-10.8-intel/egg/pyreadline/modes/init.py", line 3, in
File "build/bdist.macosx-10.8-intel/egg/pyreadline/modes/emacs.py", line 16, in
File "build/bdist.macosx-10.8-intel/egg/pyreadline/modes/basemode.py", line 14, in
File "build/bdist.macosx-10.8-intel/egg/pyreadline/keysyms/init.py", line 7, in
ImportError: cannot import name winconstants
Sorry if this is my lack of python/unix knowledge; just trying to get this to work. Thanks again for the help.
If the journal file is corrupted or missing or whatever, you'll find out before loosing whatever you started to write.
If config.journal points to a folder, maybe use individual files for each entry?
After manually installing from a git clone I received the following error after specifying my journal location.
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 8, in <module>
load_entry_point('jrnl==1.0.1', 'console_scripts', 'jrnl')()
File "build/bdist.macosx-10.8-intel/egg/jrnl/jrnl.py", line 165, in cli
File "build/bdist.macosx-10.8-intel/egg/jrnl/Journal.py", line 50, in __init__
File "build/bdist.macosx-10.8-intel/egg/jrnl/Journal.py", line 137, in parse
AttributeError: 'NoneType' object has no attribute 'body'
same behavior for search or display as normal. But when used with a -pretty
flag the output will be nicely rendered to html and opened in your default browser. I think this is especially interesting with issue #37
i get an error installing jrnl on debian 6/python 2.6 (the same if using pip or git:
Extracting jrnl-1.0.3-py2.6.egg to /home/finkregh/.env/lib/python2.6/site-packages
SyntaxError: ('invalid syntax', ('/home/finkregh/.env/lib/python2.6/site-packages/jrnl-1.0.3-py2.6.egg/jrnl/jrnl.py', 108, 48, ' tag_counts = {(tags.count(tag), tag) for tag in tags}\n'))
or on starting:
$ jrnl
Traceback (most recent call last):
File "/home/finkregh/.env/bin/jrnl", line 9, in <module>
load_entry_point('jrnl==1.0.3', 'console_scripts', 'jrnl')()
File "/home/finkregh/.env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/finkregh/.env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/home/finkregh/.env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1948, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/finkregh/.env/lib/python2.6/site-packages/jrnl-1.0.3-py2.6.egg/jrnl/__init__.py", line 16, in <module>
from jrnl import cli
File "/home/finkregh/.env/lib/python2.6/site-packages/jrnl-1.0.3-py2.6.egg/jrnl/jrnl.py", line 108
tag_counts = {(tags.count(tag), tag) for tag in tags}
^
SyntaxError: invalid syntax
so i suppose there should be a check/dependency for python >2.6 somewhere...
If we get a nice representation in a browser (see #43), we could possibly make it interactive as well using flask - all run locally, with the beauty and simplicity of the web.
jrnl @Pinkie #WorldDomination
this does not work even when I have entries containing #WorldDomination
I think the reason is the argparse module. It filters out stuff which does not look like an argument.
If an encrypted journal file is corrupted, either the password won't work, or we can't get a proper IV:
Traceback (most recent call last):
(...)
File "/Users/maebert/code/jrnl/jrnl.py", line 118, in _decrypt
plain = crypto.decrypt(cipher[16:])
ValueError: Input strings must be a multiple of 16 in length
In either case, suggest that the journal file is corrupted.
$ jrnl --tags
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 9, in <module>
load_entry_point('jrnl==1.0.1', 'console_scripts', 'jrnl')()
File "/usr/local/lib/python2.7/dist-packages/jrnl/jrnl.py", line 197, in cli
print_tags(journal)
File "/usr/local/lib/python2.7/dist-packages/jrnl/jrnl.py", line 109, in print_tags
if min(tag_counts)[0] == 0:
ValueError: min() arg is an empty sequence
To convert an encrypted journal to a decrypted one (and vice versa),
jrnl --encrypt
should read the journal, encrypt it (asking for a password), save it and change ~/.jrnl_conf
so that config['encrypt'] = true
.
Currently the output is formatted for maximising your viewing pleasure on your shell, but Markdown export could render the Journal like this
Year
====
Month
-----
### Date, Title
Entry
### Date, Title
Entry
...
When I add an entry via the editor in a format like
a very nice day
@diary @day @trip
just came home and write ...
then a tag '@tripjust' is shown when looking at the tags via
jrnl --tags
Installed jrnl using pip on 10.8.3 today (20130419:14:30 EDT) (pip is up to date)
Please see errors, below.
Any thoughts?
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 8, in
load_entry_point('jrnl==1.0.3', 'console_scripts', 'jrnl')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1959, in load
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'jrnl' from '/Library/Python/2.7/site-packages/jrnl-1.0.3-py2.7.egg/jrnl/init.pyc'> has no 'cli' attribute
at least when text for new entry is directly given as a new parameter
example:
jrnl text mit übergeilem Inhalt
does not work. the argpase splits the input at the ü
some of my entries were created via the editor and contain blank lines for formatting. They are still in the text file but lost when output printed on commandline (e.g. via tag search). There should be an option to show the entry with the original formatting.
But we should also keep in mind not to introduce to many options. And the default option should always be the most intuitive and mostly used option
It seems that you're using AES in ECB mode. Now I'm really not a crypto expert, but word has it that ECB is not suitable for... well anything. See Wikipedia for example.
No matter what command I run with jrnl
I get the following error:
Traceback (most recent call last):
File "/usr/bin/jrnl", line 9, in <module>
load_entry_point('jrnl==1.0.2', 'console_scripts', 'jrnl')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2309, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2015, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/jrnl/__init__.py", line 15, in <module>
from Journal import Journal
File "/usr/lib/python2.7/site-packages/jrnl/Journal.py", line 6, in <module>
import parsedatetime.parsedatetime as pdt
ImportError: No module named parsedatetime.parsedatetime
I'm using the latest version of Arch Linux along with the E17 desktop environment. The latest version of it.
It would be great if we could have the feature to split the exported file into multiple markdown files containing an entry each. These files can then be used for multiple blogging systems like Jekyll as well as Letterpress
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.