I post frequently on my personal website, and on medium. You can follow me on:
e-alizadeh / zotero2md Goto Github PK
View Code? Open in Web Editor NEWA Python library to retrieve annotations and notes from Zotero and save them into Markdown files.
A Python library to retrieve annotations and notes from Zotero and save them into Markdown files.
I often put some images in my notes, and I wonder whether I can export these notes with images to md files.
As a part of this feature, details of failed items should be logged.
I executed this package in Python 3.9 using the Approach 1. Unfortunately, there are some errors when I tried to execute.
from zotero2md.zt2md import Zotero2Markdown
zt = Zotero2Markdown(
zotero_key="xxx",
zotero_library_id="xxx",
zotero_library_type="user", # "user" (default) or "group"
params_filepath="./sample_params.json", # [Default values provided bellow] # The path to JSON file containing the custom parameters (See Section Custom Output Parameters).
include_annotations=True, # Default: True
include_notes=True, # Default: True
)
zt.run_all()
The result is:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_14832/1010544329.py in <module>
9 include_notes=True, # Default: True
10 )
---> 11 zt.run_all()
~\anaconda3\envs\zotero\lib\site-packages\zotero2md\zt2md.py in run_all(self, params_filepath)
39 )
40 if self.include_notes:
---> 41 notes_grouped = group_by_parent_item(retrieve_all_notes(self.zotero_client))
42
43 for i, item_key in enumerate(annots_grouped.keys()):
~\anaconda3\envs\zotero\lib\site-packages\zotero2md\utils.py in group_by_parent_item(annotations)
6 annotations_by_parent = defaultdict(list)
7 for annot in annotations:
----> 8 annotations_by_parent[annot["data"]["parentItem"]].append(annot)
9 return annotations_by_parent
10
KeyError: 'parentItem'
Is this problem a bug?
I export directly to my python parent folder. However is it possible to redefine the export directory? So I can directly save to relevant folder in Obsidian. Thank you!
Hello!
Great job! By the way, are there any plans to implement local Zotero lib connectiion (might be via existing pyzotero features)?
Best regards
Asan
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.