change names of commands and make it positional
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
__version__ = "20220823.0"
|
__version__ = "20230103.0"
|
||||||
|
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class Mirva:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.run_commands["generator"]:
|
if self.run_commands["build"]:
|
||||||
self.get_config()
|
self.get_config()
|
||||||
self.create_posts()
|
self.create_posts()
|
||||||
self.write_index()
|
self.write_index()
|
||||||
@@ -202,11 +202,11 @@ class Mirva:
|
|||||||
help="Force regeneration of middle sized images",
|
help="Force regeneration of middle sized images",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--command",
|
|
||||||
"-c",
|
|
||||||
default="all",
|
default="all",
|
||||||
|
dest="command",
|
||||||
action="store",
|
action="store",
|
||||||
choices=["all", "config", "generator"],
|
nargs="?",
|
||||||
|
choices=["all", "config", "build"],
|
||||||
help="Run only part of the process. Defaults to all. Config is run always if it doesn't exist.",
|
help="Run only part of the process. Defaults to all. Config is run always if it doesn't exist.",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -215,8 +215,7 @@ class Mirva:
|
|||||||
"config": self.options.command == "config"
|
"config": self.options.command == "config"
|
||||||
or self.options.command == "all"
|
or self.options.command == "all"
|
||||||
or not os.path.exists(self.config_file),
|
or not os.path.exists(self.config_file),
|
||||||
"generator": self.options.command == "generator"
|
"build": self.options.command == "build" or self.options.command == "all",
|
||||||
or self.options.command == "all",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_index(self, posts):
|
def get_index(self, posts):
|
||||||
|
|||||||
Reference in New Issue
Block a user