30 lines
619 B
Python
Executable File
30 lines
619 B
Python
Executable File
import argparse
|
|
from website_generator import WebsiteGenerator
|
|
|
|
|
|
def parse_args():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument(
|
|
'config',
|
|
type=argparse.FileType(),
|
|
help='Path to a YAML configuration file.',
|
|
)
|
|
parser.add_argument(
|
|
'-t', '--tag',
|
|
type=str,
|
|
action='append',
|
|
help='Restrict execution of actions to one or more tags.',
|
|
dest='tags',
|
|
)
|
|
return parser.parse_args()
|
|
|
|
|
|
def main():
|
|
args = parse_args()
|
|
generator = WebsiteGenerator(args.config.read())
|
|
generator()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|