Skip to content

Commit

Permalink
Create wrapper script
Browse files Browse the repository at this point in the history
  • Loading branch information
martimpassos committed Apr 5, 2024
1 parent 90d8ec9 commit 5d08e17
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions imaginerio-etl/scripts/update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import argparse

from ..utils.logger import logger
from . import iiif, viewcones


def main():
logger.info("Parsing arguments")
parser = argparse.ArgumentParser()
parser.add_argument(
"--mode", "-m", help="run mode", choices=["test", "prod"], default="test"
)
parser.add_argument("--index", "-i", nargs="+", help="index to run", default="all")
parser.add_argument("--retile", "-r", action="store_true", default=False)
args = parser.parse_args()
if args.retile and args.index == "all":
parser.error("The --retile option cannot be used together with --index='all'")
viewcones.main()
iiif.main(args)


if __name__ == "__main__":
main()

0 comments on commit 5d08e17

Please sign in to comment.