diff -Nru lesana-0.8.0/CHANGELOG.rst lesana-0.8.1/CHANGELOG.rst --- lesana-0.8.0/CHANGELOG.rst 2021-02-10 08:38:37.000000000 +0000 +++ lesana-0.8.1/CHANGELOG.rst 2021-02-15 08:42:41.000000000 +0000 @@ -5,6 +5,15 @@ Unreleased ========== +0.8.1 +===== + +Bugfix release. + +* Fixes running on an environment where EDITOR is not set. #7 +* Fixes editing an entry. #8 +* Fixes searches when default_sort isn't present. #9 + 0.8.0 ===== diff -Nru lesana-0.8.0/debian/changelog lesana-0.8.1/debian/changelog --- lesana-0.8.0/debian/changelog 2021-02-10 08:57:54.000000000 +0000 +++ lesana-0.8.1/debian/changelog 2021-02-15 19:48:10.000000000 +0000 @@ -1,3 +1,9 @@ +lesana (0.8.1-1) unstable; urgency=medium + + * New upstream bugfix release. + + -- Elena Grandi Mon, 15 Feb 2021 20:48:10 +0100 + lesana (0.8.0-1) unstable; urgency=medium * New upstream release. diff -Nru lesana-0.8.0/docs/source/conf.py lesana-0.8.1/docs/source/conf.py --- lesana-0.8.0/docs/source/conf.py 2020-10-20 06:36:58.000000000 +0000 +++ lesana-0.8.1/docs/source/conf.py 2021-02-15 08:42:58.000000000 +0000 @@ -22,9 +22,9 @@ author = "Elena ``of Valhalla''" # The full version, including alpha/beta/rc tags -release = '0.6.0' +release = '0.8.1' # The major project version -version = '0.6' +version = '0.8' # compatibility with sphinx 1.8 on buster master_doc = 'index' diff -Nru lesana-0.8.0/docs/source/contrib/release_procedure.rst lesana-0.8.1/docs/source/contrib/release_procedure.rst --- lesana-0.8.0/docs/source/contrib/release_procedure.rst 2020-12-07 14:50:54.000000000 +0000 +++ lesana-0.8.1/docs/source/contrib/release_procedure.rst 2021-02-12 08:21:45.000000000 +0000 @@ -2,7 +2,8 @@ Release procedure ******************* -* Check that the version number in setup.py is correct. +* Check that the version number in setup.py and in docs/source/conf.py + is correct. * Check that the changelog is up to date. diff -Nru lesana-0.8.0/docs/source/user/settings.rst lesana-0.8.1/docs/source/user/settings.rst --- lesana-0.8.0/docs/source/user/settings.rst 2021-02-10 08:23:23.000000000 +0000 +++ lesana-0.8.1/docs/source/user/settings.rst 2021-02-12 08:19:46.000000000 +0000 @@ -76,15 +76,15 @@ The value of ``increment`` will autoincrement the value at every update. - The reference client will run this update before editing an entry, - allowing further changes from the user; a command line user can then - decide to abort this change through the usual git commands. + The reference command-line client will run this update before editing + an entry, allowing further changes from the user; a command line user + can then decide to abort this change through the usual git commands. Other clients may decide to use a different workflow. ``increment``: the amount by which an ``auto: increment`` field is incremented - (negative values are of course allowed). + (negative values are of course allowed). Default is 1. ``date`` and ``datetime`` properties ------------------------------------ @@ -101,9 +101,10 @@ autofill the field when it is updated with the current UTC time (``datetime``) or local zone day (``date``). - The reference client will run this update before editing an entry, - allowing further changes from the user; a command line user can - then decide to abort this change through the usual git commands. + The reference command line client will run this update before + editing an entry, allowing further changes from the user; a + command line user can then decide to abort this change through the + usual git commands. Other clients may decide to use a different workflow. diff -Nru lesana-0.8.0/lesana/command.py lesana-0.8.1/lesana/command.py --- lesana-0.8.0/lesana/command.py 2021-02-09 15:49:36.000000000 +0000 +++ lesana-0.8.1/lesana/command.py 2021-02-12 15:05:00.000000000 +0000 @@ -11,21 +11,23 @@ def edit_file_in_external_editor(filepath): # First we try to use $EDITOR - try: - editor = os.environ['EDITOR'] - subprocess.call([editor, filepath]) - except FileNotFoundError as e: - if editor in str(e): - logging.info( - 'Could not open file {} with $EDITOR (currently {})'.format( - filepath, editor + editor = os.environ.get('EDITOR') + if editor: + try: + subprocess.call([editor, filepath]) + except FileNotFoundError as e: + if editor in str(e): + logging.info( + 'Could not open file {} with $EDITOR (currently {})' + .format( + filepath, editor + ) ) - ) + else: + logging.warning("Could not open file {}".format(filepath)) + return False else: - logging.warning("Could not open file {}".format(filepath)) - return False - else: - return True + return True # then we try to use sensible-editor (which should be available on # debian and derivatives) try: @@ -160,7 +162,7 @@ ) entry = entries[0] # update the entry before editing it - entry.update() + entry.auto() collection.save_entries([entry]) # and then edit the updated file filepath = os.path.join(collection.itemdir, entry.fname) @@ -294,7 +296,8 @@ # sorted results require a less efficient full search rather # than being able to use the list of all documents. if self.args.query == ['*'] and not ( - self.args.sort or collection.settings.default_sort + self.args.sort + or getattr(collection.settings, 'default_sort', False) ): results = collection.get_all_documents() else: diff -Nru lesana-0.8.0/lesana.egg-info/PKG-INFO lesana-0.8.1/lesana.egg-info/PKG-INFO --- lesana-0.8.0/lesana.egg-info/PKG-INFO 2021-02-10 08:41:07.000000000 +0000 +++ lesana-0.8.1/lesana.egg-info/PKG-INFO 2021-02-15 08:44:29.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lesana -Version: 0.8.0 +Version: 0.8.1 Summary: Manage collection inventories throught yaml files. Home-page: https://lesana.trueelena.org/ Author: Elena ``of Valhalla'' Grandi diff -Nru lesana-0.8.0/PKG-INFO lesana-0.8.1/PKG-INFO --- lesana-0.8.0/PKG-INFO 2021-02-10 08:41:08.668749600 +0000 +++ lesana-0.8.1/PKG-INFO 2021-02-15 08:44:32.257112500 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lesana -Version: 0.8.0 +Version: 0.8.1 Summary: Manage collection inventories throught yaml files. Home-page: https://lesana.trueelena.org/ Author: Elena ``of Valhalla'' Grandi diff -Nru lesana-0.8.0/setup.py lesana-0.8.1/setup.py --- lesana-0.8.0/setup.py 2021-02-10 08:38:24.000000000 +0000 +++ lesana-0.8.1/setup.py 2021-02-15 08:39:56.000000000 +0000 @@ -9,7 +9,7 @@ setup( name='lesana', - version='0.8.0', + version='0.8.1', packages=find_packages(), scripts=['scripts/lesana'], package_data={