Skip to content

Commit

Permalink
Show all documents
Browse files Browse the repository at this point in the history
  • Loading branch information
shuichiro-makigaki committed Sep 28, 2021
1 parent cd6c309 commit 4895b50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions mendeley_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
load_dotenv(Path('~').expanduser()/'.mendeley_cli'/'config')
load_dotenv(Path()/'.mendeley_cli'/'config')

logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.ERROR)

tablib_formats = list(formats.registry._formats.keys())

Expand Down Expand Up @@ -77,18 +77,18 @@ def get_documents(session, document_title=None, document_uuid=None, group_uuid=N
if group_uuid is not None:
documents.group_id = str(group_uuid)
if document_title is None and document_uuid is None:
return documents.list().items
return list(documents.iter())
if document_uuid is None:
return documents.advanced_search(title=document_title).list().items
return list(documents.advanced_search(title=document_title).iter())
else:
return [documents.get(document_uuid)]


def print_table(dataset: Dataset, print_format):
if print_format is None:
print(dataset)
else:
print(dataset.export(print_format))
fmt = print_format
if fmt is None:
fmt = 'cli'
print(dataset.export(fmt, tablefmt='simple'))


@click.group(context_settings={'max_content_width': 120})
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='mendeley-cli',
version='0.1.2',
version='0.1.3',
packages=find_packages(),
include_package_data=True,
install_requires=Path('requirements.txt').read_text().splitlines(),
Expand Down

0 comments on commit 4895b50

Please sign in to comment.