Commit Graph

9 Commits

Author SHA1 Message Date
Damien Elmes
2a93355824 PEP8 cards.py 2021-06-27 12:12:23 +10:00
Damien Elmes
948fc5f777 add missing copyright headers to *.py 2021-04-13 18:45:35 +10:00
Arthur Milchior
2c73dcb2e5 d->col in tests
obtained by
```
sed -i "s/\bd\b/col/g" pylib/tests/*py qt/tests/*py
```
2020-07-17 06:58:32 +02:00
Arthur Milchior
4c25835d27 f->note in test
Obtained by sed -i "s/\bf\b/note/g" pylib/tests/*py qt/tests/*py
2020-07-17 06:47:44 +02:00
Damien Elmes
b1c2d271d3 comment out the unused legacy code 2020-01-17 10:51:36 +10:00
Damien Elmes
9bb0348fdd more template rendering tweaks
- The front and back are rendered in one call now. If the front
side contains no custom filters, we can bake {{FrontSide}} into the
rear side. If it did contain custom filters, we return the partially
complete rear template instead, and the calling code can inject
the FrontSide in after it has been fully rendered.

- Instead of modifying "cloze" into something like "cq-2", the card
ordinal and whether we're rendering the question or answer are now
passed in to the rendering filters as context.

- The Rust code doesn't need to support filter names split on '-'
anymore.

- Drop the "Show" part of hint descriptions so i18n support can be
deferred.

- Ignore blank filter names caused by user using two colons instead
of one.

- Fixed hint field and text transposition.
2020-01-12 21:34:07 +10:00
Damien Elmes
a51a4e4d31 drop pystache and move legacy code into separate file 2020-01-11 19:38:30 +10:00
Damien Elmes
1f2e00690f move the rest of Anki's code out of pystache
In the process of factoring out the field filtering, the "extra"
and "fullname" args are just passed in as a blank string now.
Extra was functionality that allowed a field modifier to be defined
as "filtername(arg1,arg2):field", and fullname was the name of the
field including any provided field modifiers. From grepping through
the add-ons on AnkiWeb, neither appears to have been used.
2020-01-08 17:15:46 +10:00
Damien Elmes
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00