Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples - keeping these here so we can check lateron what's still needed #78

Open
retorquere opened this issue Aug 12, 2019 · 0 comments

Comments

@retorquere
Copy link

def get_all_items_with_tag(zot, tag=None):
    if filter:
        print("--filter has no effect for this action.")
    items = zot.everything(zot.items(tag=tag))
    for item in items:
        print(json.dumps(item, indent=jsonIndent))

def get_attachment_or_note(zot):
    if filter:
        print("--filter has no effect for this action.")
    items = zot.everything(zot.items(itemType=["-attachment","-note"]))
    print(json.dumps(items, indent=jsonIndent))

Note - this doesn't seem to work!

urschrei/pyzotero#93

def count_items_with_tag(zot, **filter):    
    if filter:
        items = zot.everything(zot.tags(filter))
    else:
        items = zot.everything(zot.tags())
    # print(json.dumps(items, indent=jsonIndent))
    for tag in items:
        items = zot.num_tagitems(tag)
        print(tag + " " + items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant