diff --git a/formatgamebook.py b/formatgamebook.py index 464b869..09bfa60 100755 --- a/formatgamebook.py +++ b/formatgamebook.py @@ -37,7 +37,6 @@ import json import quote import sections import templates -import verifygamebook from output import OutputFormat USAGE = "usage: %prog [options] inputfile(s)... outputfile" @@ -68,7 +67,6 @@ def format_gamebook(inputfilenames, outputfilename, import_default_map_file, templatedirs, - verify, shuffle): output_format = make_output(outputfilename, templatedirs) book = sections.Book(make_bookid(outputfilename)) @@ -76,8 +74,6 @@ def format_gamebook(inputfilenames, parse_file_to_book(open(inputfilename, 'r'), book) if import_default_map_file: import_default_nr_map(outputfilename, book) - if verify: - verifygamebook.verify(book) write_book(book, shuffle, output_format, outputfilename) def make_bookid(filename): @@ -191,8 +187,6 @@ if __name__ == '__main__': help='ignore default map file') ap.add_argument('-t', '--template', metavar='D', dest='templatedirs', action='append', help='add custom template dir') - ap.add_argument('-y', '--verify', action='store_true', - help='verify gamebook structure') ap.add_argument('-S', '--no-shuffle', action='store_false', dest='shuffle', help='do not shuffle sections') @@ -206,5 +200,4 @@ if __name__ == '__main__': args.outputfile, args.import_default_map_file, templatedirs, - args.verify, args.shuffle) diff --git a/readme.org b/readme.org index 64004f7..0b5ad3b 100644 --- a/readme.org +++ b/readme.org @@ -14,8 +14,7 @@ gamebook on paper or a screen (or for debugging it). : -h, --help show this help message and exit : -M, --no-default-map ignore default map file : -t D, --template D add custom template dir -: -y, --verify verify gamebook structure -: -r R, --random=R random number seed for shuffling sections +: -S, --no-shuffle do not shuffle sections ** Supported Output Formats diff --git a/verifygamebook.py b/verifygamebook.py deleted file mode 100644 index 118d5f3..0000000 --- a/verifygamebook.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python2 - -""" -Copyright (c) 2013, Pelle Nilsson -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" - -import sys - -def verify(book): - pass - -def v(name, ok, details=""): - if not ok: - print >> sys.stderr, name, "ERROR (" + details + ")" - sys.exit(1) - -def w(name, ok, details=""): - if not ok: - print >> sys.stderr, name, "WARNING (" + details + ")"