1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-05 06:57:27 +02:00

Added usage messages to all the scripts and documented multiple configuration

projects.
This commit is contained in:
Chris Palmer
2020-03-11 23:09:03 +00:00
parent a8422a6aa6
commit 23a64f238d
14 changed files with 124 additions and 23 deletions

View File

@@ -30,6 +30,7 @@ import re
from shutil import copyfile
from tests import update_image
import sys
import argparse
project_dirs = ['../..', 'examples']
target_dir = 'gallery'
@@ -39,7 +40,6 @@ def gallery(force):
if not os.path.isdir(target_dir):
os.makedirs(target_dir)
paths = sorted([pdir + '/' + i for pdir in project_dirs for i in os.listdir(pdir) if os.path.isdir(pdir + '/' + i + '/assemblies')], key = lambda s: os.path.basename(s))
with open(output_name, 'wt') as output_file:
print("# A gallery of projects made with NopSCADlib", file = output_file)
@@ -78,4 +78,8 @@ def gallery(force):
if __name__ == '__main__':
init()
gallery(force = len(sys.argv) > 1 and sys.argv[1] == '-f')
parser = argparse.ArgumentParser()
parser.add_argument("-f", help = "run make_all in each project to force update", action="store_true")
args = parser.parse_args()
gallery(force = args.f)