Prechádzať zdrojové kódy

make all parsers accept arbitrary meta kwargs

Nick Sweeting 5 rokov pred
rodič
commit
a682a9c478

+ 1 - 1
archivebox/parsers/generic_json.py

@@ -13,7 +13,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_generic_json_export(json_file: IO[str]) -> Iterable[Link]:
+def parse_generic_json_export(json_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse JSON-format bookmarks export files (produced by pinboard.in/export/, or wallabag)"""
 
     json_file.seek(0)

+ 1 - 1
archivebox/parsers/generic_rss.py

@@ -12,7 +12,7 @@ from ..util import (
 )
 
 @enforce_types
-def parse_generic_rss_export(rss_file: IO[str]) -> Iterable[Link]:
+def parse_generic_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse RSS XML-format files into links"""
 
     rss_file.seek(0)

+ 1 - 1
archivebox/parsers/generic_txt.py

@@ -16,7 +16,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_generic_txt_export(text_file: IO[str]) -> Iterable[Link]:
+def parse_generic_txt_export(text_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse raw links from each line in a text file"""
 
     text_file.seek(0)

+ 1 - 1
archivebox/parsers/medium_rss.py

@@ -14,7 +14,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_medium_rss_export(rss_file: IO[str]) -> Iterable[Link]:
+def parse_medium_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse Medium RSS feed files into links"""
 
     rss_file.seek(0)

+ 1 - 1
archivebox/parsers/netscape_html.py

@@ -14,7 +14,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_netscape_html_export(html_file: IO[str]) -> Iterable[Link]:
+def parse_netscape_html_export(html_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse netscape-format bookmarks export files (produced by all browsers)"""
 
     html_file.seek(0)

+ 1 - 1
archivebox/parsers/pinboard_rss.py

@@ -14,7 +14,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_pinboard_rss_export(rss_file: IO[str]) -> Iterable[Link]:
+def parse_pinboard_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse Pinboard RSS feed files into links"""
 
     rss_file.seek(0)

+ 1 - 1
archivebox/parsers/pocket_html.py

@@ -14,7 +14,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_pocket_html_export(html_file: IO[str]) -> Iterable[Link]:
+def parse_pocket_html_export(html_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse Pocket-format bookmarks export files (produced by getpocket.com/export/)"""
 
     html_file.seek(0)

+ 1 - 1
archivebox/parsers/shaarli_rss.py

@@ -13,7 +13,7 @@ from ..util import (
 
 
 @enforce_types
-def parse_shaarli_rss_export(rss_file: IO[str]) -> Iterable[Link]:
+def parse_shaarli_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
     """Parse Shaarli-specific RSS XML-format files into links"""
 
     rss_file.seek(0)