Commit graph

39 commits

Author SHA1 Message Date
Damien Elmes
267b7b0035 fix unit test 2012-09-10 23:53:00 +09:00
Damien Elmes
fa4f26e560 is:learn should match relearning cards too - filter on queue, not type 2012-09-03 03:20:12 +09:00
Damien Elmes
ce83001be6 treat 'not' as a normal search string 2012-06-20 09:37:56 +09:00
Damien Elmes
c27cc17762 findDupes() and findNotes() 2012-05-27 00:12:26 +09:00
Damien Elmes
1e5e574721 add search for added time 2012-05-26 14:50:45 +09:00
Damien Elmes
d25e2453a6 catch invalid grouping 2012-05-26 13:00:01 +09:00
Damien Elmes
17095ae1fb switch args in rated: search; make ease optional 2012-05-25 11:05:02 +09:00
Damien Elmes
942beef5de allow != in properties 2012-05-23 23:07:23 +09:00
Damien Elmes
b63ac7e80d turn off not after application 2012-05-23 20:54:03 +09:00
Damien Elmes
6af7f6e846 improved finding
- new per-character tokenizer that is easier to read and maintain
- OR searches now supported
- grouping with ( and ) now supported
- sorting is off by default now
- searching in html is disabled for now, but may come back later
- use ? arguments instead of named arguments to ease porting to other
  platforms
- field:foo is no longer wrapped in implicit wildcards
- avoid joining notes table if it not required - about 30% faster
- fixed sql injection bug in findNids()
- commands no longer have to take care of negation themselves
- commands can return nothing to immediately flag the query as invalid
2012-05-23 20:21:47 +09:00
Damien Elmes
ef4ff86f8c support searches for particular ratings 2012-05-23 14:39:30 +09:00
Damien Elmes
3755a8f82d support matches on card properties 2012-05-23 14:18:44 +09:00
Damien Elmes
28b5a108f6 wildcard deck searches 2012-05-21 11:45:24 +09:00
Damien Elmes
5b97c3f20f don't throw error when update causes empty cards; fix unit test 2012-04-24 10:03:34 +09:00
Damien Elmes
2f75e99671 ntype -> note 2012-04-07 13:53:55 +09:00
Damien Elmes
7d8c0d96b5 fix unit tests 2012-04-06 12:50:46 +09:00
Damien Elmes
95106908dd check sort field when searching
If the field they want to search is the one being used to sort, this saves us
having to go the full search route
2011-12-08 09:53:27 +09:00
Damien Elmes
cca3b5cba6 scm ts should be ms too, fix unit tests 2011-12-04 17:52:01 +09:00
Damien Elmes
8c1266ab2a less terse card state searches 2011-11-28 20:18:16 +09:00
Damien Elmes
f7790275ce groups -> decks 2011-11-23 19:28:09 +09:00
Damien Elmes
6e4e8249fb facts -> notes 2011-11-23 12:37:21 +09:00
Damien Elmes
795cdd7d3f remove the concept of non-active templates
The old template handling was too complicated, and generated frequent
questions on the forums. By dropping non-active templates we can do away with
the generate cards function, and advanced users can simulate the old behaviour
by using conditional field templates.
2011-11-08 18:06:19 +09:00
Damien Elmes
be5c5a2018 move tags into deck; code into separate file
- moved tags into json like previous changes, and dropped the unnecessary id
- added tags.py for a tag manager
- moved the tag utilities from utils into tags.py
2011-08-28 13:44:29 +09:00
Damien Elmes
d3a3edb707 move models into the deck table
Like the previous change, models have been moved from a separate DB table to
an entry in the deck. We need them for many operations including reviewing,
and it's easier to keep them in memory than half on disk with a cache that
gets cleared every time we .reset(). This means they are easily serialized as
well - previously they were part Python and part JSON, which made access
confusing.

Because the data is all pulled from JSON now, the instance methods have been
moved to the model registry. Eg:
  model.addField(...) -> deck.models.addField(model, ...).

- IDs are now timestamped as with groups et al.

- The data field for plugins was also removed. Config info can be added to
  deck.conf; larger data should be stored externally.

- Upgrading needs to be updated for the new model structure.

- HexifyID() now accepts strings as well, as our IDs get converted to strings
  in the serialization process.
2011-08-27 22:27:09 +09:00
Damien Elmes
47be8b0546 use the timestamps instead of forcing id on fact/card creation
- we ditch nextCid/nextFid as we don't need incrementing ids anymore
- we add nextPos so we can maintain a user-friendly position number
2011-08-27 00:36:39 +09:00
Damien Elmes
a65f241258 gracefully handle invalid queries 2011-04-29 11:46:26 +09:00
Damien Elmes
2243b691cc add full search to ignore formatting 2011-04-28 09:24:03 +09:00
Damien Elmes
d51cd5a433 find & replace 2011-04-28 09:24:03 +09:00
Damien Elmes
8c1c729544 fix card state negation 2011-04-28 09:24:02 +09:00
Damien Elmes
2a225b1fae use the sort property set in the deck 2011-04-28 09:24:02 +09:00
Damien Elmes
d089deae5a add the ability to reverse sort order 2011-04-28 09:24:02 +09:00
Damien Elmes
d6116a5377 model and group searching 2011-04-28 09:24:02 +09:00
Damien Elmes
efe6177c7a refactor ordering 2011-04-28 09:24:02 +09:00
Damien Elmes
291bd399b7 field searching
dropped support for field:foo, as you can type 'foo:' instead to accomplish
the same thing
2011-04-28 09:24:01 +09:00
Damien Elmes
57938927e7 users can pass a number for template ordinal; makes show:one obsolete 2011-04-28 09:24:01 +09:00
Damien Elmes
94d4e319ae fids and template searches 2011-04-28 09:24:01 +09:00
Damien Elmes
96f36e66f7 parse tags when creating fact, add selective study, fix emptyAns default 2011-04-28 09:23:55 +09:00
Damien Elmes
e728d49232 delete -> del for consistency 2011-04-28 09:23:55 +09:00
Damien Elmes
668a58b65a update unit tests for sqlalchemy drop 2011-04-28 09:23:53 +09:00