diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/tasks/scanner.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index 1b1c6ef..6365ff9 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -21,8 +21,7 @@ from .source_parser import ScannedSource, SourceScanError, scan_source_file def create_source(scanned: ScannedSource, scan_time: datetime) -> Source: - """ - Create a source model from a newly discovered document. + """Create a source model from a newly discovered document. A sent Webmention is created for each discovered target at the initial source revision. @@ -52,8 +51,7 @@ def create_source(scanned: ScannedSource, scan_time: datetime) -> Source: def update_source( source: Source, scanned: ScannedSource, scan_time: datetime ) -> Source: - """ - Update an existing source from newly scanned data. + """Update an existing source from newly scanned data. A changed or previously deleted source receives a new revision. Existing sent Webmentions are updated to reflect the current targets, and newly discovered @@ -103,8 +101,7 @@ def update_source( def scan_sources() -> None: - """ - Scan generated source documents and queue pending Webmentions. + """Scan generated source documents and queue pending Webmentions. New and changed sources are persisted, missing sources are marked as deleted, and Webmentions requiring processing are queued for sending. A scan that @@ -157,7 +154,7 @@ def scan_sources_task() -> None: for index_path in root.rglob("index.html"): relative_path = index_path.relative_to(root) - if relative_path.parent == Path("."): + if relative_path.parent == Path(): continue seen_paths.add(relative_path.as_posix()) |
