Python3 + setup + fixes + features #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pretty nice tool. This PR addresses a few issues.
(1) added support for Python 3. This was simple enough to do. I used the six library to fix the configparser import and used the standard 2/3 compatible shebang.
(2) Made the script an importable module. This was done by simply changing the hyphen to and underscore and putting the main block in a function (which makes it a big faster anyway). I added an alias file which still contains the hyphen so the script still works as normal.
(3) Added setup.py to make the package pip installable. This also allows me to specify an entry point, so when you install this package it will create a command line executable called
cli-zotero
, which is put in your PATH. This change also lets you install the package like this:(4) Added an additional option
all-to-bibtex
which dumps your entire library to bibtex, (which is the use case that I wanted this library for)(5) Added a
__version__
attribute.(6)
--dump
will now actually dump the bibtex instead of a pprint format.(7) Fixed a few issues that caused crashes with notes, missing dates, and author formatting.
Using these changes it should be pretty easy to upload this package to pypi, thus allowing users to simply
pip install cli-zotero
.