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
036ce235a4
commit
954ee5676e
5 changed files with 8 additions and 6 deletions
2
docs/_themes/jrnl/index.html
vendored
2
docs/_themes/jrnl/index.html
vendored
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<a href="{{ pathto('overview') }}" title="Documentation">Documenation</a>
|
||||
<a href="{{ pathto('overview') }}" title="Documentation">Documentation</a>
|
||||
<a href="http://github.com/maebert/jrnl" title="View on Github">Fork me on GitHub</a>
|
||||
<a id="twitter-nav" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert">Tell your friends on twitter</a>
|
||||
<a href="{{ pathto('installation') }}" title="Quick Start" class="cta">Download ▶</a>
|
||||
|
|
|
@ -110,7 +110,7 @@ class Journal(object):
|
|||
journal = None
|
||||
if 'password' in self.config:
|
||||
journal = validate_password(self.config['password'])
|
||||
if not journal:
|
||||
if journal is None:
|
||||
journal = util.get_password(keychain=self.name, validator=validate_password)
|
||||
else:
|
||||
with codecs.open(filename, "r", "utf-8") as f:
|
||||
|
|
|
@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
|
|||
"""
|
||||
|
||||
__title__ = 'jrnl'
|
||||
__version__ = '1.6.3'
|
||||
__version__ = '1.6.4'
|
||||
__author__ = 'Manuel Ebert'
|
||||
__license__ = 'MIT License'
|
||||
__copyright__ = 'Copyright 2013 Manuel Ebert'
|
||||
|
|
|
@ -75,6 +75,8 @@ def install_jrnl(config_path='~/.jrnl_config'):
|
|||
default_config['encrypt'] = True
|
||||
if util.yesno("Do you want to store the password in your keychain?", default=True):
|
||||
util.set_keychain("default", password)
|
||||
else:
|
||||
util.set_keychain("default", None)
|
||||
print("Journal will be encrypted.")
|
||||
else:
|
||||
password = None
|
||||
|
|
|
@ -29,15 +29,15 @@ def get_password(validator, keychain=None, max_attempts=3):
|
|||
password = pwd_from_keychain or getpass()
|
||||
result = validator(password)
|
||||
# Password is bad:
|
||||
if not result and pwd_from_keychain:
|
||||
if result is None and pwd_from_keychain:
|
||||
set_keychain(keychain, None)
|
||||
attempt = 1
|
||||
while not result and attempt < max_attempts:
|
||||
while result is None and attempt < max_attempts:
|
||||
prompt("Wrong password, try again.")
|
||||
password = getpass()
|
||||
result = validator(password)
|
||||
attempt += 1
|
||||
if result:
|
||||
if result is not None:
|
||||
return result
|
||||
else:
|
||||
prompt("Extremely wrong password.")
|
||||
|
|
Loading…
Add table
Reference in a new issue