Commit graph

614 commits

Author SHA1 Message Date
Damien Elmes
3f3fbd6fe3 make sure we log the correct type when card.type=3 2018-01-14 12:16:53 +10:00
Damien Elmes
f6176748c5 don't fetch reviews in deck order
- fetch reviews from all child decks at once, sorted by due order
- shuffle the gathered cards as we did previously
- review limits on child decks are ignored - only the current deck and
its parents control what the limit is
- to make the deck list consistent with actual counts, we can't sum the
child counts, as the sum in the parent limit>child limit case may not
reflect the actual number of cards that would be presented
2018-01-14 12:16:53 +10:00
Damien Elmes
65c779f25d distinguish between buried siblings and manually buried cards 2018-01-14 12:16:53 +10:00
Damien Elmes
38cd7f543a preserve learning/filtered state when suspending/burying
add new card type of 3 so we can distinguish cards in relearning from
normal reviews
2018-01-14 12:16:53 +10:00
Damien Elmes
a312ccf32e experiment with simple resched=off case to 'preview mode'
the previous approach meant we weren't able to preserve the card state
exactly when cards were in learning, since we didn't record the step
position prior to cards being moved into the filtered deck.

it also meant the answer buttons needed to change depending on state - 4
for cards in learning/review, but 2 when the card is on the final step
or is a review.

instead, in preview mode cards always have 2 buttons: again will repeat
again after a delay, and good immediately removes the card and restores
it to its previous state.

to accomplish this, we use a separate queue #, as the learn count
always needs to have a 1:1 correspondence to the number of cards
2018-01-14 12:16:53 +10:00
Damien Elmes
accf75be26 tweaks to interval constraining
- move fuzzing into _constrainedIvl() so it's applied prior to limits
like maxIvl

- don't fuzz early reviews, so cards get the same interval if a filtered
deck is rebuilt again
2018-01-14 12:16:53 +10:00
Damien Elmes
60db50a285 use the review queue for undue reviews 2018-01-14 12:16:53 +10:00
Damien Elmes
4b581c9f77 schedtest changes, squashed from local branch 2018-01-14 12:16:53 +10:00
Carl Hofmeister
430d38223c Fix string decode error when importing csv files 2017-12-31 14:01:47 -06:00
Damien Elmes
d08f6c4f46 bump version 2017-12-24 22:27:09 +10:00
aakatov
793e12a84c fix play sound with HTML special symbols in its filename 2017-12-23 12:36:26 +03:00
Damien Elmes
b5c17cb370 bump version 2017-12-22 21:48:13 +10:00
Damien Elmes
9230211809 different cloze colour in night mode 2017-12-20 16:05:28 +10:00
Damien Elmes
174e1a46b3 fix error when importing 2017-12-12 11:55:27 +10:00
Damien Elmes
39bc5d42ae fix mpv warnings 2017-12-11 17:26:25 +10:00
Damien Elmes
83b220f931 more open() and regex strings 2017-12-11 17:25:51 +10:00
Damien Elmes
7bc9fd6d04 move regex flags to start of string 2017-12-11 16:42:19 +10:00
Damien Elmes
ebfc475efe fix 'unclosed file' warnings with python -Wall 2017-12-11 16:38:15 +10:00
Damien Elmes
ccb39c5f50 cgi.escape is deprecated 2017-12-11 16:20:00 +10:00
Damien Elmes
4875d0502e add the ability to disable cert verification 2017-12-07 17:15:20 +10:00
Damien Elmes
54780dcd53 work around pops in recording start
https://anki.tenderapp.com/discussions/ankidesktop/26005-when-recording-sound-on-mbp

on my machine, the pops start around sample 2048 of a 44.1khz recording,
and only for the first recording after the audio hardware has gone to
sleep
2017-12-05 11:07:52 +10:00
Damien Elmes
857c9a5cea bump version 2017-12-04 12:58:29 +10:00
Damien Elmes
5f787d6d3c play question audio when preview set to 'show both sides' 2017-12-04 12:45:22 +10:00
Damien Elmes
b2c2cbf421 fix time translation patch 2017-12-04 12:33:23 +10:00
Damien Elmes
7c520c55df night mode 2017-12-04 12:20:56 +10:00
Damien Elmes
7fbbee43e6 add catalan 2017-12-03 16:06:56 +10:00
Piotr Kubowicz
b821c70929 Allow to better translate "in x minutes"
"There is 1 minute" and "in 1 minute" need to be translated
differently in Slavic languages.

Additionally remove unused afterTimeTable.
2017-11-30 20:03:51 +01:00
Damien Elmes
63c03eea83 bump version 2017-11-27 11:17:42 +10:00
Damien Elmes
e3a29ac3d1 accept current and future mnemosyne imports 2017-11-27 10:49:38 +10:00
Damien Elmes
b632a1805d restore media dir mod check
https://anki.tenderapp.com/discussions/beta-testing/853-anki-210-beta-21/page/1#comment_44071381
2017-11-20 14:22:53 +10:00
Damien Elmes
3cda126717 bump version 2017-11-17 17:35:36 +10:00
Damien Elmes
a97f1d87ff detect image extension, catch errors, add timeout 2017-11-17 17:30:01 +10:00
Damien Elmes
ee4e1cadbf fix crash when deleting nested default deck
https://anki.tenderapp.com/discussions/ankidesktop/25777-bug-report-syn
2017-11-14 13:13:52 +10:00
Damien Elmes
7d9530377e bump version 2017-11-11 12:15:38 +10:00
Damien Elmes
1631160ddc favour most recent modified when importing template changes 2017-11-11 12:11:45 +10:00
Damien Elmes
97833c71ad fix stutter when multiple audio files on card on windows
setting playlist pos to 0 was causing half-played sound to restart
2017-11-10 19:52:20 +10:00
Damien Elmes
3da4b9f60e bump version 2017-10-27 18:07:29 +10:00
Damien Elmes
87d19a2619 bump version 2017-10-26 19:57:47 +10:00
Damien Elmes
ffcd0833be bump version 2017-10-25 20:47:00 +10:00
Damien Elmes
86c50f067c drop experimental prewrap mode
- pasting in prewrap mode had been broken for a while and nobody noticed
- needs changes to export code and cloze handling code to deal with the
newlines
- newline rewriting in filterNode() is likely fragile
- may revisit post 2.1
2017-10-25 19:18:00 +10:00
Damien Elmes
d35210c42b don't leave a wav file lying around when recording 2017-10-25 18:35:39 +10:00
Damien Elmes
61cc3cec86 fix detection of media refs in cloze
https://anki.tenderapp.com/discussions/beta-testing/796-another-check-media-issue
2017-10-18 21:56:57 +10:00
Damien Elmes
3b23cdafc2 bump version 2017-10-13 13:12:36 +10:00
Damien Elmes
6a61516622 don't capture media keys 2017-10-13 13:11:22 +10:00
Damien Elmes
0fa24f4e0b probable fix for win32 startup errors; add timeout to mpv start 2017-10-13 12:14:40 +10:00
Damien Elmes
f87bd23f3f bump version 2017-10-11 14:50:28 +10:00
Damien Elmes
37dc564402 bump version 2017-10-05 17:26:48 +10:00
Damien Elmes
253dcd5e1f don't show album artwork 2017-10-05 14:35:58 +10:00
Damien Elmes
1edcafcd5d add coding: line to mpv.py for xgettext 2017-10-02 16:41:14 +10:00
Damien Elmes
fac3ee4604 bump version 2017-10-02 16:38:20 +10:00
Damien Elmes
c9aac25fba integrate _packagedCmd() into mpv for binary distrib 2017-10-02 16:37:52 +10:00
Damien Elmes
28893890f5 turn off mpv debug 2017-09-30 19:33:09 +10:00
Damien Elmes
975f19b642 use named pipes for mpv on windows
currently using non-blocking mode which involves a sleep in the read
loop - overlapped i/o might be a better option in the future
2017-09-30 19:32:48 +10:00
Damien Elmes
7a3bcc62ae mpv support 2017-09-30 19:29:48 +10:00
Damien Elmes
5c4296d41c mpv.py fixes
- enable input keys for video seeking
- output debug info to stdout so it's not caught by anki's error handler
- before sending a command, check the process is still alive, and
restart if necessary - otherwise a user who closes a video window will
end up with errors
2017-09-30 19:29:48 +10:00
Damien Elmes
4f0afb0a20 add mpv.py 2017-09-30 19:29:48 +10:00
Damien Elmes
5af1d67cef fix normalization in normal import 2017-09-30 19:29:33 +10:00
Damien Elmes
8cfc1e1315 stripHTML() should work when tag split over multiple lines 2017-09-30 15:33:05 +10:00
Damien Elmes
ed0561e914 another fix for mathjax+cloze 2017-09-12 13:53:08 +10:00
Damien Elmes
830258b2b3 Merge pull request #209 from sieben/simplify_comparisons
Simplify comparisons
2017-09-11 15:01:07 +10:00
Damien Elmes
a3c2efee89 Merge pull request #208 from sieben/none_comparison
Comparison with None shouldn't use equality
2017-09-11 15:01:01 +10:00
Rémy Léone
2a2b4a86dd Simplify comparisons 2017-09-10 15:32:51 +02:00
Rémy Léone
4ee2ebdada Comparison with None shouldn't use equality
That type of comparisons should always be done with 'is' or 'is not',
never the equality operators.
2017-09-10 15:30:22 +02:00
Rémy Léone
02fc117096 Remove trailing semicolon 2017-09-10 14:41:38 +02:00
Damien Elmes
f10968769f fix broken cloze deletion 2017-09-10 19:51:25 +10:00
Damien Elmes
2460311f6a bump version 2017-09-10 18:54:08 +10:00
Damien Elmes
9658fbb91e use separate .colpkg extension for collection exports
- allows translations of filename
- allows users to keep multiple collection exports in the same folder
- provides a clearer distinction between deck and collection packages
- the collection/backup .apkg special cases will continue to work in
future 2.1.x releases
2017-09-10 16:58:55 +10:00
Damien Elmes
cb69ff7eac only strip formatting when inside mathjax 2017-09-08 19:35:34 +10:00
Damien Elmes
d91faa67b4 mathjax tweaks
- drop support for $$ in favour of separate opening and closing tags
- add shortcuts to add mathjax
- don't highlight any clozes in blue if field contains mathjax chars
2017-09-08 19:20:37 +10:00
Damien Elmes
d1f35ae909 re.escape() deck search 2017-09-08 15:13:46 +10:00
Damien Elmes
1d257c05ce 'oldest first' now uses the revlog for correct ordering 2017-09-06 13:02:52 +10:00
Damien Elmes
ca6412b6c9 don't force win32 audio output
was added in 2008 as a hack around sound problems users were having, but
it causes problems for other users and prevents overriding in the conf
file, so let's try with the default

report:
https://anki.tenderapp.com/discussions/ankidesktop/24859-poor-playback-with-mono-mp3

originally changed in c50203b9a1
2017-09-04 19:05:02 +10:00
Damien Elmes
62a1382c0d python 3 doesn't save us from misconfigured locales 2017-09-02 13:59:10 +10:00
Damien Elmes
ecb683cdd1 bump version 2017-08-31 22:00:37 +10:00
Damien Elmes
5fd9228273 handle invalid filename encodings
on Linux users can end up creating filenames that can't be encoded to utf8,
which breaks Anki when it tries to store the filename in sqlite
2017-08-31 18:55:25 +10:00
Damien Elmes
c18bd47a6e scan media each time
Experiment with ignoring dirMod and scanning the folder for changes on
each sync. Use scandir() for better performance. Please let me know if
this causes a noticeable slowdown for you.
2017-08-29 10:52:13 +10:00
Damien Elmes
25cb6d3abe bump version 2017-08-28 22:30:05 +10:00
Damien Elmes
3faa82571c warn about subfolders 2017-08-28 22:01:13 +10:00
Damien Elmes
ca37b15aa7 bump version 2017-08-26 15:25:10 +10:00
Damien Elmes
2c9f286026 update python ver dep 2017-08-25 16:39:21 +10:00
Damien Elmes
08e0174f2e remove dupeOnSchemaChange
no longer required now that anki 1.x importing dropped
2017-08-21 13:50:11 +10:00
Damien Elmes
ff2e7b9e81 typo in stats 2017-08-21 11:29:54 +10:00
Damien Elmes
3ad9261c8c catch corrupt media db, fix it in 'check media' 2017-08-17 13:33:54 +10:00
Damien Elmes
e8cc960da3 bump version 2017-08-16 21:53:21 +10:00
Damien Elmes
375c071a26 catch attempts to write outside the media folder
big thanks to David Bailey for discovering this
2017-08-16 21:08:46 +10:00
Damien Elmes
af14051637 add check to see if drag&drop caused a recent bug
user was getting errors because they had a deck starting with double
quotes
2017-08-15 15:11:59 +10:00
Damien Elmes
a353135af3 add type-in-the-answer note type 2017-08-13 19:42:27 +10:00
Damien Elmes
be1514a97b bump version 2017-08-12 17:04:53 +10:00
Damien Elmes
b7be2ad744 clear flags on export 2017-08-12 16:13:53 +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
Damien Elmes
1c88315e86 bump version 2017-08-10 21:51:46 +10:00
Damien Elmes
94cf132918 make sure exporting ignores subfolders 2017-08-10 21:06:41 +10:00
Damien Elmes
82aeb57318 Revert "experiment with displaying FrontSide under answer"
This reverts commit a1b0ddb00c.
2017-08-10 15:04:24 +10:00
Damien Elmes
17693f1b63 bump version 2017-08-08 20:05:20 +10:00
Damien Elmes
d5aede7252 bump version 2017-08-07 18:39:29 +10:00
Damien Elmes
a1b0ddb00c experiment with displaying FrontSide under answer
- avoids having to move eyes to answer section
- the fade out/fade in step feels more natural when the
question section moves

feedback welcome
2017-08-07 18:38:35 +10:00
Damien Elmes
e40445a9c4 bump version 2017-08-06 15:30:41 +10:00
Damien Elmes
072489f436 fix unicode error when generating latex 2017-08-06 13:03:32 +10:00
Damien Elmes
0543a4533b add devMode flag to utils
also remove the extra toolbar call in loadProfile(), as we require a
restart to update the translations anyway
2017-08-01 14:28:13 +10:00
Damien Elmes
d2507899c2 bump version 2017-07-31 16:35:18 +10:00