Giter VIP home page Giter VIP logo

hypothesis-zotero's Introduction

Zotero-Hypothesis Importer

Introduction

This program scans through a Zotero library and checks each URL for Hypothesis annotations. If annotations are found it imports them into the Zotero library as note objects with their associated tags.

Installation

Windows

Coming soon.

Linux

At the command line, do the following:

Navigate to the directory where you'd like to install the program:

cd /home/my_username/my_software_folder/

Git clone this repository:

git clone https://github.com/JD-P/hypothesis-zotero

Change directory to the cloned repository:

cd hypothesis-zotero

Create a virtual environment for the programs dependencies to go:

virtualenv --python=python3 venv

Activate the virtualenvironment using the 'source' command:

source venv/bin/activate

Use setuptools to install the program dependencies:

python3 setup.py install

Run the program:

python3 hypothesis_zotero.py

Then move on to the "Use" sections for instructions on how to use the program.

Use & Operation

You need 4 pieces of information to run the program:

Screenshot of the program in operation with the text fields blank except for number to grab, which is filled out by default with '50'

  • The userID for your Zotero API usage, available here.
  • A developer API key for Zotero, you can make one here.
  • Your Hypothesis username, which should just be the username you use to access the service.
  • Your Hypothesis Developer API key, available here.

Once you have these four things you put them into the appropriate slots in the programs interface. You also need to specify how many items back in your personal library the program should search through, the default is fifty but it's possible to specify more. (Note: In version 0.1 this will actually crash the program, but in future versions it shouldn't.)

After you've put all the information in, you should probably press 'save settings' so that the transfer settings will be saved to a file for your next session. This will save you time when you want to use the program again later.

The program in operation, showing the (censored) fields filled out and the progress indicator in the bottom right corner of the screen.

Finally, press 'grab' and the transfer will begin. A progress indicator shows how far along the program is in your document set. Once it's finished the progress indicator will read 'done' and you can begin using your notes in Zotero.

hypothesis-zotero's People

Contributors

jd-p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hypothesis-zotero's Issues

Stalled import

The import process stalling at 26 notes (out of 50).

I've run the command twice now. Here's the traceback for the second time:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.11/tkinter/__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/tshiunghan/hypothesis-zotero/hypothesis_zotero.py", line 98, in grab
    entry_annotations = json.loads(h_annot.api.search(hyp_api_key,
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/python_hypothesis-0.4.2-py3.11.egg/h_annot/api.py", line 38, in search
    raise APIError(r)
h_annot.exceptions.APIError: API call returned 400 (Bad Request): url.0: Required
^C^CTraceback (most recent call last):
  File "/home/tshiunghan/hypothesis-zotero/hypothesis_zotero.py", line 174, in <module>
    root.mainloop()
  File "/usr/lib/python3.11/tkinter/__init__.py", line 1485, in mainloop
    self.tk.mainloop(n)
KeyboardInterrupt

Other notes

  • source venv/bin/activate failed because I am using fish shell. The error message instructed me to run set VIRTUAL_ENV '/home/tshiunghan/hypothesis-zotero/venv' instead, which was successful.
  • Looking back over the python setup.py install details, it says that setup.py install is deprecated and that I should "use pypa/build, pypa/installer or other standards-based tool." I can include the full readout if it's helpful.

Support for Mendeley?

Do you think you could release the Mendeley analogue of this one? Would be very useful for many researchers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.