cnki-export
Export paper from CNKI and push to Zotero, or save as RIS file. Use when user wants to save a paper to Zotero or export citation data.
By cookjohn · 370 installs
npx skills add cookjohn/cnki-skills --skill cnki-export
Source repository · Upstream listing
CNKI Export & Zotero Integration
Export paper citation data from CNKI and push directly to Zotero, or save as RIS file.
Arguments
zotero (default) — push to Zotero desktop via local API
ris — save as .ris file
gb — output GB/T 7714 citation text
Optionally include a paper URL
Mode Selection
Choose the right mode based on context:
Context Mode Tool calls
On a paper detail page Single export (Step 1A) 1 evaluate + 1 bash = 2
On a search results page, save all/selected Batch export (Step 1B) 1 evaluate + 1 bash = 2
Need to search then save Use cnki search first, then batch export 4 total
Always prefer batch export (1B) when multiple papers need saving. It avoids navigating to each detail page (saves ~3 calls per paper).
Steps
1A. Single export: from paper detail page
Use mcp chrome devtools evaluate script :
1B. Batch export: from search results page (PREFERRED for multiple papers)
On any CNKI search results page, extract checkbox values and call the export API directly — no need to navigate to detail pages .
Key discovery: input.cbItem checkbox value === detail page export id (same encrypted ID).
Use mcp chrome devtools evaluate script :
To export only specific papers (e.g. 1, 3, 5), filter by index:
2. Push to Zotero
Save the export data (single object or JSON array) to a temp file, then run the Python script:
The Python script handles both single paper {} and batch [{}, {}, ...] JSON input.
UTF 8 encoding (avoids Windows encoding issues)
Parsing ELEARNING format into Zotero item fields
Calling POST http://127.0.0.1:23119/connector/saveItems
Returns: 201 = success, 500 = error, 0 = Zotero not running
3. Report result
Single:
Batch:
Export API Reference
Parameter Value Source
API URL https://kns.cnki.net/dm8/API/GetExport Fixed, works from any page
filename Encrypted ID Detail page: export id ; Results page: input.cbItem value
displaymode GBTREFER,elearning,EndNote Comma separated modes
uniplatform NZKPT Required
Verified selectors
Element Selector Page
Export URL export url Detail page only
Export ID export id Detail page only
Checkbox (= export ID) input.cbItem Search results page
Result rows .result table list tbody tr Search results page
Title link td.name a.fz14 Search results page
Zotero API Reference
Response: 201 = created, 500 = error
Collection: Saves to Zotero's currently selected collection.
Query collections:
Important Notes
Windows encoding: Must use Python script, cannot pass Chinese JSON via bash/curl directly
Zotero must be running: localhost:23119 requires Zotero desktop in background
Chinese authors: Use name field (single field, not split), creatorType: "author"
Batch export saves ~90% tool calls: 9 papers: 33 calls → 3 calls
CNKI Export API: filename must be encrypted ID ( export id or input.cbItem value), NOT paramfilename