|
pycrossword
0.3
Pure-Python implementation of a crossword puzzle generator and editor
|
Functions | |
| def | make_abspath (filename, root='') |
| def | readSettings (settings_file=None, write_defaults_on_error=True) |
| def | switch_lang (lang='') |
Variables | |
| bool | DEBUGGING = False |
| toggle debug messages More... | |
| string | APP_VERSION = '0.3' |
| current app version More... | |
| string | APP_NAME = 'pycrossword' |
| app name More... | |
| string | GIT_REPO = 'https://github.com/S0mbre/crossword.git' |
| string | APP_AUTHOR = 'Iskander Shafikov (S0mbre)' |
| string | APP_EMAIL = 's00mbre@gmail.com' |
| string | ENCODING = 'utf-8' |
| def | SETTINGS_FILE = make_abspath('settings.pxjson') |
| def | DEFAULT_SETTINGS_FILE = make_abspath('defsettings.pxjson') |
| def | UPDATE_FILE = make_abspath('update.json') |
| def | SAVEDCW_FILE = make_abspath('autosaved.xpf') |
| def | DICFOLDER = make_abspath('assets/dic') |
| def | ICONFOLDER = make_abspath('assets/icons') |
| def | PLUGINS_FOLDER = make_abspath('plugins') |
| dictionary | LANG = {'en': 'English', 'ru': 'Russian', 'fr': 'French', 'es': 'Spanish', 'de': 'German', 'it': 'Italian'} |
| list | POS |
| string | BRACES = "{}" |
| dictionary | SQL_TABLES |
| HTTP_PROXIES = None | |
| int | HTTP_TIMEOUT = 5 |
| int | MAX_RESULTS = 500 |
| string | PLUGIN_EXTENSION = 'pxplugin' |
| string | PLUGIN_TEMPLATE_GENERAL |
| list | APP_LANGUAGES |
| string | NEWLINE = '\n' |
| ENCODINGS = \ | |
| dictionary | FONT_WEIGHTS = {100: 0, 200: 12, 300: 25, 400: 50, 500: 57, 600: 63, 700: 75, 800: 81, 900: 87} |
| string | LINUX_APP_PATH = '~/.local/share/applications/{}.desktop'.format(APP_NAME.lower()) |
| LINUX_MIME_APP = \ | |
| LINUX_MIME_TYPES = \ | |
| string | LINUX_MIME_XML = f'~/.local/share/applications/{APP_NAME.lower()}-{APP_NAME.lower()}.xml' |
| string | MW_DIC_KEY = '71ae1f74-7edb-4683-be03-8e3d7348660d' |
| string | MW_DIC_HTTP = 'https://www.dictionaryapi.com/api/v3/references/collegiate/json/{}?key={}' |
| int | MW_DAILY_REQ = 1000 |
| string | MW_WORD_URL = 'https://www.merriam-webster.com/dictionary/{}' |
| string | YAN_DICT_KEY = 'dict.1.1.20191120T032741Z.d541dffb1a55247b.b090f62ccd320c7e33f8d88eefde8c8e1ea0ba5b' |
| string | YAN_DICT_HTTP = 'https://dictionary.yandex.net/api/v1/dicservice.json/lookup?key={}&text={}&lang={}&ui=en' |
| int | YAN_DAILY_REQ = 10000 |
| string | GOOGLE_KEY = 'AIzaSyAcc_B34Mv7Z4UoVuAMYCEiA9n14_SuEjU' |
| string | GOOGLE_CSE = '012413034625838642915:je3epsydo2r' |
| string | GOOGLE_HTTP = 'https://www.googleapis.com/customsearch/v1?key={}&cx={}&prettyPrint=true&q={}' |
| int | GOOGLE_DAILY_REQ = 100 |
| dictionary | GOOGLE_LANG_LR |
| dictionary | GOOGLE_LANG_HL |
| dictionary | GOOGLE_COUNTRIES_CR |
| dictionary | GOOGLE_COUNTRIES_GL |
| bool | LANGAPPLIED = False |
| def pycross.utils.globalvars.make_abspath | ( | filename, | |
root = '' |
|||
| ) |
| def pycross.utils.globalvars.readSettings | ( | settings_file = None, |
|
write_defaults_on_error = True |
|||
| ) |
Checks if 'settings.pxjson' exists in the main directory. If not, creates it with the default settings; otherwise, reads 'settings.pxjson' to the global CWSettings.settings object.
| def pycross.utils.globalvars.switch_lang | ( | lang = '' | ) |
| string pycross.utils.globalvars.APP_AUTHOR = 'Iskander Shafikov (S0mbre)' |
| string pycross.utils.globalvars.APP_EMAIL = 's00mbre@gmail.com' |
| list pycross.utils.globalvars.APP_LANGUAGES |
| string pycross.utils.globalvars.APP_NAME = 'pycrossword' |
app name
| string pycross.utils.globalvars.APP_VERSION = '0.3' |
current app version
| string pycross.utils.globalvars.BRACES = "{}" |
| bool pycross.utils.globalvars.DEBUGGING = False |
toggle debug messages
| def pycross.utils.globalvars.DEFAULT_SETTINGS_FILE = make_abspath('defsettings.pxjson') |
| def pycross.utils.globalvars.DICFOLDER = make_abspath('assets/dic') |
| string pycross.utils.globalvars.ENCODING = 'utf-8' |
| pycross.utils.globalvars.ENCODINGS = \ |
| dictionary pycross.utils.globalvars.FONT_WEIGHTS = {100: 0, 200: 12, 300: 25, 400: 50, 500: 57, 600: 63, 700: 75, 800: 81, 900: 87} |
| string pycross.utils.globalvars.GIT_REPO = 'https://github.com/S0mbre/crossword.git' |
| dictionary pycross.utils.globalvars.GOOGLE_COUNTRIES_CR |
| dictionary pycross.utils.globalvars.GOOGLE_COUNTRIES_GL |
| string pycross.utils.globalvars.GOOGLE_CSE = '012413034625838642915:je3epsydo2r' |
| int pycross.utils.globalvars.GOOGLE_DAILY_REQ = 100 |
| string pycross.utils.globalvars.GOOGLE_HTTP = 'https://www.googleapis.com/customsearch/v1?key={}&cx={}&prettyPrint=true&q={}' |
| string pycross.utils.globalvars.GOOGLE_KEY = 'AIzaSyAcc_B34Mv7Z4UoVuAMYCEiA9n14_SuEjU' |
| dictionary pycross.utils.globalvars.GOOGLE_LANG_HL |
| dictionary pycross.utils.globalvars.GOOGLE_LANG_LR |
| pycross.utils.globalvars.HTTP_PROXIES = None |
| int pycross.utils.globalvars.HTTP_TIMEOUT = 5 |
| def pycross.utils.globalvars.ICONFOLDER = make_abspath('assets/icons') |
| dictionary pycross.utils.globalvars.LANG = {'en': 'English', 'ru': 'Russian', 'fr': 'French', 'es': 'Spanish', 'de': 'German', 'it': 'Italian'} |
| bool pycross.utils.globalvars.LANGAPPLIED = False |
| string pycross.utils.globalvars.LINUX_APP_PATH = '~/.local/share/applications/{}.desktop'.format(APP_NAME.lower()) |
| pycross.utils.globalvars.LINUX_MIME_APP = \ |
| pycross.utils.globalvars.LINUX_MIME_TYPES = \ |
| string pycross.utils.globalvars.LINUX_MIME_XML = f'~/.local/share/applications/{APP_NAME.lower()}-{APP_NAME.lower()}.xml' |
| int pycross.utils.globalvars.MAX_RESULTS = 500 |
| int pycross.utils.globalvars.MW_DAILY_REQ = 1000 |
| string pycross.utils.globalvars.MW_DIC_HTTP = 'https://www.dictionaryapi.com/api/v3/references/collegiate/json/{}?key={}' |
| string pycross.utils.globalvars.MW_DIC_KEY = '71ae1f74-7edb-4683-be03-8e3d7348660d' |
| string pycross.utils.globalvars.MW_WORD_URL = 'https://www.merriam-webster.com/dictionary/{}' |
| string pycross.utils.globalvars.NEWLINE = '\n' |
| string pycross.utils.globalvars.PLUGIN_EXTENSION = 'pxplugin' |
| string pycross.utils.globalvars.PLUGIN_TEMPLATE_GENERAL |
| def pycross.utils.globalvars.PLUGINS_FOLDER = make_abspath('plugins') |
| list pycross.utils.globalvars.POS |
| def pycross.utils.globalvars.SAVEDCW_FILE = make_abspath('autosaved.xpf') |
| def pycross.utils.globalvars.SETTINGS_FILE = make_abspath('settings.pxjson') |
| dictionary pycross.utils.globalvars.SQL_TABLES |
| def pycross.utils.globalvars.UPDATE_FILE = make_abspath('update.json') |
| int pycross.utils.globalvars.YAN_DAILY_REQ = 10000 |
| string pycross.utils.globalvars.YAN_DICT_HTTP = 'https://dictionary.yandex.net/api/v1/dicservice.json/lookup?key={}&text={}&lang={}&ui=en' |
| string pycross.utils.globalvars.YAN_DICT_KEY = 'dict.1.1.20191120T032741Z.d541dffb1a55247b.b090f62ccd320c7e33f8d88eefde8c8e1ea0ba5b' |
1.8.17