mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
Improved tags
This commit is contained in:
parent
0158efb1d0
commit
62c9028212
11 changed files with 172 additions and 10 deletions
|
@ -65,7 +65,14 @@ def write_sql_link_details(link: Link, out_dir: Path=OUTPUT_DIR) -> None:
|
|||
except Snapshot.DoesNotExist:
|
||||
snap = write_link_to_sql_index(link)
|
||||
snap.title = link.title
|
||||
snap.tags = link.tags
|
||||
|
||||
tag_set = (
|
||||
set(tag.strip() for tag in (link.tags or '').split(','))
|
||||
)
|
||||
tag_list = list(tag_set) or []
|
||||
|
||||
for tag in tag_list:
|
||||
snap.tags.add(tag)
|
||||
snap.save()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue