Damien Elmes
e8777e8630
bump version
2017-07-10 15:22:47 +10:00
Damien Elmes
36ed23e103
fix python version check
2017-07-05 12:28:03 +10:00
Damien Elmes
c392418ba7
bump version
2017-07-05 10:54:27 +10:00
Damien Elmes
4967275973
bump version
2017-06-22 18:09:48 +10:00
Damien Elmes
0abff36cfa
bump version
2017-06-07 13:31:16 +10:00
Luke Williams
9e375f1c7b
Fix issue where null tag list crashes Mnemosyne import
2017-05-30 17:38:39 -04:00
Damien Elmes
7f7b8fc52f
make sure we don't use inherited ld_library_path when calling mplayer
2017-05-22 15:40:04 +10:00
Damien Elmes
1dd17e9f3a
when reviews have incorrect due date, make them due today
...
https://anki.tenderapp.com/discussions/ankidesktop/19394-strange-behavior-with-year-long-intervals#comment_42510830
2017-05-09 12:27:23 +10:00
Damien Elmes
a98c20a22f
bump version
2017-04-13 10:53:05 +10:00
Damien Elmes
aa89d06304
Revert "don't rely on cwd in media.py"
...
This reverts commit 975ca90225
.
reverting for now as it breaks showing of images during review
2017-04-11 12:50:33 +10:00
Damien Elmes
17d68cc957
use a clearer name for fmtQA()
2017-03-14 15:48:40 +09:00
Damien Elmes
ef0a28f294
Merge pull request #179 from henrikh/fmtQA
...
Unify inline card formatting
2017-03-14 15:39:19 +09:00
Henrik Enggaard Hansen
1dfc4466f1
Move card formatting to anki.utils
2017-03-13 15:52:02 +01:00
Joel Kitching
975ca90225
don't rely on cwd in media.py
...
media.py sets CWD to the media directory of the collection
(collection.media), and relies on that directory being
maintained as CWD throughout execution. The original CWD
is restored in the close() function.
Remove reliance on CWD being set and maintained throughout
execution of media.py. Improves portability and usability
in different codebases.
2017-03-07 15:55:40 +08:00
Damien Elmes
4693e71104
bump version
2017-03-05 19:49:24 +10:00
luoliyan
491b8ea63f
Allow special characters to be escaped
2017-02-28 08:10:43 +09:30
Damien Elmes
9f37cddfda
Merge pull request #169 from luoliyan/regex-tag-removal
...
Allow wildcard tag deletion
2017-02-22 20:51:23 +10:00
luoliyan
5b43222f52
Remove unneeded condition
2017-02-22 19:31:31 +09:30
luoliyan
dee0fe2880
Escape unsupported regex chars
2017-02-22 18:24:03 +09:30
Damien Elmes
2d96d59512
bump version
2017-02-22 18:36:53 +10:00
Damien Elmes
7aa8499850
Merge pull request #168 from luoliyan/dont-register-nonexistent-tags
...
Don't register non-existent tags
2017-02-22 18:27:21 +10:00
luoliyan
2d40baa95f
Don't register non-existent tags
2017-02-21 17:37:01 +09:30
luoliyan
12c98a21f0
Allow wildcard tag deletion
2017-02-21 17:27:50 +09:30
Damien Elmes
6335dcb90e
canonicalize to NFC form on edit/import
2017-02-19 12:49:52 +10:00
Damien Elmes
4430785122
fix error when closing collection on python 3.6
2017-02-08 19:41:44 +10:00
Damien Elmes
506f999581
Merge branch 'master' of github.com:dae/anki
2017-02-08 17:28:30 +10:00
Damien Elmes
227ca090db
use a constant for the starting factor
2017-02-08 17:28:12 +10:00
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
affede8079
bump version
2017-01-29 15:38:18 +10:00
Damien Elmes
04bc1a7766
use sync.ankiweb.net for syncing
...
media sync goes through the same domain now, avoiding a slow extra
SSL handshake
2017-01-29 14:57:59 +10:00
Damien Elmes
820f87ff0f
bump version
2017-01-20 16:07:54 +10:00
Damien Elmes
4380705992
add timeout to sync steps
2017-01-17 15:53:17 +10:00
dequis
9c902aec18
Turn "vacuum analyze" into two commands (fix for sqlite 3.15)
...
Before sqlite 3.15, the parameter to vacuum was ignored. Since sqlite
3.15, it became a database name parameter. The "vacuum analyze" syntax
was never supported by sqlite, seems to be just a psql thing.
The error for this is "OperationalError: unknown database analyze", and
happens when doing a media sync.
2017-01-15 13:25:21 -03:00
Damien Elmes
b5a8973791
bump version
2017-01-13 22:36:09 +10:00
Damien Elmes
ed07a147f9
support for saving stats to a pdf
2017-01-13 17:36:26 +10:00
Damien Elmes
e6adc3c195
fixes for sqlite on python 3.6
...
we need to switch to autocommit mode before executing vacuums &
certain pragmas
also removed the pysqlite version workaround; we just use the
python-provided versions in all cases now as it is new enough
2017-01-13 17:00:03 +10:00
Damien Elmes
a05ebdbefb
do GC on autosave
...
- ensures we're not called as part of the db progress callback
- minimises the chance of data loss if a gc causes a crash
2017-01-13 16:20:39 +10:00
Damien Elmes
f238bc772e
fix audio on mac
2017-01-09 12:52:52 +10:00
Damien Elmes
c653e39dbe
bump version
2017-01-08 21:20:45 +10:00
Damien Elmes
f104044a09
adjust user agent name
2017-01-08 19:57:04 +10:00
Damien Elmes
f6245cdfd1
use requests for http; add progress info back
...
- wrap request in AnkiRequestsClient so we can keep track of
upload/download bytes without having to monkey patch anything
- force a 64kB buffer size instead of the default 8kB
- show one decimal point in up/down so small requests still give
visual feedback
- update add-on downloading and update check to use requests
- remove the update throttling in aqt/sync.py, as it's not really
necessary anymore
2017-01-08 19:06:32 +10:00
Damien Elmes
e8423f0874
fix a bug that caused media data not to be uploaded
2017-01-02 20:53:15 +10:00
Damien Elmes
03b2ad37d9
add (currently unused) abort command
2016-12-25 12:54:47 +10:00
Damien Elmes
4fbe091c3b
don't reload data on close
2016-12-24 15:33:46 +10:00
Damien Elmes
d181133ac0
some sync fixes
...
- fix an extra \r\n being included at the end of the last form var
- req()s in the middle of a sync should throw an exception if they
receive a 403, as the calling code does not check for an empty return
2016-12-21 10:42:13 +10:00
Damien Elmes
7e34dc47dd
bump version
2016-12-17 13:51:00 +10:00
Damien Elmes
f9385572df
fix audio not stopping or overlapping
...
make sure we always send bytes
2016-12-17 13:47:07 +10:00
Damien Elmes
98485621b6
bump version
2016-12-15 21:14:55 +10:00
Damien Elmes
27c23c01d6
some html regexps should be case insensitive
2016-10-24 19:42:03 +10:00
Damien Elmes
2b8d2c9d74
Merge pull request #139 from Self-Perfection/compress_exported_svg_files
...
Restore compression of SVG files on export
2016-09-05 18:57:09 +10:00
Damien Elmes
5cea6b8a7a
Merge branch 'master' of github.com:dae/anki
2016-09-05 18:34:29 +10:00
Christoph Mack
079d551782
Add missing boundary at end of multipart/form-data request body for requests that include no application/octet-stream data
...
This makes the sync request sent to the /download endpoint valid multipart/form-data according to RFC 2046, 5.1
2016-09-03 14:15:09 +02:00
Self-Perfection
a5b0852360
Restore compression of SVG files on export
2016-09-02 14:27:24 +03:00
Damien Elmes
ddbf634dd5
longer ivl limit in db check
...
https://anki.tenderapp.com/discussions/ankidesktop/19394-strange-behavior-with-year-long-intervals
2016-08-24 14:38:04 +10:00
Damien Elmes
04c13d1348
use full path to packaged audio commands
...
ensures we use the packaged version over the system version
2016-07-26 12:15:43 +10:00
Damien Elmes
407aaae797
bump version
2016-07-14 21:37:41 +10:00
Damien Elmes
5655448919
explictly use utf8 when talking to mplayer
...
universal_newlines uses system locale which is ascii on osx unless
LC_CTYPE/LANG is set to utf8, so we need to be explicit about the
encoding we want instead
we also lose line buffering, so we have to explicitly flush
2016-07-12 16:55:10 +10:00
Damien Elmes
cc742df71a
support PSV out of the box and make extending delims easier
2016-07-11 11:36:53 +10:00
Damien Elmes
2f10ebb3ab
bump version
2016-07-07 23:40:12 +10:00
Damien Elmes
f8e300ab1d
use utf8 for collection.log
2016-07-07 12:03:02 +10:00
Damien Elmes
05d13de766
fix up ankiweb.certs paths
...
also fixes
https://anki.tenderapp.com/discussions/ankidesktop/18420-portable-anki-sync-error
2016-07-07 11:58:06 +10:00
Damien Elmes
6dead737ca
bump version
2016-07-05 21:35:53 +10:00
Damien Elmes
4175b6de5b
Merge pull request #131 from ankitest/patch-5
...
next interval >= prev interval + 1
2016-07-04 16:32:57 +10:00
Damien Elmes
9de08e243e
Merge pull request #134 from matthayes/master
...
Fix y axis tick rendering
2016-07-04 16:29:17 +10:00
Damien Elmes
94463991bc
basic sync support
...
currently no progress shown on large uploads/downloads
2016-07-04 15:45:53 +10:00
Damien Elmes
0c20da1069
fix conditional templates
2016-06-30 22:23:31 +10:00
Damien Elmes
ac7b081ece
add support for a few more languages
2016-06-29 16:37:29 +10:00
Damien Elmes
2c227da603
set rpath for bundled mplayer on linux
2016-06-29 14:21:48 +10:00
Damien Elmes
e131b20afd
tweak mplayer loc on osx
2016-06-28 13:26:19 +10:00
Damien Elmes
14ae3d5936
normalize version number
2016-06-28 12:49:54 +10:00
Matthew Hayes
d3d9ce24d5
Fix y axis tick rendering
...
Previously, y axis ticks could be fractional. Fractional ticks were always rounded to the nearest whole number for display. This leads to confusing graphs where the bar and ticks do not match up. For example, if the bar is 3 and the tick is 2.5, then the bar renders just above the tick but the tick is rendered as 3. They both then appear to have value 3 but don't line up.
To fix this behavior, we now indicate to flot that for the y axis we don't want fractional tick values (by setting tickDecimals to 0). flot will pick tick values to accommodate this setting. If for some reason the ticks are fractional, which shouldn't happen, we will render to one decimal place. Otherwise we render whole numbers without the decimal. Since we are counting reviews, this behavior makes more sense, because reviews are always whole numbers and never fractional.
2016-06-24 17:59:46 -07:00
Damien Elmes
4b478cd3e9
unused imports
2016-06-23 12:09:18 +10:00
Damien Elmes
cf2ea47076
bump version
2016-06-23 12:07:17 +10:00
Damien Elmes
1d75cff5e7
pyaudio is no longer optional
2016-06-23 12:04:48 +10:00
Damien Elmes
36c291c520
upgrade jquery & flot
2016-06-22 14:41:01 +10:00
Damien Elmes
4d88b62fbf
fix py3 issues with audio code
2016-05-31 17:51:16 +10:00
Dmitry Mikheev
2b922b3055
PEP8
2016-05-27 18:47:48 +05:00
Dmitry Mikheev
181c6f6f91
Refactoring a little bit
...
the current code just doesn't do it in the right order.
2016-05-27 01:33:46 +05:00
Dmitry Mikheev
cdfdffd608
To respect the max interval the user has set.
2016-05-27 00:55:05 +05:00
Dmitry Mikheev
c94b6a24bd
next interval >= prev interval + 1
...
http://ankisrs.net/docs/manual.html#reviews
One final thing to note is that Anki forces a new interval to be at least 1 day longer than it was previously so that you don’t get stuck reviewing with the same interval forever.
https://anki.tenderapp.com/discussions/ankidesktop/18382-new-interval-does-not-seem-to-be-updated-with-ease-at-130-and-current-interval-at-7-days
In some cases interval does not grow in fact.
2016-05-27 00:26:48 +05:00
Damien Elmes
63499fb7e9
fix entsToTxt()
2016-05-15 15:43:46 +10:00
Damien Elmes
f6f9b767c0
remove loop part of templating code
...
str has __iter__ on python3 which breaks templates
2016-05-13 14:33:32 +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
Damien Elmes
1dce3eaaff
drop anki1 upgrade code
2016-05-12 14:20:59 +10:00
Damien Elmes
89a5777585
store profiles as blobs
...
the cPickle data may not be valid utf8, and even with
text_factory=str this seems to cause problems sometimes
2016-05-12 14:19:16 +10:00
Damien Elmes
9b2a19ee85
when schema differs, make sure we don't import cards
...
_ignoredGuids should have been added to but wasn't
2016-04-17 20:38:39 +10:00
Damien Elmes
269ea80a1f
Merge branch 'master' of github.com:dae/anki
2016-04-10 14:20:46 +10:00
Damien Elmes
499b02281b
bump version
2016-04-10 13:36:36 +10:00
rizzomichaelg
610ca050eb
Adding new cloze while in filtered deck
...
When adding a new cloze tag while a card is in a filtered deck, anki currently adds the new card to the Default deck.
My proposed fix checks if the card has the odid field set and then sets the did to use when generating the new cards as the odid.
2016-04-09 08:46:54 -05:00
Damien Elmes
d71ca63b4c
remove stray text
2016-04-05 11:04:40 +10:00
Damien Elmes
04ada5015f
bump version
2016-04-05 11:02:35 +10:00
Damien Elmes
71778fb2b2
bump version
2016-03-27 21:14:30 +10:00
Dave Shifflett
2e38174921
Cast template deck ID before checking the decks
...
The keys of `self.decks.decks` are unicode keys whereas `template['did']`
is an integer, so `template['did'] in self.decks.decks` always fails.
2016-02-29 21:03:48 -06:00
Damien Elmes
3bbd0bca7e
zip64 support, and import/export improvements
...
- we now allow exports over 2gb/64k files - AnkiMobile and AnkiDroid
will need to be updated to support this
- avoid compressing media files in export, as in the common case of
jpg/mp3 it's much faster with no increase in size
- exports and imports now show # of files processed
- mw.progress.update() now limits # of updates per sec
2016-02-26 10:01:46 +10:00
Damien Elmes
5dca0cdf77
Merge pull request #117 from timrae/override
...
Don't use default deck when deck override set to invalid deck
2016-02-22 09:25:48 +10:00
Damien Elmes
68d5135009
Merge branch 'master' of github.com:dae/anki
2016-02-22 09:23:09 +10:00
Timothy Rae
38b36323da
Don't use default deck when deck override set to invalid deck
...
When the override deck is not valid, the more intuitive behavior for users is to not override. Advanced users that really want to use this feature will immediately open the deck override settings and see that it's referencing an invalid deck. Advanced users and developers have all been stumped by the old behavior, it's simply not intuitive.
2016-02-16 12:26:52 +09:00
Damien Elmes
ee58e651ef
work around huge perDay values set by other clients
...
sqlite was choking on the long values
2016-01-20 20:59:56 +10:00
Timothy Rae
6d850c95ce
Don't include media files with _ unless they are referenced in model
2015-12-07 16:37:27 +09:00
Damien Elmes
2d408cfe68
Merge pull request #111 from bogdanteleaga/tags-selected-deck
...
Limit tags in custom study dialog to those in the selected deck
2015-11-25 10:48:29 +10:00
Fionn Kelleher
da437fa16e
Output SVG instead of PNG for LaTeX
2015-11-22 13:25:18 +00:00
bogdanteleaga
1f1220cf7c
Limit tags in custom study dialog to those in the selected deck
2015-11-21 14:38:21 +02:00
Damien Elmes
47940680d2
don't convert newlines into br tags in export
...
fixes https://anki.tenderapp.com/discussions/ankidesktop/15795-export
-error-doubling-br-tags
This code dates back a few years, and was probably a naive solution
for files breaking when exported with newlines. Ideally we should be
preserving the newlines and wrapping the field in quotes, but since
some people may be relying on exported files not to be quoted, we'll
wait to change this until the next major release. For now, we'll use
a space instead, which should not alter the appearance of the
rendered HTML.
2015-11-17 18:06:45 +10:00
Damien Elmes
0ee2354d46
bump version
2015-09-26 13:13:33 +10:00
Damien Elmes
621923d45d
Merge pull request #108 from holycrepe/patch-1
...
Update Field Searches to match multi-line fields
2015-09-26 13:09:23 +10:00
Damien Elmes
713667d015
use python's sqlite3 if pysqlite > 2.6
...
users have reported errors about vacuuming in a transaction, which
appear to be due to changed handling of DDL statements
2015-09-26 11:51:32 +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
Damien Elmes
c243c583d8
update latex path for osx 10.10
2015-08-31 19:33:58 +10:00
Arne Ludwig
b5f375cc24
Adjusted code for bad latex commands to pass tests
2015-07-30 12:44:58 +02:00
Arne Ludwig
b2cf86b905
Don't mind LaTeX commands beginning with bad names
2015-07-30 11:44:47 +02:00
Damien Elmes
c38b267b2d
if we detect a schema change, we must make sure not to update cards
...
fixes https://anki.tenderapp.com/discussions/ankidesktop/13226-bug-endless-error-report-in-browser
2015-05-30 13:05:22 +10:00
Damien Elmes
a27847de58
DEV->ANKIDEV
2015-05-19 14:26:33 +10:00
Damien Elmes
9c2dcf1ee7
bump version
2015-03-25 01:12:50 +11:00
Damien Elmes
b0f7ddfefb
don't bump mod time when moving cards into/out of a filtered deck
...
fixes the following:
- create a filtered deck and sync it
- review cards in the filtered deck and delete it
- sync again
The filtered deck deletion was bumping the mod time on cards at the
start of the sync, preventing the reviews from being synced from the
other side, leading to lost reviews and sanity check errors.
2015-03-19 15:35:04 +11:00
Damien Elmes
a0bad7da45
update media url
2015-03-13 17:06:34 +11:00
Damien Elmes
67c86e8f5e
make sure sync msg is saved before we abort sync
2015-03-12 12:51:05 +11:00
Damien Elmes
7024fed002
fix cont=False handling in sync
2015-03-02 21:09:12 +11:00
Dave Shifflett
643ec35449
Use alternate pattern match during field changes
...
When a user renames or deletes a field, Anki tries to go through the
user's templates to substitute occurrences of that field name with its
new name or remove the field.
However, if the user has multiple Mustache placeholders on a single
line, this does not work as intended because the leading (.*) capture
group grabs the text in-between the two (or more) Mustache placeholders.
Examples:
{{#Flag}}
...
{{/Flag}}{{^Flag}}
...
{{/Flag}}
or
{{Front}} {{#Flag}}...{{/Flag}}
or
{{Front}} Hello. {{Victim}}
2014-12-29 20:09:09 -06:00
Damien Elmes
e294469521
cont should be checked befoer any further processing
2014-11-06 16:56:16 +09:00
Damien Elmes
6e7e08ebd0
be explicit about modSchema()'s check flag
...
- remove gui code that adds exceptions for syncing
- use check=False for all syncing and upgrade code
2014-11-03 16:28:12 +09:00
Soren I. Bjornstad
519bf5fec7
fix inconsistency in default note type names
...
The value used internally was changed at some point and the text that
was added to the GUI was not.
2014-10-23 14:28:26 -05:00
Soren I. Bjornstad
44425ab9d5
Merge branch 'master' of https://github.com/dae/anki
2014-10-23 14:23:14 -05:00
Damien Elmes
acfbc41576
bump version
2014-10-19 17:00:26 +09:00
Damien Elmes
3d5d852708
reduce sync chunk size
2014-10-19 16:58:26 +09:00
Damien Elmes
08e5caef87
bump version
2014-10-18 16:10:12 +09:00
Damien Elmes
77dfd63f1e
comment out high-dpi+transparent latex example
2014-10-09 18:12:25 +09:00
Damien Elmes
47c3bb0796
make sure we set usn when pulling in dconf from apkg
2014-10-08 12:54:30 +09:00
Soren I. Bjornstad
a430803774
Merge branch 'master' of https://github.com/dae/anki
2014-09-27 10:18:10 -05:00
Damien Elmes
ba7abb53e2
make sure we save note type after fixing ad bug
2014-09-27 10:32:21 +09:00
Soren I. Bjornstad
dd0e6f2a65
add {{Subdeck}} special field
...
If the deck is a several levels into a tree, it can be needlessly
verbose to list them.
2014-09-23 10:03:19 -05:00
Damien Elmes
f3fd5fb2fe
bump version
2014-09-21 16:30:45 +09:00
Damien Elmes
d46bbabae7
add class=latex to latex img tags
2014-09-19 18:00:11 +09:00
Damien Elmes
5bb09ed77a
don't add <br> tags when importing html
...
fixes #1098
2014-09-15 15:24:50 +09:00
Derbeth
d2b1d187da
allow better translations of added cards statistics
2014-08-28 08:16:12 +02:00
Damien Elmes
591015417b
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-08-22 22:06:13 +09:00
Soren I. Bjornstad
439f9b766d
accept ideographic space as tag separator
...
See also 6877cb0
.
2014-08-14 10:51:43 -05:00
Soren I. Bjornstad
625d7d5a82
rename fields in template properly when more than one modifier used
...
Previously something like {{type:cloze:Text}} in the template would not
be renamed when the field was renamed.
2014-08-11 11:33:39 -05:00
Soren I. Bjornstad
1ea9fb3d4a
don't allow nesting things under filtered decks when manually renaming
...
5e74976
fixed it for drag and drop, but realized it was still possible
to do so by using the rename function manually.
2014-08-10 14:36:45 -05:00
Damien Elmes
c4fffdda92
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-08-06 10:29:31 +09:00
Soren I. Bjornstad
408fc63b48
create "added" graph
...
This simple graph shows how many new cards you have added to a deck or
collection over time.
2014-08-05 09:50:09 -05:00
Damien Elmes
25c041bc0f
unquote does need utf8, but we need to convert back to unicode after
2014-08-05 12:59:31 +09:00
Damien Elmes
08510a4a53
Revert "we shouldn't encode to utf8 when unquoting"
...
This reverts commit 2dd28d86a2
.
2014-08-05 12:58:14 +09:00
Soren I. Bjornstad
0914c01706
Merge branch 'master' of https://github.com/dae/anki
2014-08-04 10:44:43 -05:00
Soren I. Bjornstad
b1e361bb32
don't allow tags of different cases
...
Previously they were allowed to be added, but all searches and
operations treated them as case-sensitive, creating an inconsistency.
The new implementation will change new tags with different case than
existing ones to the version currently in the database.
This may cause some slowdown in collections with a very large number of
tags since the only way to do this at the moment is to scan through
every one of them. Changing the format tags are stored in in the future
may be useful.
2014-08-04 10:44:32 -05:00
Damien Elmes
2dd28d86a2
we shouldn't encode to utf8 when unquoting
2014-08-04 12:54:54 +09:00
Damien Elmes
d53346d783
limit url unquoting to image tags
...
this prevents random text like %20 in a field from being converted
when note is saved
2014-08-01 09:42:28 +09:00
Damien Elmes
dd2b6cb07d
ignore >100MB files
2014-07-30 04:32:18 +09:00
Damien Elmes
3ee1937310
we need to count up for downloads
...
as we're streaming changes we don't know the total amount of downloads
required
2014-07-29 07:37:30 +09:00
Damien Elmes
cf801e4fb4
display more feedback when syncing media
...
deletes in particular take some time for the server to process, but
don't require much bandwidth, leading to the progress appearing to
have pause when content is actually being processed
this also gives the user an idea of how long the process will take to
complete
2014-07-28 17:00:26 +09:00
Damien Elmes
f5d60c70e2
remove unused functions
2014-07-28 14:28:12 +09:00
Damien Elmes
da777160bc
bump version
2014-07-21 14:30:32 +09:00
Damien Elmes
f54f5870fa
deauthing should reset lastUsn to 0
...
thanks to houssam for the heads up!
2014-07-20 03:37:31 +09:00
Damien Elmes
ed34d5bc94
bump version
2014-07-18 20:08:33 +09:00
Damien Elmes
3224a155a7
normalize filenames as we sync
...
user still needs to run "check media" if their fields are encoded
incorrectly, but by fixing on the fly we'll ensure mediaSanity doesn't
fail
2014-07-15 11:49:03 +09:00
Damien Elmes
ba8ed39e13
fix media sync thinking >25 changes is a concurrent update
2014-07-15 11:36:52 +09:00
Damien Elmes
77c9d5f5f3
tweak dev url
2014-07-12 18:21:49 +09:00
Damien Elmes
944ba2e90f
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-07-10 11:10:57 +09:00
Damien Elmes
d3807e3180
don't redetect delete which leads to sync error
2014-07-08 13:45:29 +09:00
Damien Elmes
df72c5a55f
split media and regular server urls
2014-07-08 11:16:51 +09:00
Soren I. Bjornstad
1fc1c56aa9
fix error on stats when translation had %f in different place
2014-07-05 10:39:00 -05:00
Damien Elmes
999c53b5ec
fix another downgrade+upgrade bug
2014-07-05 11:37:28 +09:00
Damien Elmes
1cb2aa077a
must make sure to detach old media db before renaming
2014-07-05 07:21:32 +09:00
Damien Elmes
014787c4cb
log mediaChangesZip()
2014-07-04 18:14:45 +09:00
Damien Elmes
a93c3423e3
must commit on concurrent update
2014-07-04 18:06:40 +09:00
Paul Hartmann
6877cb0393
add support for ideographic space in card search browser
2014-07-03 18:44:35 +02:00
Damien Elmes
06b61fc2c7
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-07-01 06:44:24 +09:00
Soren I. Bjornstad
2d7e1ad017
another translation fix
2014-06-30 09:25:19 -05:00
Damien Elmes
7fa79bf220
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-06-30 15:09:40 +09:00
Soren I. Bjornstad
0071ddfb89
fix ngettext mistake in cards/minute stat
...
introduced in 46a38f843e
2014-06-29 12:56:05 -05:00
Damien Elmes
1e34696c5b
Merge branch 'master' of git://github.com/sobjornstad/anki into sobjornstad-master
...
Conflicts:
anki/exporting.py
2014-06-29 04:07:00 +09:00
Soren I. Bjornstad
c3434ff751
update note type on apkg import when only templates have changed
...
Previously, it only updated if card/note count was different, even if
the templates / styling information had been updated.
2014-06-28 13:51:30 -05:00
Soren I. Bjornstad
a261f15269
change out of temp media folder before deleting it
...
In some cases, not doing so could cause a "this file is being used by
another process" error.
2014-06-28 11:30:28 -05:00
Damien Elmes
eba3aa583c
if media.db import fails, start anew
2014-06-28 05:06:43 +09:00
Soren I. Bjornstad
46a38f843e
fix rounding of cards/minute; use 1 decimal place
2014-06-26 10:07:58 -05:00
dae
2aa7714f87
new media syncing protocol
...
- media syncing no longer locks the account, so it can be done
in the background in the future, and multiple clients can safely
sync media at the same time
- all operations are now idempotent, so they can be repeatedly safely
in the event of a connection error
- whether it's a normal incremental sync, an initial sync,
or the media database has been deleted, no files will be uploaded
or downloaded if they already exist on the other side
- file removals are now chunked like additions & updates, preventing
timeouts due to large requests
- if the server can't process a chunk in time, it will return a count
of what it did process, so the client can retry the rest
Notes for AnkiDroid:
- when porting this, recommend you pick a different name for the
.media.db2 file, so users don't accidentally copy the AD version to
the desktop or vice versa
- please make sure filenames are added to the zip in NFC form
2014-06-26 09:00:38 +09:00
Soren I. Bjornstad
a570779a26
update all duplicates when importing
...
If duplicate notes are already in the collection and, based on the first
field of all of them, they should be updated, update all of them instead
of just the first one we come across.
2014-06-24 15:55:19 -05:00
Soren I. Bjornstad
72b4148127
make sure temp folder hasn't been deleted since creation
2014-06-24 14:50:39 -05:00
Soren I. Bjornstad
ba084cb46a
don't insert <br> into text of cards on import
...
When "allow HTML" was turned off, Anki was replacing newlines with <br>s
in the text of the new notes before it escaped HTML characters, so the
line breaks were becoming <br>.
2014-06-21 11:02:34 -05:00
Soren I. Bjornstad
71ff86e3f3
change "suspended" label to "suspended+buried"
2014-06-20 19:23:53 -05:00
Soren I. Bjornstad
28bb109ded
only display "added duplicate" message once
...
Even if there are several (duplicate) notes in the collection that
match, only send the message once to avoid making it look like multiple
dupes have been added.
2014-06-19 17:19:56 -05:00
Soren I. Bjornstad
5e74976361
prevent nesting things under filtered decks
...
This change keeps drag-and-drop behavior the same except for displaying
an error if an otherwise acceptable move would nest anything underneath
a filtered deck.
2014-06-18 16:26:49 -05:00
Soren I. Bjornstad
8620b81817
add unchanged count to import log
2014-06-17 09:38:26 -05:00
dae
1b646c1c8d
mnemosyne changed version string in .db
2014-06-08 14:37:15 +09:00
dae
bc90904acd
return success if media sync completes
2014-06-05 13:33:47 +09:00
dae
24e83abe22
fix empty search in filtered deck
...
was broken by bbc8f75d70
2014-06-03 17:54:15 +09:00
dae
8cdfce4dd8
fix latex generation caused by bug in patch
2014-06-03 17:35:19 +09:00
dae
85488afb8f
add TimedLog for debugging
2014-06-03 17:26:06 +09:00
dae
cc4b9938c7
add note about latexCmds
2014-06-03 16:33:43 +09:00
Damien Elmes
4e41c61e73
Merge pull request #79 from joelmeyerhamme/patch-1
...
Expose latex command tool chain
2014-06-03 16:19:59 +09:00
dae
c89199aee9
Merge branch 'master' of https://github.com/hssm/anki
2014-05-28 17:42:27 +09:00
Houssam Salem
7b62094ea0
Add odid fix to db check ( #1035 )
2014-05-26 15:11:47 +10:00
dae
cda86307c0
round cards/minute (thanks to Markus)
2014-05-25 14:55:29 +09:00
rubyu
a83769b258
Fixes an issue fields are not being escaped in doExport().
2014-05-21 14:52:43 +09:00
Joel Meyer-Hamme
980c68b2b0
Expose latex command tool chain
...
Dvi isn't compatible with quite a few Latex packages. I have been trying to include chemical formulas with the chemfig package. Exposing the tool chain to plugins would be very useful. For the record, I'm currently using:
´´´python
latexCmds = [
["pdflatex", "-interaction=nonstopmode", "tmp.tex"],
["pdflatex", "-interaction=nonstopmode", "tmp.tex"],
["pdfcrop", "tmp.pdf"],
["convert", "-density", "300", "tmp-crop.pdf", "tmp.png"]
]
´´´
2014-05-20 19:08:54 +02:00
Damien Elmes
bbc8f75d70
make sure OR clause doesn't allow suspended cards in filtered deck
...
fixes http://help.ankisrs.net/discussions/ankidesktop/6673-filter-decks-can-unsuspend-cards
2014-05-03 12:07:18 +09:00
Damien Elmes
00dd291819
bump version
2014-04-23 08:16:45 +09:00
Damien Elmes
fa57fd3ad9
don't fail if \n in cloze
2014-04-21 14:50:18 +09:00
Damien Elmes
89c9af7445
use default sample rate instead of forcing 44100
...
The 64 bit built of portaudio on OSX seems to generate a wav
file that says it's 44100 but is actually the default rate, leading
to samples playing too fast or slow.
2014-04-18 04:17:05 +09:00
Damien Elmes
5d1aeb4dde
bump version
2014-04-16 01:36:43 +09:00
Damien Elmes
694682d964
fix multiple cloze tags contained on one line
...
inner regex was capturing multiple clozes. fixes
https://anki.tenderapp.com/discussions/ankidesktop/6599-empty-cards-3533-cards-to-delete
2014-04-16 01:15:59 +09:00
Julien Baley
fac360d744
Allows smoother transition from old modifier syntax {{a 🅱️ fld}} to new one {{a(b):fld}}
2014-04-14 17:21:28 +01:00
Damien Elmes
962c814d5b
bump version again, as new cert was missing an intermediate
2014-04-12 15:54:25 +09:00
Damien Elmes
c529a77686
bundle new and old cert
...
fails to validate on some systems even when httplib2's default
certs are bundled, so we need this not just for SNI
2014-04-11 01:13:55 +09:00
Damien Elmes
01636dff00
bump ver
2014-04-10 15:00:32 +09:00
Damien Elmes
fcc4df821f
disable explicit ca_certs
...
may have added this to support beta.ankiweb.net as python doesn't
support SNI, but it prevents changing cert
2014-04-10 14:02:35 +09:00
Damien Elmes
d56cf3c6b0
add fix for AD issue
2014-04-01 13:13:59 +09:00
Damien Elmes
5eed6679fd
Merge pull request #69 from julienbaley/chained_mod_params
...
Adding support for parameters in modifiers
2014-03-14 13:53:06 +09:00
Damien Elmes
b1cb07077a
include buried in suspended count
2014-03-14 11:56:15 +09:00
Julien Baley
90fd1c00c8
Adding support for parameters in modifiers: {{mod1(param1,param2):mod2(param3):field}}
2014-03-12 14:21:23 +00:00
Damien Elmes
7dcf0d8ead
fix tag strip on export
...
we must make sure to include spaces around tags or they can't be
found
2014-03-09 10:44:52 +09:00
Damien Elmes
de8adfecff
disallow \r and \n in media filenames
2014-03-06 09:00:47 +09:00
Damien Elmes
980c9d7305
Merge branch 'master' of https://github.com/hssm/anki
2014-02-21 13:38:02 +09:00
Houssam Salem
8b443e80ef
Remove leech tag on undo if it was added during that review ( #973 ).
2014-02-20 16:51:08 +11:00
Damien Elmes
4c65c594dd
don't force cloze to start
...
This allows {{kana:cloze:Text}} to work. May allow users to
shoot themselves it the foot - will see how it goes in the wild
and reconsider if necessary
2014-02-19 21:21:11 +09:00
Julien Baley
777a3b8ec3
Fixes behaviour for {{type:cloze:Field}}
2014-02-19 10:09:48 +00:00
Damien Elmes
6da0e688b3
Merge pull request #64 from julienbaley/chained_mods
...
Chained mods
2014-02-19 17:59:57 +09:00
Julien Baley
fb1a255358
Chained modifiers are processed from innermost to outermost (i.e. rtl). Except cloze/type.
2014-02-19 07:32:04 +00:00
Julien Baley
7e3597fb8e
Adding support for chained modifiers. One can now write e.g. {{cloze:text:Field}} or {{text:cloze:Field}}, it's order independent.
2014-02-18 17:24:28 +00:00
Damien Elmes
8c22e747bb
Merge pull request #63 from hssm/986
...
Remove marked/leech tags when exporting without sched data (#986 )
2014-02-15 23:43:28 +09:00
Damien Elmes
23c557af6e
Merge pull request #61 from hssm/browser-deck-collapse
...
Add expand/collapse support for decks in browser tree.
2014-02-15 23:43:00 +09:00
Houssam Salem
61ab1f5dfd
Remove marked/leech tags when exporting without sched data ( #986 )
2014-02-15 23:04:59 +11:00
Houssam Salem
770c6e9c4a
Add expand/collapse support for decks in browser tree.
...
The state is preserved in a new deck configuration key named 'browserCollapsed'.
2014-02-15 13:32:14 +11:00
Damien Elmes
3c36ddfb82
don't allow files named . or ..
2014-02-10 20:47:49 +09:00
Damien Elmes
3b20de173f
preserve order in multi cloze type answer; bump version
2014-01-30 00:34:42 +09:00
Jussi Maatta
656698da83
Add A-factor to E-factor conversion to SuperMemo import.
...
The SuperMemo XML importer assumed that the A-factors used by
SuperMemo map 1-1 with E-factors (which correspond to Ease in
Anki). This resulted in too large E-factors for imported items.
This change adds an A-factor to E-factor conversion to the
importer.
2014-01-26 10:09:47 +02:00
Jussi Maatta
cdcd5eb651
Fix double newlines in items imported from SuperMemo.
...
When importing SuperMemo XML files, indicate to the BeautifulSoup
XML parser that the <br> tag is self-closing. This prevents it
from adding a matching </br> for every <br> tag. These extraneous
tags resulted in extra newlines in items imported from SuperMemo.
While we're at it, fix the same bug for a couple of other
self-closing HTML tags.
2014-01-26 10:06:53 +02:00
Jussi Maatta
6c6be1144b
Remove unused function from SuperMemo XML importer.
2014-01-26 10:01:06 +02:00
Damien Elmes
5f9afe5296
bump version
2014-01-22 17:13:33 +09:00
Damien Elmes
97a2b81997
fix 'add reverse' template for non-english languages
2014-01-22 02:57:44 +09:00
Damien Elmes
14a2321408
increase custom study size limit as well
2014-01-14 15:45:12 +09:00
Damien Elmes
96eeacbf69
increase filtered deck size limit to 99999
2014-01-14 15:12:45 +09:00
Damien Elmes
44b83d9bd8
switch over to per-day sibling burying
2014-01-14 14:18:42 +09:00
Damien Elmes
f0525a76fb
if we renamed any files to nfc, need to rerun check
2013-12-13 20:24:39 +09:00
Damien Elmes
ab81227dac
bump version
2013-12-10 17:25:40 +09:00
Damien Elmes
54e2d42fa6
off by one in zip count comparison
2013-12-09 17:37:43 +09:00
Damien Elmes
4e900b4608
pass client media count to server
2013-12-09 17:36:17 +09:00
Damien Elmes
ba589ac8cc
need to compare mediaList with nfd on macs
...
otherwise the server says we have file x and local code
doesn't notice it already exists
2013-12-04 11:43:57 +09:00
Damien Elmes
636d70ab16
make sure we reopen log after export
2013-12-02 23:57:56 +09:00
Damien Elmes
742a520954
make sure to close debug log when closing collection
2013-12-01 01:44:47 +09:00
Damien Elmes
1c35a590e3
fix regression in unused media check
2013-11-29 02:07:31 +09:00
Damien Elmes
0372f30220
adjust media regexp to not trigger on mce_src
...
otherwise pasting the following will cause an error:
<img src="..." mce_src="/foo.png">
2013-11-27 19:24:41 +09:00
Damien Elmes
19b1446758
automatically remove from filtered deck before reschedule
...
commit 79ed57a445
prevented reschedule
on cards in a filtered deck, but it is more user friendly to
automatically move back to the home deck instead. we also don't need
to removeLrn() for review cards, because we're updating type+queue+odue
ourselves
2013-11-26 03:23:03 +09:00
Damien Elmes
99d82c1f2d
fix hasIllegal check, and associated unit test
2013-11-26 03:19:11 +09:00
Damien Elmes
ae8074ec01
make sure we reset odue when rescheduling as new
...
if we fail to do this for a relearning card, it sticks around
until it causes problems later
2013-11-17 16:03:58 +09:00
Damien Elmes
4bf63b6ad0
bump version
2013-11-14 14:41:31 +09:00
Damien Elmes
f6b9dadf13
catch invalid file encodings in media check & sync
2013-11-13 17:19:25 +09:00
Damien Elmes
75f87201a2
rotate log file when it hits 10MB
2013-11-13 17:00:20 +09:00
Damien Elmes
9334bc37fa
log media sanity
2013-11-13 16:54:25 +09:00
Damien Elmes
853faa90cd
don't bother logging sortCards()
2013-11-13 16:51:40 +09:00
Damien Elmes
c3300f733a
make sure we don't 'fix' req for cloze type
2013-11-13 16:49:49 +09:00
Damien Elmes
ef9157a8ee
don't open log for export or upgrade, only regular+sync
2013-11-13 16:48:22 +09:00
Damien Elmes
1df385db12
cards must be removed from filtered decks before they're buried
...
if not, removeLrn() resets due=odue and odue=0, leading to an invalid
delay calculation when they're later reviewed in the filtered deck
to fix this we'll need to make the same changes required to support
learning cards retaining their state when being emptied from a
filtered deck
2013-11-13 09:06:48 +09:00
Damien Elmes
d7e452de1f
fix note types with missing reqs
2013-11-13 08:33:54 +09:00
Damien Elmes
db77c8c80b
make sure simplejson always returns unicode
2013-11-10 04:57:15 +09:00
Damien Elmes
be81d282ac
catch temp folder issue when importing
2013-11-07 21:57:23 +09:00
Damien Elmes
5dfe95aa67
move debug logging into libanki
...
we want to be able to log the initial automatic sync, which
happens before the debug logging was set up in ankiqt
also skip the flush, as it should eventually get written
2013-11-04 23:04:27 +09:00
Damien Elmes
433f2b06f9
make sure suspended/buried cards are reset on export too
2013-11-03 16:12:43 +09:00
Damien Elmes
6d69c5e292
bump version
2013-11-01 18:19:30 +09:00
Damien Elmes
1f3a57104c
fix new cards not being shown in new order
2013-11-01 17:32:02 +09:00
Damien Elmes
32147b2d76
buggy i18n def
2013-11-01 03:09:20 +09:00
Damien Elmes
e5d7a69631
fix an issue where non-new cards were not reset on export
...
only happened for cards in a filtered deck
2013-10-30 23:28:52 +09:00
Damien Elmes
d8149910eb
don't terminate review abruptly when sibs removed from queue
2013-10-30 23:07:21 +09:00
Damien Elmes
3348b091d0
tweak logging
...
- log only sched getCard(), not all getCard calls
- don't log sched.today unless it's changed
2013-10-30 22:42:32 +09:00
Damien Elmes
5f0ef85044
fix reversed check in media
2013-10-30 21:10:25 +09:00
Damien Elmes
04ff4cc3fc
make 's' translatable in stats
...
thanks to "lumininous spice" for the heads up
2013-10-26 10:53:15 +09:00
Damien Elmes
330e991d7d
bump version
2013-10-23 18:58:00 +09:00
Damien Elmes
013f879d4e
support cid:<card id> search
2013-10-23 18:57:22 +09:00
Damien Elmes
82a54c780f
catch invalid temp folder and other tweaks
...
- tweak sync code so that a failure in loading the collection
won't leave the app with an unopen collection
- don't show corrupt collection message when the error is not
a db error
- catch the temp folder issue when loading the collection. i suspect
this was the issue that was causing some people to end up with
an open anki instance with no collection loaded
2013-10-22 15:30:53 +09:00
Damien Elmes
a9c9452271
bury card option
2013-10-22 14:28:45 +09:00
Damien Elmes
cf51f33c66
add separate is:buried and use with filtered deck
2013-10-22 14:20:31 +09:00
Damien Elmes
bab63de768
silly me, we were overriding retries in the aqt monkeypatch
2013-10-20 10:25:25 +09:00
Damien Elmes
9b27b06b68
fix retries count for unit tests
2013-10-19 12:53:18 +09:00
Damien Elmes
0a750005b9
do not bump usn/mod when automatically unburying
...
in the upcoming daily unburying, this could lead to a state
where the remote end unburies just at the start of sync
and clobbers more recent changes made on the local end
2013-10-19 12:22:17 +09:00
Damien Elmes
313fc7c9ef
more generous timeout
2013-10-18 14:22:03 +09:00
Damien Elmes
01832a9139
disable http retries
...
logs indicate client was retrying based on timeout and so on,
causing more problems
2013-10-18 14:21:47 +09:00
Damien Elmes
0fbc94c186
more logging tweaks
...
- disable in browser, note.cards()
- in getCard() we want the calling frame, not us
- log current day
- show card/note id in card info stat
2013-10-18 14:20:20 +09:00
Damien Elmes
9b2109b85a
Merge branch 'master' of github.com:dae/anki
2013-10-18 11:54:25 +09:00
Damien Elmes
b99533a5ad
add logging to some scheduling and syncing code
2013-10-18 11:52:21 +09:00
Damien Elmes
9baa3e197a
add option to disable burying of reviews
2013-10-18 10:38:29 +09:00
Damien Elmes
da1672d42f
don't rename/unlink files for non-local check
2013-10-17 17:59:26 +09:00
Damien Elmes
6368a0ab18
Merge pull request #44 from sobjornstad/master
...
Don't display "If you studied every day" in stats if you studied every day
2013-10-16 03:26:24 -07:00
Damien Elmes
686c0077ea
bump version
2013-10-16 12:11:39 +09:00
Damien Elmes
6be7503543
normalize to nfc when sending media in sync
2013-10-16 08:37:34 +09:00
Damien Elmes
e9ab9128c8
we can remove graves when uploading and save space
2013-10-11 12:21:59 +09:00
Soren I. Bjornstad
6c07a58c2a
display "if you studied every day" only when appropriate
...
(If you in fact did study every day during the period shown, it looks
silly.)
2013-10-10 10:42:58 -05:00
Damien Elmes
8d7edcb2bb
include a session key when syncing
2013-10-10 22:59:34 +09:00
Damien Elmes
b42c0c725b
Revert "tolerate a str arg to writeData()"
...
This reverts commit 2d4e88afbd
.
On second thought, this change is likely to mask the error in most cases, and
we want add-on authors to update their add-ons anyway as they would not be
handling non-latin text in 2.0.12.
2013-10-10 11:08:39 +09:00
Damien Elmes
2d4e88afbd
tolerate a str arg to writeData()
2013-10-09 13:13:48 +09:00
Damien Elmes
bc96a00fd2
we need to clear out std models on export or we end up renaming
...
and the rename affects the exporting deck as well
2013-10-06 09:45:38 +09:00
Damien Elmes
7aee582a58
loop should exit early, and allNames() doesn't need modification
2013-10-06 09:26:43 +09:00
Damien Elmes
6c304ebe2f
to normalize unicode we need to have unicode
2013-10-06 04:53:11 +09:00
Damien Elmes
3ed2861115
include platform in cv
2013-10-06 04:37:39 +09:00
Damien Elmes
e3a102ef92
bump version
2013-10-05 23:53:27 +09:00
Damien Elmes
f1837e7e0a
when ensuring model unique, check id not obj
...
this should fix an issue where we were attaching a suffix to non-duplicate
names on sync
2013-10-05 23:53:09 +09:00
Damien Elmes
f23392b6a3
Merge pull request #35 from hssm/compile-regex
...
Pre-compile HTML-stripping regexes.
2013-10-04 13:39:44 -07:00
Damien Elmes
9524dbed96
give note types unique name when adding/importing ( #325 )
2013-10-04 09:00:08 +09:00
Damien Elmes
f29a04ae29
bump sync ver to 7 and change meta return value
...
- /sync/meta now returns a dictionary
- it includes the following extra fields
- msg: if non-empty, show this message at the end of the sync
- cont: if false, show above message and abort sync
- uname: the user's email address, so it can be stored by the local client to
show users who have forgotten which email address they used. in the future
this will be saved only when logging in, so do a conditional access on it
2013-10-04 06:09:28 +09:00
Damien Elmes
b55761190f
option to tag notes in find dupes function
2013-10-04 00:07:11 +09:00
Damien Elmes
33403fd890
include client type in cv
2013-10-02 04:09:16 +09:00