def getParsingFailuresDir(): result = os.path.join(multiUserSupport.getServerStorageDir(), "parsing-failures") return result
# * if we don't have an exact match but ispell returns a list of alternatives # we return ('D', Definition) saying something along the lines: "Didn't find # definition of '$word'. Did you mean $word1, $word2, $word3... ?" where $word1, # $word2 etc. are ispell suggestions (but only if we have their definition in # g_wnWordIndex # * definition also contains a list of N nearby words at the bottom, which we # calculate from g_wnWords # * if we have link(s) to *.wav files with sound recording of this word, then # we add them to UDF as ('S', links). This allows us to play the audio of the # word. We get those audio files by spidering other dictionaries like encarta # or m-w.com. Currently we don't implement this but client shouldn't break # if this data is sent. DICT_DIR = "dict" g_wnDictPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-dict.txt") g_wnIndexPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-words-index.pic") g_wnWordsPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-words.pic") g_wnLupyIndexPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-index-lupy") g_wnLupyIndexedCount = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-index-lupy-count.txt") g_fWnLupyIndexExamples = False TH_DICT_FILE = "th-dict.txt" TH_INDEX_FILE = "th-words-index.pic" TH_WORDS_FILE = "th-words.pic"
# * if we don't have an exact match but ispell returns a list of alternatives # we return ('D', Definition) saying something along the lines: "Didn't find # definition of '$word'. Did you mean $word1, $word2, $word3... ?" where $word1, # $word2 etc. are ispell suggestions (but only if we have their definition in # g_wnWordIndex # * definition also contains a list of N nearby words at the bottom, which we # calculate from g_wnWords # * if we have link(s) to *.wav files with sound recording of this word, then # we add them to UDF as ('S', links). This allows us to play the audio of the # word. We get those audio files by spidering other dictionaries like encarta # or m-w.com. Currently we don't implement this but client shouldn't break # if this data is sent. DICT_DIR = "dict" g_wnDictPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-dict.txt") g_wnIndexPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-words-index.pic") g_wnWordsPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-words.pic") g_wnLupyIndexPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-index-lupy") g_wnLupyIndexedCount = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, "wn-index-lupy-count.txt") g_fWnLupyIndexExamples = False TH_DICT_FILE = "th-dict.txt" TH_INDEX_FILE = "th-words-index.pic" TH_WORDS_FILE = "th-words.pic" g_thDictPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, TH_DICT_FILE) g_thIndexPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, TH_INDEX_FILE) g_thWordsPath = os.path.join(multiUserSupport.getServerStorageDir(), DICT_DIR, TH_WORDS_FILE)
BROWSE_TYPES = [ BROWSE_AUTHOR, BROWSE_TITLE ] g_author_exceptions = [ "various authors", ] g_title_prefixes = [ "the", "a", "an", ] g_storage = os.path.join(multiUserSupport.getServerStorageDir(), "ebooks") _g_index_path = os.path.join(g_storage, "index") _g_new_index_path = os.path.join(g_storage, "index-new") _g_database = os.path.join(g_storage, "database") _g_new_database = os.path.join(g_storage, "database-new") _g_version_path = os.path.join(g_storage, "version.txt") _g_id_mappings_file_name = "id-mappings.dat" _g_spiders = [ "spider_manybooks", ] _g_spider_modules = None