Commit graph

33 commits

Author SHA1 Message Date
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
30f19c07be find comparisons needs to be normalized
this data should probably be normalized when it's originally
added to the collection

https://anki.tenderapp.com/discussions/ankidesktop/31409-cant-search-by-deck-when-searching-decks-containing-arabic-text
2018-12-13 20:36:04 +10:00
Alexey Lebedeff
292764a40a Make quotes consistent with surroundings 2018-12-01 10:52:19 +01:00
Alexey Lebedeff
3d69aa9ce4 Fix searching for python 3.7
3.7 introduced a change to `re.escape()`, which no longer escapes
`%`. By using `re.escape("%")` instead of a literal, we can detect
a proper form at runtime.
2018-11-30 10:44:39 +01:00
Damien Elmes
5bce218312 limit find&replace fields to selected notes 2018-11-27 16:42:00 +10:00
Damien Elmes
ea9d2e2d64 find&replace should not be case sensitive on field 2018-11-27 16:34:48 +10:00
Damien Elmes
01942cd076 fix is:buried in v2 scheduler 2018-02-02 16:17:26 +10:00
Damien Elmes
4dce1befa5 re.escape leaves _ alone in python 3 2018-01-27 15:15:07 +10:00
Damien Elmes
bdcc8e284b re.escape() deck search 2017-09-08 15:13:46 +10:00
Damien Elmes
71101d041a ditch marked tag in favour of card flags
Users can now mark individual cards with one of four different coloured
flags, instead of relying on a tag that applied to the whole note.

- replaced marking functionality in reviewer and browser with new
flag options
- added flag:x search
- marked and leech tags now show in normal tag list in filter screen,
instead of being treated specially
- the other clients will need updating to set and shown the flags, but
flags set in the beta should be preserved by the other clients
2017-08-12 16:08:10 +10:00
luoliyan
491b8ea63f Allow special characters to be escaped 2017-02-28 08:10:43 +09:30
Illia Volochii
13b7e01044 Stop inheriting from object
It is not needed in Python 3.
2017-02-07 00:21:33 +02:00
Damien Elmes
2fc47773b6 show error on invalid search 2017-02-02 21:00:58 +10:00
Damien Elmes
15b349e3a8 start port to python 3
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Avi Puchalapalli
2f74908b25 Update Field Searches to match multi-line fields
Currently, field searches are confirmed by a regex search with the single option of case-insensitive (?i), and with the beginning and ending markers ^ and $. Since multi-line is not enabled, and re.DOTALL (option s) is not enabled, the field search will fail for any field with a new line
2015-09-25 11:13:42 -04:00
Paul Hartmann
6877cb0393 add support for ideographic space in card search browser 2014-07-03 18:44:35 +02:00
Damien Elmes
013f879d4e support cid:<card id> search 2013-10-23 18:57:22 +09:00
Damien Elmes
cf51f33c66 add separate is:buried and use with filtered deck 2013-10-22 14:20:31 +09:00
Damien Elmes
b55761190f option to tag notes in find dupes function 2013-10-04 00:07:11 +09:00
Damien Elmes
4d42282b7b strip html in duplicate check (#906) 2013-09-20 17:25:24 +09:00
Damien Elmes
afde11671e rework sibling handling and change bury semantics
First, burying changes:

- unburying now happens on day rollover, or when manually unburying from
  overview screen

- burying is not performed when returning to deck list, or when closing
  collection, so burying now must mark cards as modified to ensure sync
  consistent

- because they're no longer temporary to a session, make sure we exclude them
  in filtered decks in -is:suspended

Sibling spacing changes:

- core behaviour now based on automatically burying related cards when we
  answer a card

- applies to reviews, optionally to new cards, and never to cards in the
  learning queue (partly because we can't suspend/bury cards in that queue at
  the moment)

- this means spacing works consistently in filtered decks now, works on
  reviews even when user is late to review, and provides better separation of
  new cards

- if burying new cards disabled, we just discard them from the current queue.
  an option to set due=ord*space+due would be nicer, but would require
  changing a lot of code and is more appropriate for a future major version
  change. discarding from queue suffers from the same issue as the new card
  cycling in that queue rebuilds may cause cards to be shown close together,
  so the default burying behaviour is preferable

- refer to them as 'related cards' rather than 'siblings'

These changes don't require any changes to the database format, so they
should hopefully coexist with older clients without issue.
2013-08-10 15:56:26 +09:00
Damien Elmes
26a3c30365 escape + in deck names 2013-07-18 18:44:40 +09:00
Damien Elmes
4d2101cf89 dupes->dupe (fix dupe search) 2013-06-06 07:40:18 +09:00
Damien Elmes
5db00d5815 fix find dupes when fieldname case differs 2013-06-01 10:49:33 +09:00
Damien Elmes
ce1199e9cb Merge branch 'addhook-search' of git://github.com/valgaav/anki into findhook
Conflicts:
	anki/find.py
2013-05-22 12:34:21 +09:00
Damien Elmes
3f6266a712 fix duplicate search in browser (#855) 2013-05-16 14:17:28 +09:00
Damien Elmes
b571a4caa8 failure to find a field should not break entire query
https://anki.tenderapp.com/discussions/ankidesktop/656-unexpected-results-on-search-with-boolean-or-operator
2013-04-22 22:13:29 +09:00
Pauline Gomér
fc612a71d3 moved loading of plugins to initialization 2013-02-16 13:23:51 +01:00
Jon-Erik 'TorrentKatten' Johnzon
b07254cb09 added search-hook for plugins using "search" scope 2013-02-15 19:45:40 +01:00
Pauline Gomér
ff82aad50f refactor the large if-elif-else used for searching 2013-02-15 19:45:40 +01:00
Damien Elmes
120c1d4136 match a single note type in browser even if duplicate names 2013-01-15 06:15:27 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00