mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-09 12:21:57 -04:00
rename TAG_SEPARATORS to TAG_SEPARATOR_PATTERN
This commit is contained in:
parent
049f88def9
commit
fc3d2bb4dc
3 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@ from .schema import Link
|
|||
from ..util import enforce_types, parse_date
|
||||
from ..config import (
|
||||
OUTPUT_DIR,
|
||||
TAG_SEPARATORS,
|
||||
TAG_SEPARATOR_PATTERN,
|
||||
)
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ def write_link_to_sql_index(link: Link):
|
|||
info = {k: v for k, v in link._asdict().items() if k in Snapshot.keys}
|
||||
|
||||
tag_list = list(dict.fromkeys(
|
||||
tag.strip() for tag in re.split(TAG_SEPARATORS, link.tags or '')
|
||||
tag.strip() for tag in re.split(TAG_SEPARATOR_PATTERN, link.tags or '')
|
||||
))
|
||||
info.pop('tags')
|
||||
|
||||
|
@ -112,7 +112,7 @@ def write_sql_link_details(link: Link, out_dir: Path=OUTPUT_DIR) -> None:
|
|||
snap.title = link.title
|
||||
|
||||
tag_list = list(dict.fromkeys(
|
||||
tag.strip() for tag in re.split(TAG_SEPARATORS, link.tags or '')
|
||||
tag.strip() for tag in re.split(TAG_SEPARATOR_PATTERN, link.tags or '')
|
||||
))
|
||||
|
||||
snap.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue