mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
Merge branch 'master' of https://github.com/dae/anki
This commit is contained in:
commit
5be945ec05
3 changed files with 8 additions and 2 deletions
|
@ -28,6 +28,6 @@ if arch[1] == "ELF":
|
||||||
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
||||||
sys.version_info[1], arch[0][0:2])))
|
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
|
from anki.storage import Collection
|
||||||
__all__ = ["Collection"]
|
__all__ = ["Collection"]
|
||||||
|
|
|
@ -23,6 +23,7 @@ class Finder(object):
|
||||||
deck=self._findDeck,
|
deck=self._findDeck,
|
||||||
mid=self._findMid,
|
mid=self._findMid,
|
||||||
nid=self._findNids,
|
nid=self._findNids,
|
||||||
|
cid=self._findCids,
|
||||||
note=self._findModel,
|
note=self._findModel,
|
||||||
prop=self._findProp,
|
prop=self._findProp,
|
||||||
rated=self._findRated,
|
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
|
||||||
return "n.id in (%s)" % val
|
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)):
|
def _findMid(self, (val, args)):
|
||||||
if re.search("[^0-9]", val):
|
if re.search("[^0-9]", val):
|
||||||
return
|
return
|
||||||
|
|
|
@ -896,7 +896,7 @@ Difference to correct time: %s.""") % diffText
|
||||||
", ".join([customRepr(x) for x in args]))
|
", ".join([customRepr(x) for x in args]))
|
||||||
lpath = re.sub("\.anki2$", ".log", self.pm.collectionPath())
|
lpath = re.sub("\.anki2$", ".log", self.pm.collectionPath())
|
||||||
open(lpath, "ab").write(buf.encode("utf8") + "\n")
|
open(lpath, "ab").write(buf.encode("utf8") + "\n")
|
||||||
if os.environ.get("LOG"):
|
if os.environ.get("ANKIDEV"):
|
||||||
print buf
|
print buf
|
||||||
|
|
||||||
# Schema modifications
|
# Schema modifications
|
||||||
|
|
Loading…
Reference in a new issue