Skip to content

Commit

Permalink
Remove other unnecessary improts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Nov 13, 2024
1 parent a10424b commit 6f7438a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
4 changes: 0 additions & 4 deletions bin/opds2_odl_import_monitor
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
OPDS 2.x + ODL collections."""


from webpub_manifest_parser.odl import ODLFeedParserFactory

from palace.manager.api.odl.importer import (
OPDS2WithODLImporter,
OPDS2WithODLImportMonitor,
)
from palace.manager.core.opds2_import import RWPMManifestParser
from palace.manager.scripts.monitor import RunCollectionMonitorScript

RunCollectionMonitorScript(
OPDS2WithODLImportMonitor,
import_class=OPDS2WithODLImporter,
parser=RWPMManifestParser(ODLFeedParserFactory()),
).run()
4 changes: 0 additions & 4 deletions bin/opds2_odl_schema_validate
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
OPDS import collections."""


from webpub_manifest_parser.odl import ODLFeedParserFactory

from palace.manager.api.odl.importer import OPDS2WithODLImporter
from palace.manager.core.opds2_import import RWPMManifestParser
from palace.manager.core.opds_schema import OPDS2WithODLSchemaValidation
from palace.manager.scripts.monitor import RunCollectionMonitorScript

import_script = RunCollectionMonitorScript(
OPDS2WithODLSchemaValidation,
import_class=OPDS2WithODLImporter,
parser=RWPMManifestParser(ODLFeedParserFactory()),
)

import_script.run()
9 changes: 1 addition & 8 deletions bin/opds2_reaper_monitor
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ from collections.abc import Generator
from typing import Any, cast

from sqlalchemy.orm import raiseload
from webpub_manifest_parser.opds2 import OPDS2FeedParserFactory

from palace.manager.core.coverage import CoverageFailure
from palace.manager.core.metadata_layer import TimestampData
from palace.manager.core.opds2_import import (
OPDS2API,
OPDS2Importer,
OPDS2ImportMonitor,
RWPMManifestParser,
)
from palace.manager.core.opds2_import import OPDS2API, OPDS2Importer, OPDS2ImportMonitor
from palace.manager.scripts.input import CollectionInputScript
from palace.manager.sqlalchemy.model.collection import Collection
from palace.manager.sqlalchemy.model.edition import Edition
Expand All @@ -28,7 +22,6 @@ def main():
importer_class=OPDS2Importer,
monitor_class=OPDS2ReaperMonitor,
protocol=OPDS2Importer.NAME,
parser=RWPMManifestParser(OPDS2FeedParserFactory()),
)

reaper_script.run()
Expand Down
6 changes: 1 addition & 5 deletions bin/opds2_schema_validate
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
"""Update the circulation manager server with new books from
OPDS import collections."""


from webpub_manifest_parser.opds2 import OPDS2FeedParserFactory

from palace.manager.core.opds2_import import OPDS2Importer, RWPMManifestParser
from palace.manager.core.opds2_import import OPDS2Importer
from palace.manager.core.opds_schema import OPDS2SchemaValidation
from palace.manager.scripts.opds_import import OPDSImportScript

import_script = OPDSImportScript(
importer_class=OPDS2Importer,
monitor_class=OPDS2SchemaValidation,
protocol=OPDS2Importer.NAME,
parser=RWPMManifestParser(OPDS2FeedParserFactory()),
)

import_script.run()

0 comments on commit 6f7438a

Please sign in to comment.