Skip to content

Commit

Permalink
v0.1.5: warn if store is empty (fix #5)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <[email protected]>
  • Loading branch information
Kwpolska committed Feb 7, 2016
1 parent 9b6c8d4 commit 6487c82
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 29 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix C. Changelog
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. index:: CHANGELOG

Expand All @@ -19,6 +19,9 @@ More information can be found on GitHub in the `releases section
Version History
===============

0.1.5
* Warn if store is empty or does not exist (Issue #5)

0.1.4
* Add j/k support for moving in the list (Issue #4)

Expand All @@ -38,6 +41,9 @@ Version History
0.1.0
Initial release.

0.1.5
* Warn if store is empty or does not exist (Issue #5)

0.1.4
* Add j/k support for moving in the list (Issue #4)

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix A. Contribution rules
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. index:: contributing

Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Maintainer: Chris Warrick <[email protected]>
pkgname=upass
_pyname=upass
pkgver=0.1.4
pkgver=0.1.5
pkgrel=1
pkgdesc='Console UI for pass'
arch=('any')
url='https://github.com/Kwpolska/upass'
license=('BSD')
options=(!emptydirs)
source=("https://pypi.python.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('4bcb9683da51dc7dbf5bbd96c001fabc')
md5sums=('25932df5ae1a02401c06dcb6249889c7')
depends=('pass' 'python' 'python-setuptools' 'python-urwid' 'python-pyperclip')

prepare() {
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD-git
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pkgname=upass-git
_pyname=upass
_gitname=upass
pkgver=0.1.4
pkgver=0.1.5
pkgrel=1
pkgdesc='Console UI for pass (git version)'
arch=('any')
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
10 changes: 8 additions & 2 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix C. Changelog
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. index:: CHANGELOG

Expand All @@ -19,6 +19,9 @@ More information can be found on GitHub in the `releases section
Version History
===============

0.1.5
* Warn if store is empty or does not exist (Issue #5)

0.1.4
* Add j/k support for moving in the list (Issue #4)

Expand All @@ -38,6 +41,9 @@ Version History
0.1.0
Initial release.

0.1.5
* Warn if store is empty or does not exist (Issue #5)

0.1.4
* Add j/k support for moving in the list (Issue #4)

Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix A. Contribution rules
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. index:: contributing

Expand Down
4 changes: 2 additions & 2 deletions docs/LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix B. License for upass
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. index:: LICENSE

Expand Down
4 changes: 2 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015-2016, Chris Warrick.
:Date: 2016-01-01
:Version: 0.1.4
:Date: 2016-02-07
:Version: 0.1.5

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1.4'
version = '0.1.5'
# The full version, including alpha/beta/rc tags.
release = '0.1.4'
release = '0.1.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def run_tests(self):
sys.exit(errno)

setup(name='upass',
version='0.1.4',
version='0.1.5',
description='Console UI for pass.',
keywords='upass',
author='Chris Warrick',
Expand Down
4 changes: 2 additions & 2 deletions upass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
# upass v0.1.4
# upass v0.1.5
# Console UI for pass.
# Copyright © 2015-2016, Chris Warrick.
# All rights reserved.
Expand Down Expand Up @@ -40,7 +40,7 @@
"""

__title__ = 'upass'
__version__ = '0.1.4'
__version__ = '0.1.5'
__author__ = 'Chris Warrick'
__license__ = '3-clause BSD'
__docformat__ = 'restructuredtext en'
Expand Down
16 changes: 11 additions & 5 deletions upass/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
# upass v0.1.4
# upass v0.1.5
# Console UI for pass.
# Copyright © 2015-2016, Chris Warrick.
# See /LICENSE for licensing information.
Expand Down Expand Up @@ -156,9 +156,15 @@ def __init__(self):
self.box = FancyListBox(urwid.SimpleFocusListWalker(listbox_content))

self.home = os.path.expanduser('~/.password-store')
self.refresh()
self.current = '.'
self.dir_load(None, self.current)
if os.path.exists(self.home) and os.listdir(self.home):
self.refresh()
self.current = '.'
self.dir_load(None, self.current)
else:
self._clear_box()
self.box.body.extend([urwid.Text(("error", 'Your Password Store is empty.')),
urwid.Text('Please use the `pass` command to create passwords. upass is a read-only browser.'),
urwid.Text('Press q to exit.')])

column_data = [
urwid.Button('DiSplay', self.display_selected),
Expand Down Expand Up @@ -411,7 +417,7 @@ def run(self):

def main():
"""The main function of upass."""
App().run()
return App().run()

if __name__ == '__main__':
try:
Expand Down

0 comments on commit 6487c82

Please sign in to comment.