mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-08 01:06:12 +02:00
Updated docs from master
This commit is contained in:
parent
f08242f719
commit
063a9e7ba0
41 changed files with 68 additions and 80 deletions
BIN
jrnl/Entry.pyc
BIN
jrnl/Entry.pyc
Binary file not shown.
|
@ -21,11 +21,6 @@ try:
|
|||
except ImportError:
|
||||
crypto_installed = False
|
||||
import hashlib
|
||||
try:
|
||||
import colorama
|
||||
colorama.init()
|
||||
except ImportError:
|
||||
colorama = None
|
||||
import plistlib
|
||||
import pytz
|
||||
import uuid
|
||||
|
@ -57,12 +52,6 @@ class Journal(object):
|
|||
"""Returns the number of entries"""
|
||||
return len(self.entries)
|
||||
|
||||
def _colorize(self, string):
|
||||
if colorama:
|
||||
return colorama.Fore.CYAN + string + colorama.Fore.RESET
|
||||
else:
|
||||
return string
|
||||
|
||||
def _decrypt(self, cipher):
|
||||
"""Decrypts a cipher string using self.key as the key and the first 16 byte of the cipher as the IV"""
|
||||
if not crypto_installed:
|
||||
|
@ -174,11 +163,11 @@ class Journal(object):
|
|||
for tag in self.search_tags:
|
||||
tagre = re.compile(re.escape(tag), re.IGNORECASE)
|
||||
pp = re.sub(tagre,
|
||||
lambda match: self._colorize(match.group(0)),
|
||||
lambda match: util.colorize(match.group(0)),
|
||||
pp, re.UNICODE)
|
||||
else:
|
||||
pp = re.sub(r"(?u)([{tags}]\w+)".format(tags=self.config['tagsymbols']),
|
||||
lambda match: self._colorize(match.group(0)),
|
||||
lambda match: util.colorize(match.group(0)),
|
||||
pp)
|
||||
return pp
|
||||
|
||||
|
|
BIN
jrnl/Journal.pyc
BIN
jrnl/Journal.pyc
Binary file not shown.
|
@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
|
|||
"""
|
||||
|
||||
__title__ = 'jrnl'
|
||||
__version__ = '1.7.3'
|
||||
__version__ = '1.7.4'
|
||||
__author__ = 'Manuel Ebert'
|
||||
__license__ = 'MIT License'
|
||||
__copyright__ = 'Copyright 2013 Manuel Ebert'
|
||||
|
|
Binary file not shown.
BIN
jrnl/cli.pyc
BIN
jrnl/cli.pyc
Binary file not shown.
Binary file not shown.
|
@ -82,11 +82,6 @@ def install_jrnl(config_path='~/.jrnl_config'):
|
|||
password = None
|
||||
print("PyCrypto not found. To encrypt your journal, install the PyCrypto package from http://www.pycrypto.org or with 'pip install pycrypto' and run 'jrnl --encrypt'. For now, your journal will be stored in plain text.")
|
||||
|
||||
# Use highlighting:
|
||||
if not module_exists("colorama"):
|
||||
print("colorama not found. To turn on highlighting, install colorama and set highlight to true in your .jrnl_conf.")
|
||||
default_config['highlight'] = False
|
||||
|
||||
open(default_config['journals']['default'], 'a').close() # Touch to make sure it's there
|
||||
|
||||
# Write config to ~/.jrnl_conf
|
||||
|
|
BIN
jrnl/install.pyc
BIN
jrnl/install.pyc
Binary file not shown.
BIN
jrnl/jrnl.pyc
BIN
jrnl/jrnl.pyc
Binary file not shown.
|
@ -139,3 +139,7 @@ def get_text_from_editor(config, template=""):
|
|||
prompt('[Nothing saved to file]')
|
||||
return raw
|
||||
|
||||
def colorize(string):
|
||||
"""Returns the string wrapped in cyan ANSI escape"""
|
||||
return u"\033[36m{}\033[39m".format(string)
|
||||
|
||||
|
|
BIN
jrnl/util.pyc
BIN
jrnl/util.pyc
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue