davidswelt / zot_bib_web Goto Github PK
View Code? Open in Web Editor NEWCreate interactive web bibliographies based on Zotero collections
Create interactive web bibliographies based on Zotero collections
zot.py throws a key error in all pyzotero versions after 0.9.9.1:
File "/volume1/homes/admin/Zotero/zot.py", line 395, in
collection_ids[coll[u'name']] = coll_key #[x[u'key']]
KeyError: u'name'
I'm trying to get Zot Bib Web running on my Wordpress installation. While the generation of zotero-bib.html works fine, I'm running into trouble with push.py.
I'm getting the error
Traceback (most recent call last):
File "Zot Bib Web/push.py", line 94, in <module>
rawpost = server.wp.getPost(wp_blogid, wp_username, wp_password, post_id)
File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1487, in parse_response
p.feed(data)
File "/usr/lib/python2.7/xmlrpclib.py", line 558, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 16, column 4
when running the script. Line 94 in push.py points to the rawpost generation, so I'm guessing something is running out of line there - but I can't seem to figure out what. These are my setting for push_wordpress in settings.py:
push_wordpress(url="http://..../httpdocs/xmlrpc.php", blogID=1, user="user", password="pass", postID=360)
With the url pointing to xmlrpc on the server and the postID identifying the page where the bibliography should be displayed (user and pass being the correct credentials, of course), I'm not sure what is going wrong.
According to the Python2 docs, the "mismatched tag" error indicates that "An end tag did not match the innermost open start tag." (https://docs.python.org/2/library/pyexpat.html#expat-error-constants). However, I do not know how to fix this from within the given scripts from Zot Bib Web. Any help would be appreciated!
Hi
Just discover your program, thanks so much, fill my need!
Just have a suggestion/feature request.
I would like to have doi in addition of link (or fallback). I circumvent this issue by using a style incorporating full doi address, ie http://doi.org/XXX. All styles with doi:XXX is not creating the link (it only writes the doi without a href). It works but I found it crowd my page with written link instead of a simple href.
Thanks to read!
Hi
Second suggestion to an already comprehensive program"
I would have link to display the name of the linked attachment (pdf in my case). Just printed, without any links or complicated stuff. Similar to original zotero report do.
I used output for a different need than you, for lab internal use only. My goal is to prepare a digest of our all our common pdf files. So just have the path/name of the file will help everyone to locate it in our folders.
Thanks again!
Your script seems very interesting and useful. However, I have an error when running it:
File "xxxxxxxx\zot_bib_web\zot.py", line 579, in sortkeyname
return SortAndValue(".".join([str(sortkeyname(field, value2).sort) for value2 in value]), sortkeyname(field, value[-1]).value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 43: ordinal not in range(128)
It may due to characters with accent in the name of the collection. Do you have a patch for this error?
A final suggestion.
Adding in settings the possibility of adding note in the html file. A simple
after title would do the job.
For now, I will add my text after html generation by writing directly in the html but it means it wouldn't be automatically done.
Thanks again.
Hi,
I would like to export a library as html for assigning papers to the students. Hence, the files need to be reached easily by students as well. However, I use Webdav server to store my library.
In this scenario when I used
show_links = ['abstract', 'URL', 'BIB', 'file']
html files are not created. On the other hand, without the 'file' option, it works fine.
I thought this is due to the files are stored via WebDAV? Can this be the reason? If yes. is there a way to overcome this situation?
This the error I obtain.
pyzotero.zotero_errors.ResourceNotFound:
Code: 404
URL: https://api.zotero.org/users/295638/items/FBC48LHH/file
Method: GET
Response: Not found
Thanks once again for such a useful tool.
Best,
line 30 of zot.py: "or 'group' # group or userm"
I would change userm to user (unless I am missing something). For amateurs like me, there is no guarantee that "userm" is not some declared variable or something beyond our grasp.
testing this great solution but returns...
File "./zot.py", line 308 except AttributeError,ImportError: ^ SyntaxError: invalid syntax
any idea?
running Ubuntu 18.10
My Zotero tags look like "Parent tag>child tag", "Parent tag>child tag>grandchild tag" for different values of these parent, child and grandchild tag names. I want to make it look like an expandable list that only shows the parent tags in the beginning and then clicking [+] opens the list to child tags as well and another [+] click reveals all the tags in that tree.
on Mac OS after cloning the repo, chmod
ding as per setup docs, installing pyzotero
(with both pip
and pip3
because I've found that avoids problems sometimes).
./zot.py --help
Traceback (most recent call last):
File "./zot.py", line 266, in <module>
from pyzotero import zotero, zotero_errors
ImportError: No module named pyzotero
because it's mac OS, what's going on is:
python --version
Python 2.7.16
I tried making a venv to run in because all instructions found mentioned this. but this stuff isn't really my strong suit so eventually gave up on that. That would be my fault for not knowing what I'm doing; maybe it would be a viable path for someone else.
solution
run like this instead:
python3 zot.py --help
This error also appeared in https://github.com/davidswelt/zot_bib_web/issues/13#issuecomment-558831126 but was apparently resolved back then. I have no insight as what the problem is or how to fix permanently aside from what's presented above.
When I ran the demo command as per instructions, the file zotero-bib.html
was generated successfully.
thank you for the tool!
What modifications would you suggest if I wanted to show a bunch of authors in the shortcuts?
Let's say I specify the author last names in a list in the same way that I suggest years. What is the best way to modify zot.py to incorporate such specification in the settings.py?
What modifications would you suggest if I wanted to show a bunch of authors in the shortcuts. Let's say i specify the author last names in a list in the same way that I suggest years. What is the best way to
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.