diff --git a/Makefile b/Makefile index 855bc55b..4660b5f4 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ rpm: all_games_html rules mo python setup.py bdist_rpm all_games_html: - PYTHONPATH=`pwd` ./scripts/all_games.py > docs/all_games.html + PYTHONPATH=`pwd` ./scripts/all_games.py html id doc/rules bare > docs/all_games.html rules: export PYTHONPATH=`pwd`; (cd html-src && ./gen-html.py) diff --git a/scripts/all_games.py b/scripts/all_games.py index c8a8b896..33c96e5b 100755 --- a/scripts/all_games.py +++ b/scripts/all_games.py @@ -26,6 +26,7 @@ sys.path[0] = os.path.normpath(pysollib_path) rules_dir = os.path.normpath(os.path.join(pysollib_path, 'data/html/rules')) # pprint(sys.path) # print rules_dir +html_mode = None fix_gettext() @@ -170,7 +171,8 @@ def all_games(sort_by='id'): def create_html(sort_by): - print(''' + if html_mode != 'bare': + print(''' PySolFC - List of solitaire games @@ -192,7 +194,8 @@ def create_html(sort_by): print('

The games

') all_games(sort_by) print('') - print('') + if html_mode != 'bare': + print('') def get_text(): @@ -272,6 +275,8 @@ if len(sys.argv) < 2 or sys.argv[1] == 'html': sort_by = sys.argv[2] if len(sys.argv) > 3: rules_dir = sys.argv[3] + if len(sys.argv) > 4: + html_mode = sys.argv[4] create_html(sort_by) elif sys.argv[1] == 'gettext': get_text()