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
09a96d832f
commit
1fb5cca898
55 changed files with 310 additions and 218 deletions
BIN
jrnl/Entry.pyc
BIN
jrnl/Entry.pyc
Binary file not shown.
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.5'
|
||||
__version__ = '1.7.6'
|
||||
__author__ = 'Manuel Ebert'
|
||||
__license__ = 'MIT License'
|
||||
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
||||
|
|
Binary file not shown.
BIN
jrnl/__pycache__/Entry.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/Entry.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/Journal.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/Journal.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/__init__.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/__init__.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/cli.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/cli.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/exporters.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/exporters.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/install.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/install.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/__pycache__/util.cpython-33.pyc
Normal file
BIN
jrnl/__pycache__/util.cpython-33.pyc
Normal file
Binary file not shown.
BIN
jrnl/cli.pyc
BIN
jrnl/cli.pyc
Binary file not shown.
|
@ -3,12 +3,10 @@
|
|||
|
||||
import os
|
||||
import string
|
||||
try: from slugify import slugify
|
||||
except ImportError: import slugify
|
||||
try: import simplejson as json
|
||||
except ImportError: import json
|
||||
try: from .util import u
|
||||
except (SystemError, ValueError): from util import u
|
||||
try: from .util import u, slugify
|
||||
except (SystemError, ValueError): from util import u, slugify
|
||||
|
||||
|
||||
def get_tags_count(journal):
|
||||
|
|
Binary file not shown.
BIN
jrnl/install.pyc
BIN
jrnl/install.pyc
Binary file not shown.
BIN
jrnl/jrnl.pyc
BIN
jrnl/jrnl.pyc
Binary file not shown.
12
jrnl/util.py
12
jrnl/util.py
|
@ -15,6 +15,7 @@ import re
|
|||
import tempfile
|
||||
import subprocess
|
||||
import codecs
|
||||
import unicodedata
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
@ -144,3 +145,14 @@ def colorize(string):
|
|||
"""Returns the string wrapped in cyan ANSI escape"""
|
||||
return u"\033[36m{}\033[39m".format(string)
|
||||
|
||||
def slugify(string):
|
||||
"""Slugifies a string.
|
||||
Based on public domain code from https://github.com/zacharyvoase/slugify
|
||||
and ported to deal with all kinds of python 2 and 3 strings
|
||||
"""
|
||||
string = u(string)
|
||||
ascii_string = str(unicodedata.normalize('NFKD', string).encode('ascii', 'ignore'))
|
||||
no_punctuation = re.sub(r'[^\w\s-]', '', ascii_string).strip().lower()
|
||||
slug = re.sub(r'[-\s]+', '-', no_punctuation)
|
||||
return u(slug)
|
||||
|
||||
|
|
BIN
jrnl/util.pyc
BIN
jrnl/util.pyc
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue