From 1fe04a29b2ca85f77dfa6a29d272dfa2615a73c9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 23 Oct 2013 16:04:44 +0900 Subject: [PATCH 1/3] change env var name --- aqt/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/main.py b/aqt/main.py index 425080987..46ff38327 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -896,7 +896,7 @@ Difference to correct time: %s.""") % diffText ", ".join([customRepr(x) for x in args])) lpath = re.sub("\.anki2$", ".log", self.pm.collectionPath()) open(lpath, "ab").write(buf.encode("utf8") + "\n") - if os.environ.get("LOG"): + if os.environ.get("ANKIDEV"): print buf # Schema modifications From 013f879d4e6a5cc503e3650edc97baaf7d818a0b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 23 Oct 2013 18:57:22 +0900 Subject: [PATCH 2/3] support cid: search --- anki/find.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/anki/find.py b/anki/find.py index a07dd304e..dd0d07c0d 100644 --- a/anki/find.py +++ b/anki/find.py @@ -23,6 +23,7 @@ class Finder(object): deck=self._findDeck, mid=self._findMid, nid=self._findNids, + cid=self._findCids, note=self._findModel, prop=self._findProp, rated=self._findRated, @@ -335,6 +336,11 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds return return "n.id in (%s)" % val + def _findCids(self, (val, args)): + if re.search("[^0-9,]", val): + return + return "c.id in (%s)" % val + def _findMid(self, (val, args)): if re.search("[^0-9]", val): return From 330e991d7dc9df627399dcd45ae8e5b5aa81c9b3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 23 Oct 2013 18:58:00 +0900 Subject: [PATCH 3/3] bump version --- anki/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/__init__.py b/anki/__init__.py index dab395b4d..a789cc53f 100644 --- a/anki/__init__.py +++ b/anki/__init__.py @@ -28,6 +28,6 @@ if arch[1] == "ELF": sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % ( sys.version_info[1], arch[0][0:2]))) -version="2.0.14" # build scripts grep this line, so preserve formatting +version="2.0.15" # build scripts grep this line, so preserve formatting from anki.storage import Collection __all__ = ["Collection"]