# -*- coding: utf-8 -*- """constants.py - Miscellaneous constants.""" import re import os import operator from mcomix import tools APPNAME = 'MComix' VERSION = '1.2.1' HOME_DIR = tools.get_home_directory() CONFIG_DIR = tools.get_config_directory() DATA_DIR = tools.get_data_directory() BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) THUMBNAIL_PATH = os.path.join(HOME_DIR, '.thumbnails/normal') LIBRARY_DATABASE_PATH = os.path.join(DATA_DIR, 'library.db') LASTPAGE_DATABASE_PATH = os.path.join(DATA_DIR, 'lastreadpage.db') LIBRARY_COVERS_PATH = os.path.join(DATA_DIR, 'library_covers') PREFERENCE_PATH = os.path.join(CONFIG_DIR, 'preferences.conf') KEYBINDINGS_CONF_PATH = os.path.join(CONFIG_DIR, 'keybindings.conf') BOOKMARK_PICKLE_PATH = os.path.join(DATA_DIR, 'bookmarks.pickle') FILEINFO_PICKLE_PATH = os.path.join(DATA_DIR, 'file.pickle') # Transitional - used if json preferences are (were) absent. PREFERENCE_PICKLE_PATH = os.path.join(CONFIG_DIR, 'preferences.pickle') ZOOM_MODE_BEST, ZOOM_MODE_WIDTH, ZOOM_MODE_HEIGHT, ZOOM_MODE_MANUAL, ZOOM_MODE_SIZE = range( 5)
# -*- coding: utf-8 -*- """constants.py - Miscellaneous constants.""" import re import os import operator from mcomix import tools APPNAME = 'MComix' VERSION = '1.2.dev0' HOME_DIR = tools.get_home_directory() CONFIG_DIR = tools.get_config_directory() DATA_DIR = tools.get_data_directory() BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) THUMBNAIL_PATH = os.path.join(HOME_DIR, '.thumbnails/normal') LIBRARY_DATABASE_PATH = os.path.join(DATA_DIR, 'library.db') LASTPAGE_DATABASE_PATH = os.path.join(DATA_DIR, 'lastreadpage.db') LIBRARY_COVERS_PATH = os.path.join(DATA_DIR, 'library_covers') PREFERENCE_PATH = os.path.join(CONFIG_DIR, 'preferences.conf') KEYBINDINGS_CONF_PATH = os.path.join(CONFIG_DIR, 'keybindings.conf') BOOKMARK_PICKLE_PATH = os.path.join(DATA_DIR, 'bookmarks.pickle') FILEINFO_PICKLE_PATH = os.path.join(DATA_DIR, 'file.pickle') # Transitional - used if json preferences are (were) absent. PREFERENCE_PICKLE_PATH = os.path.join(CONFIG_DIR, 'preferences.pickle') ZOOM_MODE_BEST, ZOOM_MODE_WIDTH, ZOOM_MODE_HEIGHT, ZOOM_MODE_MANUAL, ZOOM_MODE_SIZE = range(5)