BIBLETAG LOG - contact@SpiritAndTruth.org Fri Sep 09 19:07:48 2011 ARGS: ['dist\\bibletag.exe', '-?', '-ver'] bibletag ver. 1.34 address ver. 1.13 Usage: bibletag [flags] path1 [path2...] TYPICAL USAGE ------------- The most common way which bibletag is used is to tag HTML files containing Bible references for one of several standard tool formats: -st Convert Bible addresses into links to the dynamic lookup Bible on the internet at www.SpiritAndTruth.org/lookup/index.htm. -lbxst A combination of -lbx and -st tagging where the address acts as a link to the www.SpiritAndTruth.org bible and an icon links to Libronix on the local machine. -gospelcom Tag Bible addresses with Bible links to the bible.gospelcom.net website. -lbxgospel A combination of -lbx and -gospelcom tagging where the address acts as a link to bible.gospelcom.net and an icon links to Libronix on the local machine. -studylight Tag Bible addresses with Bible links to the www.studylight.org website. -lbxstudy A combination of -lbx and -studylight tagging where the address acts as a link to www.studylight.org and an icon links to Libronix on the local machine. -lbx Tag Bible addresses to launch Libronix on the local machine. -lbxpb Tag Bible addresses with Bible links suitable for subsequent use with the Libronix 4 Personal Book Tool. -lbxpbb Tag Bible addresses with Bible links suitable for subsequent compilation by the older Libronix Personal Book Builder. (Generally superseded by -lbxpb above.) For example, to tag a file in preparation for use with the a Libronix 4 Personal Book Tool: bibletag -lbxpb 'c:\my directory\myfile.htm' (Quotes are required around paths containing spaces.) RUNNING BIBLETAG ---------------- Bibletag comes in two flavors: a python source file (bibletag.py) and a DOS/Windows program (bibletag.exe). If you are unfamiliar with Python, then you probably want to use the DOS/Windows program. However, bibletag does not run with a graphical user interface (e.g., window). It is possible to convert files by dragging and dropping them onto the bibletag.exe program as follows: 1. Use Windows Explorer (the file manager) to open the folder containing bibletag.exe. We'll call this FOLDER1. 2. Open the flags.txt document and edit the flags which you want to pass to bibletag when it tags your file(s). (See the other flags_*.txt files for examples.) NOTE: If you are running bibletag using python or from a DOS command window and are specifying all your flags on the command line, then you will want to delete the flags.txt file. Otherwise, the flags from flags.txt will be combined with the flags specified on the command line. 3. To convert a file (or folder containing a group of files): A. Open another window in Windows Explorer. B. Move to the folder containing the file or subfolder you want to tag. We'll call this FOLDER2. C. Drag the file(s) or subfolder from within FOLDER2 that you want to tag. D. Drop them onto the bibletag.exe file in FOLDER1. Be sure you drop them right on the bibletag.exe file. 4. Bibletag will run and convert your files, leaving the output in the same location as the original file(s) or folder(s), but with an additional __bibletag extension to the file name. For example, if the input file was: c:\My Documents\luke.htm bibletag will produce: c:\My Documents\luke_bibletag.htm 5. When bibletag runs, it logs its activity to the file 'bibletag_log.txt' in the folder where bibletag.exe resides. 6. NOTE: If you are tagging anything other than .htm files, you must specify the extenstion of the file type your are tagging usint the '-ext' flag (see below). For example, add one of the following in the flags.txt file: -ext .txt -ext .xml FLAGS ----- flags.txt When a 'flags.txt' file exists in the bibletag folder, then any flags specified on the command line are combined with flags listed in this file. The flags in the flags.txt file may be all on one line: -book Rev -exact -yes or individually on separate lines: -book Rev -exact -yes The flags.txt file provides a way for common flags to be listed in one place and, more importantly, provides a way to pass flags to the Windows/DOS command-line version of the program when running it using drag-and-drop (see above). -backup [dir] Directory where original files are optionally saved prior to tagging Bible addresses. ------------------------------------------------------- THIS FLAG IS BEING RETAINED FOR BACKWARD COMPATIBILITY. ------------------------------------------------------- We recommend discontinuing this flag in favor of the new default behavior which does not modify the original files but creates new files for the tagged output. If no -backup flag is supplied, the tagging operation leaves the input files unmodified and produces correspondingly-named output files. For example, if the -backup flag is omitted, then an input file with the name: c:\My Documents\myFile.htm will be tagged to produce the output file: c:\My Documents\myFile_bibletag.htm -book name Assumes addresses which appear without an associated Bible book are in the specified book. For example '-book Re' will treat all floating addresses as from the Book of Revelation. Numbers are considered floating addresses when they contain a colon separator (e.g., 12:45) or are preceded by a chapter or verse "introducer" (e.g., "chapter" "chapters", "chs." "verse", "verses" "vv." ). NOTE: The name of the book is assumed to be capitalized unless the -ignorecase flag is specified. Without the -ignorecase flag, specifying the following will fail: -book 1cor whereas the following will succeed: -book 1Cor -books file Optional file containing addition bible book names to be recognized. The file must contain 66 lines of text with one book name per line corresponding, in order, to each of the 66 books of the bible in their standard arrangment. See the example file 'books.txt'. -exact Only tag addresses which exactly match bible book names (including those specified in the optional -books file). See the -ignorecase flag. -ext .txt Specify the extension for files to be tagged. The default extension is '.htm?' The extension is case-insensitive. -gospelcom Links bible references to the bible.gospelcom.net website. -help -? Display this help information and exit. -history Display revision history and exit. -ignorecase Ignore the alphabetic case of Bible book names (including those specified in the optional -books file) when tagging addresses. See the -exact flag. NOTE: This flag is required in order to utilize or match book names which are entirely in lowercase: -book john -ignorecase -insert file Inserts the contents of the specified file prior to the '' tag (if any). This is useful for inserting javascript into each file which the tag can then utilize. This has largely been superceded by the -tagjs flag. The javascript code is inserted after any code inserted by the -tagjs flag so you can redefined the X() function to customize operation. -join Preserve joined lines in output. Input lines are joined as paragraphs during tagging in order to successfully recognize addresses which span line boundaries. After tagging, lines are separated to preserve their original format. Use this flag to retain joined lines in the output. (May be required for non-HTML files where tags cannot span line breaks.) See -nojoin. -lbx Tag Bible addresses to launch Libronix on the local machine. LibronixLink.gif file in the same directory as the tagged file before use.) -lbxgospel A combination of -lbx and -gospelcom tagging where the address acts as a link to bible.gospelcom.net and an icon links to Libronix on the local machine. (Be sure to place the LibronixLink.gif file in the same directory as the tagged file before use.) -lbxgospel+ Same as the -lbxgospel flag, but substitutes a "+" sign in the place of the icon for each link. This is less visually distracting in some applications. -lbxstudy A combination of -lbx and -studylight tagging where the address acts as a link to www.studylight.org and an icon links to Libronix on the local machine. (Be sure to place the LibronixLink.gif file in the same directory as the tagged file before use.) -lbxstudy+ Same as the -lbxstudy flag, but substitutes a "+" sign in the place of the icon for each link. This is less visually distracting in some applications. -lbxpb Tags address fields in preparation for use in the www.logos.com Libronix 4 Personal Book tool. For example, text of the form Genesis 1:1, 2; 3:15 will be tagged as Genesis [[1:1|bible.1.1.1]], [[2|bible.1.1.2]]; [[3:15|bible.1.3.15]] When the -lbxpb flag is specified, Strong's Greek and Hebrew numbers are also tagged. For example: h123 --> [[HebrewStrongs:h123]] G439 --> [[GreekStrongs:G439]] -lbxpbb Tags address fields in preparation for use in the www.logos.com Libronix Personal Book Builder compiler. (See -lbxpb above which has generally supersedes this flag.) For example, text of the form Genesis 1:1, 2; 3:15 will be tagged as Genesis [[1:1|bible.1.1.1]], [[2|bible.1.1.2]]; [[3:15|bible.1.3.15]] When the -lbxpbb flag is specified, Strong's Greek and Hebrew numbers are also tagged. For example: h123 --> [[HebrewStrongs:h123]] G439 --> [[GreekStrongs:G439]] -lbxst A combination of -lbx and -st tagging where the address acts as a link to bible.gospelcom.net and an icon links to Libronix on the local machine. (Be sure to place the LibronixLink.gif file in the same directory as the tagged file before use.) -lbxst+ Same as the -lbxst flag, but substitutes a "+" sign in place of the icon for each link. This is less visually distracting in some applications. -lbxc filename Generates an empty HTML commentary for every verse of the bible tagged with milestones for the Libronix Personal Book Builder compiler. Includes a "styles.css" file to define appearance of content. The filename specifies the name of the file to be built. See the "commentary.htm" file provided as an example. -lbxcnov filename Same as -lbxc, but without verse milestones. -nojoin Do not join lines. Prevents the tagger from joining lines into one single large line before scanning for bible addresses. The input file cannot contain addresses which span across line boundaries. See -join. -olivetree Tags address fields in preparation for use in the www.olivetree.com Biblereader program. path1 path2... A list of directories or files which are searched for files to be tagged. -plainlinks When operating on an HTML file, modify the style in the document header so that URLs appear without an underline except when they are hovered over with the mouse. -range Addresses which specify a chapter without a designated verse use a tag which includes the entire verse range for that chapter rather than verse 1. For example, an address such as "Rev. 1" which would normally result in a tag of "Rev. 1:1" would result in a tag of "Rev. 1:1-20" instead. -scrub Scrubs out artifacts generated by Microsoft Word DOC-to-HTML conversion. The following conversions are applied which also dramatically reduce file size: mdash (becomes dash) ndash (becomes dash) .. (smart tags deleted) @list lN (list definitions deleted) span.BAS* (style definitions deleted) -st Enables flags typically used by SpiritAndTruth.org. Equivalent to: '-scrub -tagjs -plainlinks' -swordsearcher Tags address fields in preparation for use in the www.swordsearcher.com SwordSearcher program. Automatically enables the -tagbook flag. -tag '1|2|3' Optional custom tag string to be used to surround Bible addresses. Unless specified otherwise, the tag string used is as follows: | This will tag the address string 'John 3:16' as follows: 'John 3:16' This will convert Bible references into dynamic links to the related verse at the SpiritAndTruth.org website. For default operation, this is as if the following values had been specified. 1 = '' 3 = '' Tags which contain URLs which are relative (no ':') are automatically adjusted for the location of the file being scanned within its directory tree. For example, specifying a tag with 'href=file.txt' will be converted to 'href=../file.txt', 'hef=../../file.txt' and so on files are tagged which are progressively deeper in the directory tree. -tagvar string An variable form of the tag string may be specified which provides the ability to define the tag using the following variables: %%BOOK%% - the abbreviated bible book name %%BOOKLONG%% - the full canonical bible book name. %%CHAPTER%% - the chapter. %%VERSE%% - the verse. %%TOPIC%% - the topic being tagged (see -topics flag) %%BIBLEADDRESS%% = "%%BOOKLONG%% %%CHAPTER%%:%%VERSE%%" %%MATCH%% - the text matched in the original file Each of the variables may be specified in a quoted form suitable for embedding in a URL: %%QUOTEDBOOK%%, %%QUOTEDBOOKLONG%, %%QUOTEDTOPIC%%, etc. For example, a tag could be defined as follows: -tagvar %%MATCH%% Tags which contain URLs which are relative (no ':') are automatically adjusted for the location of the file being scanned within its directory tree. For example, specifying a tag with 'href=file.txt' will be converted to 'href=../file.txt', 'hef=../../file.txt' and so on files are tagged which are progressively deeper in the directory tree. -tagjs [urlPath] Use javascript to implement the tagging and lookup. Tags within the document use an abbreviated query form, as if you had specified -tag '|' Javascript code is inserted prior to the of the document which defines function "X()" to prepend the specified urlPath to each query before performing the lookup. With this scheme, a tag for 'John 3:16' would have the following javascript URL: href=javascript:X("John 3:16") The actual lookup would go to: 'urlPath?John 3:16' If urlPath is omitted, it defaults to 'https://SpiritAndTruth.org/lookup/index.htm'. The javascript code is inserted ahead of any file specified by the -insert flag so you can redefined the X() function to customize operation. The javascript variable 'urlPath' contains the url Path. If the urlPath is relative, it is adjusted to reflect the relative position of each file within the tagged directory structure. If the document is displayed within a containing frame which contains a pane named 'bible', then the tagged address is looked up within that pane. This allows the document and bible reference to be viewed simultaneously. If the urlPath is relative and points to a directory which is not found, the assumption is made that the file has been moved from its original location and the lookup occurs at https://SpiritAndTruth.org/lookup/index.htm instead. This allows tagged files to reside within a directory structure which includes support for bible verse lookup locally. But if the files get moved (e.g., downloaded from your server), the bible lookup links which were previously relative, will not operate as if absolute so the lookups will not break, but will go over the internet instead. -tagbook The book name will be encapsulated in the tag (normally only the address portion is tagged). Automatically enabled when -swordsearcher is specified. -topics file A file containing a list of topics to be tagged. When specifying this flag, either a custom "-tagvar string" must be provided (which contains a %%TOPIC%% variable describing how each topic should be tagged in the output). Alternately, one of the following tag flags must be specified: -lbx, -lbxgospel, -lbxgospel+, -lbxpb, -lbxpbb, -lbxst, -lbxst+, -st, -lbxstudy, -lbxstudy+. (When an -lbx* flag is specified the link to Libronix will treat the topic as a "Text" data type so you will want to create a keylink to your favorite dictionary using that data type.) The topics file contains a list of topics, one per line. Each topic line contains one or more phrases separated by the vertical bar character (|). For example: Temple|Temple Mount|House of God|God's House|... Only the first phrase is required and specifies the string which will be used to expand the %%TOPIC%% variable. All the phrases match when scanning for a topic in the text. The result is that a variety of phrases are all tagged with the primary (first) phrase in the output. Phrases are case-insensitive. Special wildcard characters may be used: ? = matches any character * = matches any sequence of characters + = matches one or more of the previous character So for instance, to match "curse" "curseth" "cursed" and other similar variations, specify: curs* -v Verbose. List each address as it is tagged. -ver Display revision history and exit. -yes Don't ask for confirmation before tagging each file. Developed by: www.SpiritAndTruth.org contact@SpiritAndTruth.org bibletag ver. 1.34 address ver. 1.13 1.34 Modified address.py to raise an exception rather than throw an assertion when an error occurs. This makes it possible to catch the error and make sure it gets included in the log file showing the results of the conversion process. 1.33 Added support for -lbxpb flag to tag in a format suitable for the new Libronix 4 personal book tool (which supersedes the -lbxpbb flag which was previously used for the older personal book builder). 1.32 Fixed bug where addresses in a line ending with ' marker. 1.23 Added the -lbxc flag which generates an empty Libronix Personal Commentary. See documentation for -lbxc flag. 1.22 Fixed a problem where the '-tagbook' flag was not working 1.21 Added -tagvar and -topics flags. The -tagvar flag allows a custom tag to be defined which can include variables which refer to the matched book, chapter, verse, topic, etc. It provides maximum flexibility in marking up a text. The -topics flag allows the specification of topic strings for tagging. See the description of each flag for further information. 1.20 We now provide warnings when ignoring out-of-range chapter or verse numbers. Added -book flag (which see). 1.19 Added -lbxst+ and -lbxgospel+ flags (which see). 1.18 When the Libronix (-lbxpbb) flag is specified, Strong's number of the form H1234, h1234, G1234, g1234 are tagged with Libronix Strong's number links. 1.17 Fixed some minor tagging issues. Previous tags are now ignored by -lbxpbb flag so retagging of a previously tagged file is safe. 1.16 Added -lbxpbb flag to automatically generate bible tags in Libronix bible linke format (e.g., "Genesis 1:1" appears as "Genesis [[1:1|bible.1.1.1]]"). See www.logos.com 1.15 Added -plainlinks flag to support non-underlined URLs in HTML output. Links are only underlined on hover over. 1.14 Fixed address parsing in address.py to allow verse numbers to include 'a' 'b' 'c' or 'd' subscript. 1.13 Added -olivetree and -swordsearcher flags. 1.12 Fixed defect which allowed verses beyond the last valid verse number of a chapter to be misidentified as bible addresses. 1.11 Added ability to detect 'vs.' as a verse indicator. Now match book names which have an undetermined amount of whitespace between book number and name (e.g., "1 Corinthians"). 1.9 Fixed error in parsing verses within a single chapter separated by a comma (but without whitespace). 1.8 Added 'range' flag. Modified address format within tag to use plain format (e.g., "John 3:16") rather than semi-custom encoding (e.g., "John_C3V16"). 1.7 Fixed javascript error in code generated by 'tagjs' flag. 1.6 The code inserted for 'tagjs' now includes a URL to disable the separate bible column, if present. 1.4, 1.5 Fixed more minor address recognition problems where certain textual conditions caused addresses to be incorrectly recognized. 1.3 Added -tagjs flag for more efficient java-based tagging. 1.2 Revised address pattern matching code to recognize a wider variety of book number designators (1st, 2nd, 3rd, I, II, III, first, second, third) and to assume floating addresses following the words 'v.', 'vv.', 'verse[s]' are verses rather than chapter numbers. 1.1 When exact matching is operating, books prefixed with 'first', 'second', 'third', and 'I' through 'III' are not matched unless a -book is specified which contains those explicit strings. Added -history and -ver flags. 1.0 Initial version. ---------------------------------------------------- ADDRESS SCANNING HISTORY ---------------------------------------------------- 1.13 Raise an exception rather than throwing an assertion when an error occurs. This allows other programs which utilize this as a module to catch errors and redirect their information to another location, such as a log file. 1.12 Fixed parsing error where "John 3:18-19,36" returned two address ranges: "John 3:18-19" and "John 3:36-19". The latter range should be "John 3:36". Fixed parsing error where floating addresses with explicit colon where incorrectly taken as verses (rather than chapters) in some situations. Fixed parsing error where multiple verse references in a single-chapter book without an explicit chapter caused duplicate output (e.g., "Jude 12a, 14b;" resulted in "Jude 12a, 14b14b"). 1.11 Improved parsing of floating chapter numbers. 1.10 More flexible address scanning. Added support for generating e-Sword address format. 1.9 Fixed -lbxpbb flag with verse ranges. Previously Gen. 1:1-5 generated Gen. [[1:1-5|bible.1.1.1-5]] Now it generates Gen. [[1:1-5|bible.1.1.1-1.1.5]] Fixed a defect which caused lists of semicolon-separated chapters (without verses) to not get tagged. 1.8 Bible addresses which span a range of verses now include the entire range by default. (Previous versions represented the range by pointing to the first verse of the range.) Corrected a defect which mistook the abbreviation "Ac" for the book of Acts as possible subscripts on the preceding verse (e.g., Gen. 1:1a). 1.7 1. Added the option to ignore the alphabetical case of book names when searching for Bible addresses. 2. Fixed a bug in logging of out-of-range chapters or verses. 3. Added support for generating URLs to lookup addresses at www.StudyLight.org. 1.6 Fixed minor error in how verbose flag was used to pass file handle. 1.5 The verbose 'flag' can either be a boolean or a file handle in which case the file is used to log the verbose output (as well as being printed). 1.4 Improved information in "out of range" chapter and verse error messages. 1.3 Fixed defect where including the book name in the first chapter text led to subsequent chapters being tagged with the bookname. For instance, tagging John 3:16; 4:4 Resulted in two tagged address strings: [John 3:16]; [John 3:16; 4:4] 1.2 Fixed address tagging problem where text has an explicit verse designator (e.g., 'v.4'), but no chapter has been seen in the near context. 1.1 Fixed subtle tagging problems with addresses of the form which are a list of chapters without colons or verses, e.g., Revelation 7 and 9-13. Revelation 17, 18, and 19 1.0 Correctly tags assumed book, floating verses, ranges that are chapters without verses, connects 'and' to previous known verse for greater confidence of verses which follow 'and.'