archivebox.core.tag_utils

Module Contents

Functions

normalize_tag_name

normalize_tag_sort

normalize_has_snapshots_filter

normalize_created_by_filter

normalize_created_year_filter

get_matching_tags

get_tag_creator_choices

get_tag_year_choices

get_tag_by_ref

get_or_create_tag

rename_tag

delete_tag

export_tag_urls

export_tag_snapshots_jsonl

_display_snapshot_title

_build_snapshot_preview

_build_snapshot_preview_map

build_tag_card

build_tag_cards

Data

TAG_SNAPSHOT_PREVIEW_LIMIT

TAG_SORT_CHOICES

TAG_HAS_SNAPSHOTS_CHOICES

API

archivebox.core.tag_utils.TAG_SNAPSHOT_PREVIEW_LIMIT[source]

10

archivebox.core.tag_utils.TAG_SORT_CHOICES[source]

((‘name_asc’, ‘Name A-Z’), (‘name_desc’, ‘Name Z-A’), (‘created_desc’, ‘Created newest’), (‘created_…

archivebox.core.tag_utils.TAG_HAS_SNAPSHOTS_CHOICES[source]

((‘all’, ‘All’), (‘yes’, ‘Has snapshots’), (‘no’, ‘No snapshots’))

archivebox.core.tag_utils.normalize_tag_name(name: str) str[source]
archivebox.core.tag_utils.normalize_tag_sort(sort: str = 'created_desc') str[source]
archivebox.core.tag_utils.normalize_has_snapshots_filter(value: str = 'all') str[source]
archivebox.core.tag_utils.normalize_created_by_filter(created_by: str = '') str[source]
archivebox.core.tag_utils.normalize_created_year_filter(year: str = '') str[source]
archivebox.core.tag_utils.get_matching_tags(query: str = '', sort: str = 'created_desc', created_by: str = '', year: str = '', has_snapshots: str = 'all') django.db.models.QuerySet[archivebox.core.models.Tag][source]
archivebox.core.tag_utils.get_tag_creator_choices() list[tuple[str, str]][source]
archivebox.core.tag_utils.get_tag_year_choices() list[str][source]
archivebox.core.tag_utils.get_tag_by_ref(tag_ref: str | int) archivebox.core.models.Tag[source]
archivebox.core.tag_utils.get_or_create_tag(name: str, created_by: django.contrib.auth.models.User | None = None) tuple[archivebox.core.models.Tag, bool][source]
archivebox.core.tag_utils.rename_tag(tag: archivebox.core.models.Tag, name: str) archivebox.core.models.Tag[source]
archivebox.core.tag_utils.delete_tag(tag: archivebox.core.models.Tag) tuple[int, dict[str, int]][source]
archivebox.core.tag_utils.export_tag_urls(tag: archivebox.core.models.Tag) str[source]
archivebox.core.tag_utils.export_tag_snapshots_jsonl(tag: archivebox.core.models.Tag) str[source]
archivebox.core.tag_utils._display_snapshot_title(snapshot: archivebox.core.models.Snapshot) str[source]
archivebox.core.tag_utils._build_snapshot_preview(snapshot: archivebox.core.models.Snapshot, request: django.http.HttpRequest | None = None) dict[str, Any][source]
archivebox.core.tag_utils._build_snapshot_preview_map(tags: list[archivebox.core.models.Tag], request: django.http.HttpRequest | None = None, preview_limit: int = TAG_SNAPSHOT_PREVIEW_LIMIT) dict[int, list[dict[str, Any]]][source]
archivebox.core.tag_utils.build_tag_card(tag: archivebox.core.models.Tag, snapshot_previews: list[dict[str, Any]] | None = None) dict[str, Any][source]
archivebox.core.tag_utils.build_tag_cards(query: str = '', request: django.http.HttpRequest | None = None, limit: int | None = None, preview_limit: int = TAG_SNAPSHOT_PREVIEW_LIMIT, sort: str = 'created_desc', created_by: str = '', year: str = '', has_snapshots: str = 'all') list[dict[str, Any]][source]