Commit graph

81 commits

Author SHA1 Message Date
Damien Elmes
461e240d53 allow python-bundled json 2012-04-28 17:41:56 +09:00
Damien Elmes
e5bf86c40e add furigana to decks on upgrade 2012-04-07 18:28:31 +09:00
Damien Elmes
aa559431b6 on upgrade all cards of a note should share the same due # 2012-04-06 12:45:01 +09:00
Damien Elmes
47a61abebb accidentally used mod time instead of creation time for anki1 id 2012-03-20 06:01:25 +09:00
Damien Elmes
1529c6ae5e higher default leech threshold 2012-03-13 22:33:01 +09:00
Damien Elmes
f6b2e69669 remove did from notes, use model did instead 2012-03-09 09:12:27 +09:00
Damien Elmes
a2312f9a1f change cards table schema
In preparation for cramming:

- add odid for storing old deck on a per-card basis
- rename edue to odue
- at the moment note.did still exists, but in the future we may ignore it and
  use model.did instead
2012-03-08 11:28:12 +09:00
Damien Elmes
05782f9080 fix graphs 2012-02-24 22:32:00 +09:00
Damien Elmes
665fe9c280 allow upgrade of devel-version decks 2012-01-30 06:26:30 +09:00
Damien Elmes
38ec009378 same with card upgrade 2012-01-30 06:24:51 +09:00
Damien Elmes
34ba8e18f1 improve duplicate handling of note ids on upgrade 2012-01-30 06:19:49 +09:00
Damien Elmes
057b13e0af fix due # rewriting and correctly set nextPos 2012-01-30 05:42:03 +09:00
Damien Elmes
be8bec5bc4 fix ordinal problems rather than aborting upgrade 2012-01-24 23:10:37 +09:00
Damien Elmes
87a996cdce add flag fields for conditional templates 2012-01-23 23:57:33 +09:00
Damien Elmes
3449abe8a0 fix upgrading of decks with extra media fields 2011-12-20 12:40:18 +09:00
Damien Elmes
fca4ef7c00 strip superfluous spans from 1.2 upgrade 2011-12-18 07:23:26 +09:00
Damien Elmes
e610eeeb42 tweak template upgrading, replace repeated spaces with non-breaking ones 2011-12-17 22:01:50 +09:00
Damien Elmes
9e35e4acf2 template and cloze changes
While writing the documentation I realized that the default templates were
somewhat overwhelming. So I've moved the default settings into the card css,
and moved the css into a separate attribute which gets combined with the
question and answer templates.

Also:
- Detect cloze references directly rather than the conditional wrapper
- Add the cloze css to the template
2011-12-17 19:42:30 +09:00
Damien Elmes
60643b5b1f human-readable positions for new cards 2011-12-17 08:37:05 +09:00
Damien Elmes
bacbea13e0 conf() -> confForDid(); add getConf() 2011-12-13 13:56:05 +09:00
Damien Elmes
aeb38ab65d create a separate conf group for each imported deck 2011-12-13 04:42:12 +09:00
Damien Elmes
c1d9b62549 make sure we adjust due time on reviews when importing 2011-12-13 04:20:29 +09:00
Damien Elmes
1114fc084a rename special field templates 2011-12-12 01:39:57 +09:00
Damien Elmes
8be0e6cccd make sure we add + delete cards after template changes 2011-12-11 23:35:59 +09:00
Damien Elmes
4428c04774 new order is now a deck property 2011-12-10 22:45:44 +09:00
Damien Elmes
1e48ce9b99 fix randomizeCards() call 2011-12-10 04:35:29 +09:00
Damien Elmes
0ef3fe5d75 fix media unittest, turn of sync during upgrade 2011-12-07 23:23:58 +09:00
Damien Elmes
dd7434a44d use a class instead of id to specify card styling 2011-12-07 20:04:47 +09:00
Damien Elmes
45ebbd14c8 fix revlog upgrading 2011-12-07 19:58:31 +09:00
Damien Elmes
92352d4725 convert guid to base 91 string
Because JSON doesn't support 64 bit numbers, we need to either convert the 64
bit numbers to a string during transport, or store the ids as a string. At
base 91 a 64 bit number only takes an extra two bytes, and it means we can
dump DB results directly into JSON without having to apply any transformation.
2011-12-03 14:25:18 +09:00
Damien Elmes
a0d910201d don't add two typeans fields on upgrade 2011-12-02 17:37:10 +09:00
Damien Elmes
dc73ba8e47 add #answerStart to default hr so we can scroll to answer 2011-12-02 17:25:40 +09:00
Damien Elmes
56ec1c6135 fix upgrading of revlog 2011-11-29 10:34:49 +09:00
Damien Elmes
d903b50d5f upgrade tweaks 2011-11-28 19:14:10 +09:00
Damien Elmes
bd29318168 catch incorrect ordinals on upgrade 2011-11-28 16:57:58 +09:00
Damien Elmes
cd76706a2f make sure to remove inactive templates properly 2011-11-28 16:10:41 +09:00
Damien Elmes
1235f8362a type answer is now a template replacement 2011-11-28 15:15:38 +09:00
Damien Elmes
223cc48052 don't wrap template in div; reference #card instead
We want the background color to fill the card area rather than only the size
of the card content, so we need to set the CSS for the outer container
instead.
2011-11-28 14:45:43 +09:00
Damien Elmes
592078545e don't fail when upgrading an empty deck 2011-11-25 14:20:18 +09:00
Damien Elmes
b5c0b1f2c7 drop required/unique field properties
Instead of having required and unique flags for every field, enforce both
requirements on the first field, and neither on the rest. This mirrors the
subject/body format people are used to in note-taking apps. The subject
defines the object being learnt, and the remaining fields represent properties
of that object.

In the past, duplicate checking served two purposes: it quickly notified the
user that they're entering the same fact twice, and it notified the user if
they'd accidentally mistyped a secondary field. The former behaviour is
important for avoiding wasted effort, and so it should be done in real time.
The latter behaviour is not essential however - a typo is not wasted effort,
and it could be fixed in a periodic 'find duplicates' function. Given that
some users ended up with sluggish decks due to the overhead a large number of
facts * a large number of unique fields caused, this seems like a change for
the better.

This also means Anki will let you add notes as long as as the first field has
been filled out. Again, this is not a big deal: Anki is still checking to make
sure one or more cards will be generated, and the user can easily add any
missing fields later.

As a bonus, this change simplifies field configuration somewhat. As the card
layout and field dialogs are a popular point of confusion, the more they can
be simplified, the better.
2011-11-24 22:16:03 +09:00
Damien Elmes
f7790275ce groups -> decks 2011-11-23 19:28:09 +09:00
Damien Elmes
279a942642 deck -> collection 2011-11-23 17:47:44 +09:00
Damien Elmes
6e4e8249fb facts -> notes 2011-11-23 12:37:21 +09:00
Damien Elmes
4a601416bc keep typeAns as a field name
We have the fact loaded into memory anyway for the q/a display
2011-11-19 23:36:40 +09:00
Damien Elmes
7a5cee1d20 remove remaining CSS; more template properties into div 2011-11-18 08:25:56 +09:00
Damien Elmes
15e4b64162 new approach to hideQ
Instead of a separate option to hide question, embed the question into the
answer format by default. Users who don't want to see the question can remove
the question fields, and users who want a separator between the question and
answer (or not) can control it in HTML now.

Also, remove obsolete field CSS, and don't accidentally chomp a character on
upgrade.
2011-11-18 05:15:15 +09:00
Damien Elmes
c76c08069e change template replacement behaviour
Previously {{field}} wrapped the field in a span with the field's font
properties. This wasn't obvious, and caused frequent problems with people
trying to combine field and template text, or use field content in dictionary
links.

Now that AnkiWeb has a wizard for configuring the front & back layout, we can
just put the formatting in the template instead.
2011-11-18 02:50:47 +09:00
Damien Elmes
37b3de23cf remove inactive templates that are unused on upgrade 2011-11-08 18:52:31 +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
3bf0b253f2 handle bad field references and tags; don't create empty fields 2011-10-30 10:12:24 +09:00