tweetzotero is a python automation script to save papers from twitter bookmarks to Zotero. It takes a csv file with tweet status URLs as input, fetch all the external URLs from those tweets, and save the papers to Zotero.
Here's the things that needs to be done before running the script:
- Get your Twitter
API Key
,API Secret
,Access Token
andAccess Secret
from here. - Set your default browser to
Google Chrome
. This script will work on this browser for now. - Export your twitter bookmark URLs as
csv
with the chrome extension Dewey. - Add Zotero extension to Google Chrome from here. Also, install the Zotero software itself to your system. While running the script, the zotero app must be running.
tweetzotero
uses the shortcutctrl/cmd + shift + s
on chrome to add the paper to zotero. So, make sure this shortcut actually works on chrome before running the script.- Make sure you have
conda
installed. If not, then install from here.
Here's how you can download the code and setup environments:
git clone https://github.com/nahid18/tweetzotero.git
cd tweetzotero
conda create --name tweetzotero --file requirements.txt -y
conda activate tweetzotero
Now, paste all 4 twitter keys to the keys.py
file.
After that, you can run the script like below.
Once you have completed everything above, here's how you can run the script:
python tweetzotero.py -i <dewey-csv-file-path>
Example:
python tweetzotero.py -i example.csv
After running the script, just let the script complete tasks and don't do anything on your PC.
For Help,
python tweetzotero.py -h
The inspiration of this project came from here.
There could be many issues and bugs. Please report the issues and I'll try to resolve those.
MIT