update readme, add shortcut() for later

This commit is contained in:
Damien Elmes 2011-03-29 22:45:53 +09:00
parent eadd5abf1a
commit db0d7f45b2
3 changed files with 8 additions and 6 deletions

7
README
View file

@ -4,16 +4,11 @@ Anki
Prerequisites for Linux/FreeBSD/etc: Prerequisites for Linux/FreeBSD/etc:
- Python 2.4+ - Python 2.4+
- Python-Qt/PyQt 4.4+ - Python-Qt/PyQt 4.5+
- SimpleJSON 1.7.3+ - SimpleJSON 1.7.3+
- PySQLite 1.3+ or Python2.5 - PySQLite 1.3+ or Python2.5
- Beautiful Soup - Beautiful Soup
For graph generation:
- python-numpy (numpy)
- python-matplotlib (matplotlib)
For audio playing support: For audio playing support:
- mplayer - mplayer

View file

@ -15,6 +15,8 @@ from aqt.utils import mungeQA, saveGeom, restoreGeom
from anki.hooks import addHook, removeHook, runHook, runFilter from anki.hooks import addHook, removeHook, runHook, runFilter
from sqlalchemy.exceptions import InvalidRequestError from sqlalchemy.exceptions import InvalidRequestError
# fixme: use shortcut() for mac shortcuts
clozeColour = "#0000ff" clozeColour = "#0000ff"
if sys.platform.startswith("win32"): if sys.platform.startswith("win32"):

View file

@ -289,3 +289,8 @@ def openFolder(path):
call(["explorer", path], wait=False) call(["explorer", path], wait=False)
else: else:
QDesktopServices.openUrl(QUrl("file://" + path)) QDesktopServices.openUrl(QUrl("file://" + path))
def shortcut(key):
if sys.platform == "darwin":
return re.sub("(?i)ctrl", "Command", key)
return key