Skip to content

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

@retorquere

Description

@retorquere
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions