change names of commands and make it positional
This commit is contained in:
@@ -62,7 +62,7 @@ class Mirva:
|
||||
)
|
||||
)
|
||||
|
||||
if self.run_commands["generator"]:
|
||||
if self.run_commands["build"]:
|
||||
self.get_config()
|
||||
self.create_posts()
|
||||
self.write_index()
|
||||
@@ -202,11 +202,11 @@ class Mirva:
|
||||
help="Force regeneration of middle sized images",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--command",
|
||||
"-c",
|
||||
default="all",
|
||||
dest="command",
|
||||
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.",
|
||||
)
|
||||
|
||||
@@ -215,8 +215,7 @@ class Mirva:
|
||||
"config": self.options.command == "config"
|
||||
or self.options.command == "all"
|
||||
or not os.path.exists(self.config_file),
|
||||
"generator": self.options.command == "generator"
|
||||
or self.options.command == "all",
|
||||
"build": self.options.command == "build" or self.options.command == "all",
|
||||
}
|
||||
|
||||
def get_index(self, posts):
|
||||
|
||||
Reference in New Issue
Block a user