Closed A3EKV closed 2 years ago
--print-format
option works at the newest version (v0.1.4). You can see supported formats by --help
.
Thank you very much for response. I have tried that but I get the following error when I use for example json or html, I haven't tested the other formats yet:
mendeley get documents --print-format json | tee documents.json
-------------------------------------------------------------------------------
mendeley 8 <module>
sys.exit(cmd())
core.py 1137 __call__
return self.main(*args, **kwargs)
core.py 1062 main
rv = self.invoke(ctx)
core.py 1668 invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
core.py 1668 invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
core.py 1404 invoke
return ctx.invoke(self.callback, **ctx.params)
core.py 763 invoke
return __callback(*args, **kwargs)
__init__.py 222 cmd_get_documents
print_table(dataset, print_format)
__init__.py 91 print_table
print(dataset.export(fmt, tablefmt='simple'))
core.py 427 export
return fmt.export_set(self, **kwargs)
TypeError:
export_set() got an unexpected keyword argument 'tablefmt'
It may be the old version. Could you update Mendeley CLI?
The default output of
mendeley get documents
is missing a lot of properties returned by the API. Allowing output as json (for instance via an option--json
) will be such a nice feature because we can pipe that tojq
command and manipulate/filter the output as desired.