edtechhub / zotero-cli

Commandline interface for Zotero
https://github.com/edtechhub/zotero-cli/projects/1
13 stars 3 forks source link

Implement --out option #98

Closed bjohas closed 4 years ago

bjohas commented 4 years ago

It would be good to have an --out file.json option that redirects outputs to a file called file.json.

bjohas commented 4 years ago

I cannot find a branch relating to this.

retorquere commented 4 years ago

I always name branches after the issue name -- this change is on branch gh-89 : https://github.com/edtechhub/zotero-cli/blob/gh-89/bin/zotero-cli.ts#L64

retorquere commented 4 years ago

Have you pulled before trying to switch to the branch?

retorquere commented 4 years ago

A quick way to test the current state without going through a build step (although that should just work) is to run npm start -- <any other parameters you would otherwise use>. Just running npm start will show the usage, which on gh-89 looks like this:

usage: zotero-cli.ts [-h] [--api-key API_KEY] [--config CONFIG]
                     [--user-id USER_ID] [--group-id GROUP_ID]
                     [--indent INDENT] [--out OUT] [--verbose]

                     {attachment,collection,collections,create-item,fields,get,item,items,key,publications,searches,tags,trash,types,update-item}
                     ...
zotero-cli.ts: error: too few arguments
retorquere commented 4 years ago

Is there a lib I can safely test against?

bjohas commented 4 years ago

Safely test the --out? That should be non-descructive, right?

Or do you mean for the other scripts?

retorquere commented 4 years ago

No just safely test anything.

bjohas commented 4 years ago

I have an API testing library - let me add you.

gh-89 - great. I looked for gh-98 :)

bjohas commented 4 years ago

This issue can be closed.