def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the BibleOrganisationalSystems objects
     self.BOS = BibleOrganisationalSystems.BibleOrganisationalSystem("RSV")
 def setUp( self ):
     parser = BibleOrgSysGlobals.setup( PROGRAM_NAME, PROGRAM_VERSION, LAST_MODIFIED_DATE )
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create a BibleBookOrderSystem object
     self.systemName = "EuropeanBible"
     self.bbos = BibleBookOrders.BibleBookOrderSystem( self.systemName ) # Doesn't reload the XML unnecessarily :)
 def setUp( self ):
     parser = BibleOrgSysGlobals.setup( PROGRAM_NAME, PROGRAM_VERSION, LAST_MODIFIED_DATE )
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create a BibleOrganisationalSystem object
     self.systemName = 'KJV-1638'
     self.bos = BibleOrganisationalSystems.BibleOrganisationalSystem( self.systemName ) # Doesn't reload the XML unnecessarily :)
Example #4
0
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the USFM2MarkersConverter object
     self.UMc = USFM2MarkersConverter.USFM2MarkersConverter(
     ).loadAndValidate()  # Doesn't reload the XML unnecessarily :)
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the ISO_639_3_Languages object
     self.isoLgs = ISO_639_3_Languages.ISO_639_3_Languages().loadData(
     )  # Doesn't reload the XML unnecessarily :)
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the BiblePunctuationSystemsConverter object
     self.bpssc = BiblePunctuationSystemsConverter.BiblePunctuationSystemsConverter(
     ).loadSystems()  # Doesn't reload the XML unnecessarily :)
Example #7
0
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the BibleBooksNamesSystems object
     self.bbnss = BibleBooksNames.BibleBooksNamesSystems().loadData(
     )  # Doesn't reload the XML unnecessarily :)
Example #8
0
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create the BibleVersificationSystems object
     self.bvss = BibleVersificationSystems.BibleVersificationSystems(
     ).loadData(
         os.path.join(sourceFolder, "DataFiles/VersificationSystems/")
     )  # Doesn't reload the XML unnecessarily :)
Example #9
0
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     testFolder = 'Tests/DataFilesForTests/USFMTest1/'  # This is a RELATIVE path
     if os.access(testFolder, os.R_OK):  # Create the USFMFilenames object
         self.UFns = USFMFilenames.USFMFilenames(testFolder)
     else:
         vPrint(
             'Quiet', debuggingThisModule,
             f"Sorry, test folder '{testFolder}' doesn't exist on this computer."
         )
Example #10
0
 def setUp(self):
     parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION,
                                       LAST_MODIFIED_DATE)
     # BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )
     BibleOrgSysGlobals.preloadCommonData()
     # Create a BibleBooksNamesSystem object
     self.systemName = "eng_traditional"
     sampleBookList = [
         'GEN', 'EXO', 'LEV', 'NUM', 'DEU', 'JOS', 'JDG', 'SA1', 'SA2',
         'KI1', 'KI2', 'ZEC', 'MAL'
     ]
     self.bbns = BibleBooksNames.BibleBooksNamesSystem(
         self.systemName,
         sampleBookList)  # Doesn't reload the XML unnecessarily :)
Example #11
0
def run() -> None:
    """
    """
    from multiprocessing import freeze_support
    freeze_support()  # Multiprocessing support for frozen Windows executables

    # Configure basic Bible Organisational System (BOS) set-up
    parser = BibleOrgSysGlobals.setup(SHORT_PROGRAM_NAME, PROGRAM_VERSION,
                                      LAST_MODIFIED_DATE)
    parser.add_argument("inputBibleFileOrFolder",
                        help="path/to/BibleFileOrFolder")
    BibleOrgSysGlobals.addStandardOptionsAndProcess(parser)

    main()

    # Do the BOS close-down stuff
    BibleOrgSysGlobals.closedown(PROGRAM_NAME, PROGRAM_VERSION)
Example #12
0
def run():
    # Configure basic Bible Organisational System (BOS) set-up
    parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION)
    parser.add_argument("inputBibleFileOrFolder",
                        help="path/to/BibleFileOrFolder")
    BibleOrgSysGlobals.addStandardOptionsAndProcess(parser)

    # Search for a Bible and attempt to load it
    unknownBible = UnknownBible(
        BibleOrgSysGlobals.commandLineArguments.inputBibleFileOrFolder)
    loadedBible = unknownBible.search(
        autoLoadAlways=True,
        autoLoadBooks=True)  # Load all the books if we find any

    # See if we were successful at loading one (and only one), and if so, do the export
    if isinstance(loadedBible, Bible):  # i.e., not an error message
        loadedBible.toUSXXML()  # Export as USX files (USFM inside XML)
        vPrint(
            'Quiet', False,
            f"\nOutput should be in {BibleOrgSysGlobals.DEFAULT_WRITEABLE_OUTPUT_FOLDERPATH.joinpath( 'BOS_USX2_Export/' )}/ folder."
        )

    # Do the BOS close-down stuff
    BibleOrgSysGlobals.closedown(PROGRAM_NAME, PROGRAM_VERSION)
Example #13
0
                results = pool.map(testUB,
                                   parameters)  # have the pool do our loads
                assert len(results) == len(
                    parameters
                )  # Results (all None) are actually irrelevant to us here
            BibleOrgSysGlobals.alreadyMultiprocessing = False
        else:  # Just single threaded
            for j, someFolder in enumerate(sorted(foundFolders)):
                vPrint('Normal', debuggingThisModule,
                       "\nUnbound D{}/ Trying {}".format(j + 1, someFolder))
                #myTestFolder = os.path.join( testFolder, someFolder+'/' )
                testUB(someFolder)


# end of UnboundBible.fullDemo

if __name__ == '__main__':
    multiprocessing.freeze_support(
    )  # Multiprocessing support for frozen Windows executables

    # Configure basic set-up
    parser = BibleOrgSysGlobals.setup(SHORT_PROGRAM_NAME, PROGRAM_VERSION,
                                      LAST_MODIFIED_DATE)
    BibleOrgSysGlobals.addStandardOptionsAndProcess(parser,
                                                    exportAvailable=True)

    fullDemo()

    BibleOrgSysGlobals.closedown(PROGRAM_NAME, PROGRAM_VERSION)
# end of UnboundBible.py
Example #14
0
                if division in ('Same','Different') and BibleOrgSysGlobals.verbosityLevel < 3 \
                and not BibleOrgSysGlobals.debugFlag:
                    continue
                vPrint('Quiet', debuggingThisModule,
                       "  {} results are:".format(division))
                for field, fResult in dResults.items():
                    vPrint('Quiet', debuggingThisModule,
                           "    {}: {}".format(field, fResult))


# end of USFMBookCompare.main

if __name__ == '__main__':
    multiprocessing.freeze_support(
    )  # Multiprocessing support for frozen Windows executables

    demoFlag = False  # Set to true to run the demo instead of main()

    # Configure basic Bible Organisational System (BOS) set-up
    parser = BibleOrgSysGlobals.setup(PROGRAM_NAME, PROGRAM_VERSION)
    if not demoFlag:
        parser.add_argument('file1', help="USFM Bible book file 1")
        parser.add_argument('file2', help="USFM Bible book file 2")
    BibleOrgSysGlobals.addStandardOptionsAndProcess(parser)

    if demoFlag: demo()
    else: main()

    BibleOrgSysGlobals.closedown(PROGRAM_NAME, PROGRAM_VERSION)
# end of USFMBookCompare.py