Skip to content

Commit 99a4833

Browse files
GH-19: Implement the CLI and hande command arguments (GH-21)
* Implement the initial version of the CLI * Register `click` in the dependency list * Add `--as` option and make the `Thumbnails` creation concurrently * Override method name to correspond with the functionality
1 parent 7f9cfad commit 99a4833

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

thumbnails/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
def worker(video, as_):
1717
video.extract_frames()
18-
formatter = ThumbnailFactory.get_thumbnail(as_, video)
18+
formatter = ThumbnailFactory.get_formatter(as_, video)
1919
formatter.prepare_thumbnails()
2020
formatter.generate()
2121

thumbnails/formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ThumbnailFactory:
2424
thumbnails = {}
2525

2626
@classmethod
27-
def get_thumbnail(cls, typename, *args, **kwargs) -> ThumbnailFormat:
27+
def get_formatter(cls, typename, *args, **kwargs) -> ThumbnailFormat:
2828
try:
2929
return cls.thumbnails[typename](*args, **kwargs)
3030
except KeyError:

0 commit comments

Comments
 (0)