Commits

Luke Plant committed dcf0aae

Removed page BibleMemorisationVerses which isn't very useful.

Comments (0)

Files changed (2)

bibleverses/config.py

 TOPICYAMLPAGENAME = 'BibleMemorisationTopicYaml'
 SCHEMEYAMLPAGENAME = 'BibleMemorisationSchemeYaml'
 
-VERSESPAGENAME = "BibleMemorisationVerses"
 TOPICSPAGENAME = "BibleMemorisationTopics"
 SCHEMESPAGENAME = "BibleMemorisationSchemes"
 SCHEMESPAGENAMEPREFIX = "BibleMemorisationSchemes/"
 #datareader = readers.FileReader(YAMLDIR)
 
 datawriters = {'wiki': writers.TracWikiWriter(DATABASE, AUTHOR)}
-

bibleverses/update.py

 from config import datawriters
 from StringIO import StringIO
 
-from config import VERSESPAGENAME, TOPICSPAGENAME, SCHEMESPAGENAME, SCHEMESPAGENAMEPREFIX
+from config import TOPICSPAGENAME, SCHEMESPAGENAME, SCHEMESPAGENAMEPREFIX
 
 # All of the 'make_x_page' functions here return a dictionary containing
 # multiple formats of the data to be written.  The 'datawriters' dict
 # is used to write the data out to different backends.
 
+# The 'wiki' format is for my private use, and so it does some things slightly
+# differently:
+#  - It will do some special formmating for Hebrew
+#  - If more than one version of a text is supplied, it will
+#    prefer the one that isn't ESV
+# The html format is for public consumption
+#  - It always outputs ESV and KJV
+
 def write_page(name, data):
     for format, text in data.items():
         writer = datawriters.get(format)
     topictree = get_topictree()
     extras = populate_topic_tree(topictree, verses)
     schemes = get_schemes()
-    write_page(VERSESPAGENAME, make_done_page(verses))
     write_page(TOPICSPAGENAME, make_topics_page(verses, topictree, extras))
     build_schemes(verses, topictree, schemes)
     write_page(SCHEMESPAGENAME, make_scheme_index_page(schemes, SCHEMESPAGENAMEPREFIX))
                 buf.write(l)
                 buf.write(u" [[BR]]\n")
 
-def make_done_page(verses):
-    wiki = StringIO()
-    wiki.write(
-u"""
-= Bible Memorisation Verses =
-
-This page is autogenerated from BibleMemorisationYaml - do not edit.
-
-""")
-    for v in verses:
-        wiki.write(u'bible:"%s"\n' % v)
-        write_verse_text_wiki(v, wiki)
-        wiki.write(u"\n")
-    return {'wiki': wiki.getvalue()}
-
 def bible_entry_wiki(entry):
     return u"bible:\"%s\" -- %s\n" % (entry.verse, entry.comment)