mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 03:28:31 +02:00
Updated docs from master
This commit is contained in:
parent
40f406f6e2
commit
48e3128497
35 changed files with 301 additions and 60 deletions
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Advanced Usage — jrnl 1.6.5 documentation</title>
|
||||
<title>Advanced Usage — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="FAQ" href="recipes.html" />
|
||||
<link rel="prev" title="Import and Export" href="export.html" />
|
||||
|
||||
|
|
BIN
docs/_build/doctrees/environment.pickle
vendored
BIN
docs/_build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/_build/doctrees/index.doctree
vendored
BIN
docs/_build/doctrees/index.doctree
vendored
Binary file not shown.
2
docs/_build/html/.buildinfo
vendored
2
docs/_build/html/.buildinfo
vendored
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 8f6d857a8d7bdd64dbca4bbbad00b7ad
|
||||
config: cdd3d9dc24c56f542788a30876de826e
|
||||
tags: fbb0d17656682115ca4d033fb2f83ba1
|
||||
|
|
6
docs/_build/html/advanced.html
vendored
6
docs/_build/html/advanced.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Advanced Usage — jrnl 1.6.5 documentation</title>
|
||||
<title>Advanced Usage — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="FAQ" href="recipes.html" />
|
||||
<link rel="prev" title="Import and Export" href="export.html" />
|
||||
|
||||
|
|
6
docs/_build/html/encryption.html
vendored
6
docs/_build/html/encryption.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Encryption — jrnl 1.6.5 documentation</title>
|
||||
<title>Encryption — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Import and Export" href="export.html" />
|
||||
<link rel="prev" title="Basic Usage" href="usage.html" />
|
||||
|
||||
|
|
6
docs/_build/html/export.html
vendored
6
docs/_build/html/export.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Import and Export — jrnl 1.6.5 documentation</title>
|
||||
<title>Import and Export — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Advanced Usage" href="advanced.html" />
|
||||
<link rel="prev" title="Encryption" href="encryption.html" />
|
||||
|
||||
|
|
6
docs/_build/html/genindex.html
vendored
6
docs/_build/html/genindex.html
vendored
|
@ -9,7 +9,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — jrnl 1.6.5 documentation</title>
|
||||
<title>Index — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -17,7 +17,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -26,7 +26,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||
|
|
6
docs/_build/html/installation.html
vendored
6
docs/_build/html/installation.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Getting started — jrnl 1.6.5 documentation</title>
|
||||
<title>Getting started — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Basic Usage" href="usage.html" />
|
||||
<link rel="prev" title="Overview" href="overview.html" />
|
||||
|
||||
|
|
BIN
docs/_build/html/objects.inv
vendored
BIN
docs/_build/html/objects.inv
vendored
Binary file not shown.
6
docs/_build/html/overview.html
vendored
6
docs/_build/html/overview.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Overview — jrnl 1.6.5 documentation</title>
|
||||
<title>Overview — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Getting started" href="installation.html" />
|
||||
<link rel="prev" title="jrnl: The command-line journal" href="index.html" />
|
||||
|
||||
|
|
6
docs/_build/html/recipes.html
vendored
6
docs/_build/html/recipes.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>FAQ — jrnl 1.6.5 documentation</title>
|
||||
<title>FAQ — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="prev" title="Advanced Usage" href="advanced.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
|
|
6
docs/_build/html/search.html
vendored
6
docs/_build/html/search.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — jrnl 1.6.5 documentation</title>
|
||||
<title>Search — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
2
docs/_build/html/searchindex.js
vendored
2
docs/_build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
6
docs/_build/html/usage.html
vendored
6
docs/_build/html/usage.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Basic Usage — jrnl 1.6.5 documentation</title>
|
||||
<title>Basic Usage — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Encryption" href="encryption.html" />
|
||||
<link rel="prev" title="Getting started" href="installation.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Encryption — jrnl 1.6.5 documentation</title>
|
||||
<title>Encryption — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Import and Export" href="export.html" />
|
||||
<link rel="prev" title="Basic Usage" href="usage.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Import and Export — jrnl 1.6.5 documentation</title>
|
||||
<title>Import and Export — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Advanced Usage" href="advanced.html" />
|
||||
<link rel="prev" title="Encryption" href="encryption.html" />
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — jrnl 1.6.5 documentation</title>
|
||||
<title>Index — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -17,7 +17,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -26,7 +26,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Getting started — jrnl 1.6.5 documentation</title>
|
||||
<title>Getting started — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Basic Usage" href="usage.html" />
|
||||
<link rel="prev" title="Overview" href="overview.html" />
|
||||
|
||||
|
|
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,11 +7,11 @@ jrnl is a simple journal application for your command line.
|
|||
"""
|
||||
|
||||
__title__ = 'jrnl'
|
||||
__version__ = '1.6.5'
|
||||
__version__ = '1.6.6'
|
||||
__author__ = 'Manuel Ebert'
|
||||
__license__ = 'MIT License'
|
||||
__copyright__ = 'Copyright 2013 Manuel Ebert'
|
||||
|
||||
from . import Journal
|
||||
from . import jrnl
|
||||
from .jrnl import cli
|
||||
from . import cli
|
||||
from .cli import run
|
||||
|
|
Binary file not shown.
241
jrnl/cli.py
Normal file
241
jrnl/cli.py
Normal file
|
@ -0,0 +1,241 @@
|
|||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
"""
|
||||
jrnl
|
||||
|
||||
license: MIT, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
try:
|
||||
from . import Journal
|
||||
from . import util
|
||||
from . import exporters
|
||||
from . import install
|
||||
from . import __version__
|
||||
except (SystemError, ValueError):
|
||||
import Journal
|
||||
import util
|
||||
import exporters
|
||||
import install
|
||||
import jrnl
|
||||
import os
|
||||
import tempfile
|
||||
import subprocess
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
xdg_config = os.environ.get('XDG_CONFIG_HOME')
|
||||
CONFIG_PATH = os.path.join(xdg_config, "jrnl") if xdg_config else os.path.expanduser('~/.jrnl_config')
|
||||
PYCRYPTO = install.module_exists("Crypto")
|
||||
|
||||
|
||||
def parse_args(args=None):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-v', '--version', dest='version', action="store_true", help="prints version information and exits")
|
||||
|
||||
composing = parser.add_argument_group('Composing', 'To write an entry simply write it on the command line, e.g. "jrnl yesterday at 1pm: Went to the gym."')
|
||||
composing.add_argument('text', metavar='', nargs="*")
|
||||
|
||||
reading = parser.add_argument_group('Reading', 'Specifying either of these parameters will display posts of your journal')
|
||||
reading.add_argument('-from', dest='start_date', metavar="DATE", help='View entries after this date')
|
||||
reading.add_argument('-until', '-to', dest='end_date', metavar="DATE", help='View entries before this date')
|
||||
reading.add_argument('-and', dest='strict', action="store_true", help='Filter by tags using AND (default: OR)')
|
||||
reading.add_argument('-starred', dest='starred', action="store_true", help='Show only starred entries')
|
||||
reading.add_argument('-n', dest='limit', default=None, metavar="N", help='Shows the last n entries matching the filter', nargs="?", type=int)
|
||||
|
||||
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 to Markdown, JSON or Text', 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('--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('--delete-last', dest='delete_last', help='Deletes the last entry from your journal file.', action="store_true")
|
||||
|
||||
return parser.parse_args(args)
|
||||
|
||||
def guess_mode(args, config):
|
||||
"""Guesses the mode (compose, read or export) from the given arguments"""
|
||||
compose = True
|
||||
export = False
|
||||
if args.decrypt is not False or args.encrypt is not False or args.export is not False or any((args.short, args.tags, args.delete_last)):
|
||||
compose = False
|
||||
export = True
|
||||
elif any((args.start_date, args.end_date, args.limit, args.strict, args.starred)):
|
||||
# Any sign of displaying stuff?
|
||||
compose = False
|
||||
elif args.text and all(word[0] in config['tagsymbols'] for word in " ".join(args.text).split()):
|
||||
# No date and only tags?
|
||||
compose = False
|
||||
|
||||
return compose, export
|
||||
|
||||
def get_text_from_editor(config):
|
||||
tmpfile = os.path.join(tempfile.gettempdir(), "jrnl")
|
||||
subprocess.call(config['editor'].split() + [tmpfile])
|
||||
if os.path.exists(tmpfile):
|
||||
with open(tmpfile) as f:
|
||||
raw = f.read()
|
||||
os.remove(tmpfile)
|
||||
else:
|
||||
util.prompt('[Nothing saved to file]')
|
||||
raw = ''
|
||||
|
||||
return raw
|
||||
|
||||
|
||||
def encrypt(journal, filename=None):
|
||||
""" Encrypt into new file. If filename is not set, we encrypt the journal file itself. """
|
||||
password = util.getpass("Enter new password: ")
|
||||
journal.make_key(password)
|
||||
journal.config['encrypt'] = True
|
||||
journal.write(filename)
|
||||
if util.yesno("Do you want to store the password in your keychain?", default=True):
|
||||
util.set_keychain(journal.name, password)
|
||||
util.prompt("Journal encrypted to {0}.".format(filename or journal.config['journal']))
|
||||
|
||||
def decrypt(journal, filename=None):
|
||||
""" Decrypts into new file. If filename is not set, we encrypt the journal file itself. """
|
||||
journal.config['encrypt'] = False
|
||||
journal.config['password'] = ""
|
||||
journal.write(filename)
|
||||
util.prompt("Journal decrypted to {0}.".format(filename or journal.config['journal']))
|
||||
|
||||
def touch_journal(filename):
|
||||
"""If filename does not exist, touch the file"""
|
||||
if not os.path.exists(filename):
|
||||
util.prompt("[Journal created at {0}]".format(filename))
|
||||
open(filename, 'a').close()
|
||||
|
||||
def update_config(config, new_config, scope, force_local=False):
|
||||
"""Updates a config dict with new values - either global if scope is None
|
||||
or config['journals'][scope] is just a string pointing to a journal file,
|
||||
or within the scope"""
|
||||
if scope and type(config['journals'][scope]) is dict: # Update to journal specific
|
||||
config['journals'][scope].update(new_config)
|
||||
elif scope and force_local: # Convert to dict
|
||||
config['journals'][scope] = {"journal": config['journals'][scope]}
|
||||
config['journals'][scope].update(new_config)
|
||||
else:
|
||||
config.update(new_config)
|
||||
|
||||
def run(manual_args=None):
|
||||
if not os.path.exists(CONFIG_PATH):
|
||||
config = install.install_jrnl(CONFIG_PATH)
|
||||
else:
|
||||
config = util.load_and_fix_json(CONFIG_PATH)
|
||||
install.upgrade_config(config, config_path=CONFIG_PATH)
|
||||
|
||||
original_config = config.copy()
|
||||
# check if the configuration is supported by available modules
|
||||
if config['encrypt'] and not PYCRYPTO:
|
||||
util.prompt("According to your jrnl_conf, your journal is encrypted, however PyCrypto was not found. To open your journal, install the PyCrypto package from http://www.pycrypto.org.")
|
||||
sys.exit(1)
|
||||
|
||||
args = parse_args(manual_args)
|
||||
|
||||
if args.version:
|
||||
print("{0} version {1}".format(jrnl.__title__, jrnl.__version__))
|
||||
sys.exit(0)
|
||||
|
||||
# If the first textual argument points to a journal file,
|
||||
# use this!
|
||||
journal_name = args.text[0] if (args.text and args.text[0] in config['journals']) else 'default'
|
||||
if journal_name is not 'default':
|
||||
args.text = args.text[1:]
|
||||
journal_conf = config['journals'].get(journal_name)
|
||||
if type(journal_conf) is dict: # We can override the default config on a by-journal basis
|
||||
config.update(journal_conf)
|
||||
else: # But also just give them a string to point to the journal file
|
||||
config['journal'] = journal_conf
|
||||
config['journal'] = os.path.expanduser(config['journal'])
|
||||
touch_journal(config['journal'])
|
||||
mode_compose, mode_export = guess_mode(args, config)
|
||||
|
||||
# open journal file or folder
|
||||
if os.path.isdir(config['journal']):
|
||||
if config['journal'].strip("/").endswith(".dayone") or \
|
||||
"entries" in os.listdir(config['journal']):
|
||||
journal = Journal.DayOne(**config)
|
||||
else:
|
||||
util.prompt("[Error: {0} is a directory, but doesn't seem to be a DayOne journal either.".format(config['journal']))
|
||||
sys.exit(1)
|
||||
else:
|
||||
journal = Journal.Journal(journal_name, **config)
|
||||
|
||||
if "win32" in sys.platform:
|
||||
# for Windows systems
|
||||
_exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter"
|
||||
else:
|
||||
# for *nix systems (and others?)
|
||||
_exit_multiline_code = "press Ctrl+D"
|
||||
|
||||
if mode_compose and not args.text:
|
||||
if not sys.stdin.isatty():
|
||||
# Piping data into jrnl
|
||||
raw = util.py23_read()
|
||||
elif config['editor']:
|
||||
raw = get_text_from_editor(config)
|
||||
else:
|
||||
raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n")
|
||||
if raw:
|
||||
args.text = [raw]
|
||||
else:
|
||||
mode_compose = False
|
||||
|
||||
# Writing mode
|
||||
if mode_compose:
|
||||
raw = " ".join(args.text).strip()
|
||||
if util.PY2 and type(raw) is not unicode:
|
||||
raw = raw.decode(sys.getfilesystemencoding())
|
||||
entry = journal.new_entry(raw)
|
||||
util.prompt("[Entry added to {0} journal]".format(journal_name))
|
||||
journal.write()
|
||||
else:
|
||||
journal.filter(tags=args.text,
|
||||
start_date=args.start_date, end_date=args.end_date,
|
||||
strict=args.strict,
|
||||
short=args.short,
|
||||
starred=args.starred)
|
||||
journal.limit(args.limit)
|
||||
|
||||
# Reading mode
|
||||
if not mode_compose and not mode_export:
|
||||
print(journal.pprint())
|
||||
|
||||
# Various export modes
|
||||
elif args.short:
|
||||
print(journal.pprint(short=True))
|
||||
|
||||
elif args.tags:
|
||||
print(exporters.to_tag_list(journal))
|
||||
|
||||
elif args.export is not False:
|
||||
print(exporters.export(journal, args.export, args.output))
|
||||
|
||||
elif (args.encrypt is not False or args.decrypt is not False) and not PYCRYPTO:
|
||||
util.prompt("PyCrypto not found. To encrypt or decrypt your journal, install the PyCrypto package from http://www.pycrypto.org.")
|
||||
|
||||
elif args.encrypt is not False:
|
||||
encrypt(journal, filename=args.encrypt)
|
||||
# Not encrypting to a separate file: update config!
|
||||
if not args.encrypt:
|
||||
update_config(original_config, {"encrypt": True}, journal_name, force_local=True)
|
||||
install.save_config(original_config, config_path=CONFIG_PATH)
|
||||
|
||||
elif args.decrypt is not False:
|
||||
decrypt(journal, filename=args.decrypt)
|
||||
# Not decrypting to a separate file: update config!
|
||||
if not args.decrypt:
|
||||
update_config(original_config, {"encrypt": False}, journal_name, force_local=True)
|
||||
install.save_config(original_config, config_path=CONFIG_PATH)
|
||||
|
||||
elif args.delete_last:
|
||||
last_entry = journal.entries.pop()
|
||||
util.prompt("[Deleted Entry:]")
|
||||
print(last_entry.pprint())
|
||||
journal.write()
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
BIN
jrnl/cli.pyc
BIN
jrnl/cli.pyc
Binary file not shown.
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.
BIN
jrnl/util.pyc
BIN
jrnl/util.pyc
Binary file not shown.
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Overview — jrnl 1.6.5 documentation</title>
|
||||
<title>Overview — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Getting started" href="installation.html" />
|
||||
<link rel="prev" title="jrnl: The command-line journal" href="index.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>FAQ — jrnl 1.6.5 documentation</title>
|
||||
<title>FAQ — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="prev" title="Advanced Usage" href="advanced.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — jrnl 1.6.5 documentation</title>
|
||||
<title>Search — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Basic Usage — jrnl 1.6.5 documentation</title>
|
||||
<title>Basic Usage — jrnl 1.6.6 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.6.5',
|
||||
VERSION: '1.6.6',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.6.5 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.6.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Encryption" href="encryption.html" />
|
||||
<link rel="prev" title="Getting started" href="installation.html" />
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue