/usr/share/pyshared/quodlibet/const.py is in exfalso 3.0.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | # -*- coding: utf-8 -*-
# Constants used in various parts of QL, mostly strings.
import sys
import os
import locale
if os.name == "nt":
from win32com.shell import shellcon, shell
class Version(tuple):
"""Represent the version of a dependency as a tuple"""
def __new__(cls, *args):
# Support tuple or varargs instantiation
value = args[0] if len(args) == 1 else args
return tuple.__new__(Version, value)
def human_version(self):
return ".".join(map(str, self))
def __str__(self):
return self.human_version()
class MinVersions(object):
"""Dependency requirements for Quod Libet / Ex Falso"""
PYTHON = Version(2, 6)
MUTAGEN = Version(1, 14)
VERSION_TUPLE = Version(3, 0, 2)
VERSION = str(VERSION_TUPLE)
PROCESS_TITLE_QL = "quodlibet"
PROCESS_TITLE_EF = "exfalso"
# expanduser doesn't work with unicode on win...
if os.name == "nt":
# the last 0 means SHGFP_TYPE_CURRENT
HOME = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0)
else:
HOME = os.path.expanduser("~")
if 'QUODLIBET_USERDIR' in os.environ:
USERDIR = os.environ['QUODLIBET_USERDIR']
else:
if os.name == "nt":
USERDIR = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
USERDIR = os.path.join(USERDIR, "Quod Libet")
else:
USERDIR = os.path.join(HOME, ".quodlibet")
CONTROL = os.path.join(USERDIR, "control")
CONFIG = os.path.join(USERDIR, "config")
CURRENT = os.path.join(USERDIR, "current")
LIBRARY = os.path.join(USERDIR, "songs")
LOGDIR = os.path.join(USERDIR, "logs")
# Don't bother saving the library more often than this
LIBRARY_SAVE_PERIOD_SECONDS = 15 * 60
DEFAULT_RATING = 0.5
# entry point for the user guide / wiki
BRANCH_NAME = "quodlibet-3.0"
DOCS_BASE_URL = "https://quodlibet.readthedocs.org/en/%s"
DOCS_BASE_URL %= BRANCH_NAME if BRANCH_NAME != "default" else "latest"
ONLINE_HELP = DOCS_BASE_URL + "/guide/index.html"
SEARCH_HELP = DOCS_BASE_URL + "/guide/searching.html"
# about dialog, --version etc.
WEBSITE = "http://code.google.com/p/quodlibet"
COPYRIGHT = """\
Copyright © 2004-2013 Joe Wreschnig, Michael Urman, Iñigo Serna,
Steven Robertson, Christoph Reiter, Nick Boultbee, ..."""
# Email used as default for reading/saving per-user data in tags, etc.
EMAIL = os.environ.get("EMAIL", "quodlibet@lists.sacredchao.net")
# Displayed as registered / help email address
SUPPORT_EMAIL = "quod-libet-development@googlegroups.com"
BASEDIR = os.path.dirname(os.path.realpath(__file__))
IMAGEDIR = os.path.join(BASEDIR, "images")
AUTHORS = sorted("""\
Alexandre Passos
Alexey Bobyakov
Alex Geoffrey Smith
Anders Carlsson
Andreas Bombe
Anton Shestakov
Ari Pollak
Aymeric Mansoux
Bastian Kleineidam
Bastien Gorissen
Ben Zeigler
Carlo Teubner
Christine Spang
Christoph Reiter
David Kågedal
David Schneider
Decklin Foster
Eduardo Gonzalez
Erich Schubert
Federico Pelloni
Felix Krull
Florian Demmer
Guillaume Chazarain
Hans Scholze
Iñigo Serna
Jacob Lee
Jan Arne Petersen
Javier Kohen
Joe Higton
Joe Wreschnig
Johan Hovold
Johannes Marbach
Johannes Rohrer
Joschka Fischer
Josh Lee
Joshua Kwan
Lalo Martins
Lee Willis
Lukáš Lalinský
Markus Koller
Martijn Pieters
Martin Bergström
Michaël Ball
Michael Urman
Mickael Royer
Nicholas J. Michalek
Nick Boultbee
Niklas Janlert
Nikolai Prokoschenko
Philipp Müller
Philipp Weis
Remi Vanicat
Robert Muth
Steven Robertson
Tomasz Miasko
Tomasz Torcz
Tshepang Lekhonkhobe
Türerkan İnce
Vasiliy Faronov
Zack Weinberg
""".strip().split("\n"))
TRANSLATORS = sorted("""
Alexandre Passos (pt)
Andreas Bertheussen (nb)
Anton Shestakov (ru)
Bastian Kleineidam (de)
Bastien Gorissen (fr)
Byung-Hee HWANG (ko)
ChangBom Yoon (ko)
Daniel Nyberg (sv)
Dimitris Papageorgiou (el)
Djavan Fagundes (pt)
Einārs Sprūģis (lv)
Eirik Haatveit (nb)
Emfox Zhou (zh_CN)
Erik Christiansson (sv)
Fabien Devaux (fr)
Filippo Pappalardo (it)
Guillaume Ayoub (fr)
Hans van Dok (nl)
Honza Hejzl (cs_CZ)
Hsin-lin Cheng (zh_TW)
Jari Rahkonen (fi)
Javier Kohen (es)
Joe Wreschnig (en_CA)
Johám-Luís Miguéns Vila (es, gl, gl_ES, eu, pt)
Jonas Slivka (lt)
Joshua Kwan (fr)
Luca Baraldi (it)
Lukáš Lalinský (sk)
Mathieu Morey (fr)
Michal Nowikowski (pl)
Mugurel Tudor (ro)
Mykola Lynnyk (uk)
Naglis Jonaitis (lt)
Nick Boultbee (fr, en_GB)
Olivier Gambier (fr)
Piarres Beobide (eu)
Roee Haimovich (he)
Rüdiger Arp (de)
SZERVÁC Attila (hu)
Tomasz Torcz (pl)
Türerkan İnce (tr)
Witold Kieraś (pl)
Yasushi Iwata (ja)
Δημήτρης Παπαγεωργίου (el)
Андрей Федосеев (ru)
Микола 'Cthulhu' Линник (uk)
Николай Прокошенко (ru)
Ростислав "zbrox" Райков (bg)
Сергей Федосеев (ru)
""".strip().splitlines())
ARTISTS = sorted("""\
Tobias
Jakub Steiner
Fabien Devaux
""".strip().split("\n"))
# Default songlist column headers
DEFAULT_COLUMNS = "~#track ~people ~title~version ~album~discsubtitle " \
"~#length".split()
TBP = os.path.join(USERDIR, "lists", "tagpatterns")
TBP_EXAMPLES = """\
<tracknumber>. <title>
<tracknumber> - <title>
<tracknumber> - <artist> - <title>
<artist> - <album>/<tracknumber>. <title>
<artist>/<album>/<tracknumber> - <title>"""
NBP = os.path.join(USERDIR, "lists", "renamepatterns")
NBP_EXAMPLES = """\
<tracknumber>. <title>
<tracknumber|<tracknumber>. ><title>
<tracknumber> - <title>
<tracknumber> - <artist> - <title>
/path/<artist> - <album>/<tracknumber>. <title>
/path/<artist>/<album>/<tracknumber> - <title>"""
DEBUG = ("--debug" in sys.argv or "QUODLIBET_DEBUG" in os.environ)
MENU = """<ui>
<menubar name='Menu'>
<menu action='Music'>
<menuitem action='AddFolders'/>
<menuitem action='AddFiles'/>
<menuitem action='AddLocation'/>
<separator/>
<menu action='BrowseLibrary'>
%(browsers)s
</menu>
<separator/>
<menuitem action='Preferences'/>
<menuitem action='Plugins'/>
<separator/>
<menuitem action='RefreshLibrary'/>
<menuitem action='ReloadLibrary'/>
<separator/>
<menuitem action='Quit'/>
</menu>
<menu action='Filters'>
<menuitem action='FilterGenre'/>
<menuitem action='FilterArtist'/>
<menuitem action='FilterAlbum'/>
<separator/>
<menuitem action='RandomGenre'/>
<menuitem action='RandomArtist'/>
<menuitem action='RandomAlbum'/>
<separator/>
<menuitem action='PlayedRecently'/>
<menuitem action='AddedRecently'/>
<menuitem action='TopRated'/>
</menu>
<menu action='Control'>
<menuitem action='Previous'/>
<menuitem action='PlayPause'/>
<menuitem action='Next'/>
<separator/>
<menuitem action='EditTags'/>
<menuitem action='Information'/>
<separator/>
<menuitem action='Jump'/>
</menu>
<menu action='View'>
<menuitem action='SongList'/>
<menuitem action='Queue'/>
<separator/>
%(views)s
</menu>
<menu action='Help'>
<menuitem action='OnlineHelp'/>
<menuitem action='SearchHelp'/>
<menuitem action='About'/>
%(debug)s
</menu>
</menubar>
</ui>"""
try:
ENCODING = locale.getpreferredencoding()
except locale.Error:
ENCODING = "utf-8"
else:
# python on macports can return a bugs result (empty string)
try:
u"".encode(ENCODING)
except LookupError:
ENCODING = "utf-8"
# http://developer.gnome.org/doc/API/2.0/glib/glib-running.html
if "G_FILENAME_ENCODING" in os.environ:
FSCODING = os.environ["G_FILENAME_ENCODING"].split(",")[0]
if FSCODING == "@locale":
FSCODING = ENCODING
elif "G_BROKEN_FILENAMES" in os.environ:
FSCODING = ENCODING
else:
FSCODING = "utf-8"
del(os)
del(locale)
|