Commit graph

9459 commits

Author SHA1 Message Date
RumovZ
0556696b47 delimter_from_value → delimiter_from_value 2022-05-12 09:15:28 +02:00
RumovZ
93a90db7d4 Merge remote-tracking branch 'upstream/HEAD' into text-import-export 2022-05-11 18:58:48 +02:00
RumovZ
367c77166b factor → ease_factor 2022-05-11 18:58:01 +02:00
RumovZ
b2beab8f40 Add import_json_file() 2022-05-11 18:58:01 +02:00
RumovZ
322e44fa3e Show all accepted file types in import file picker 2022-05-11 18:58:01 +02:00
RumovZ
b740be6554 Avoid creating CardGenContexts for every note
This requires CardGenContext to be generic, so it works both with an
owned and borrowed notetype.
2022-05-11 18:58:01 +02:00
RumovZ
fe862523e6 Document use of empty strings for defaults 2022-05-11 18:58:01 +02:00
RumovZ
7bb423f72e Don't trim CSV records 2022-05-11 18:58:01 +02:00
RumovZ
1a115f7287 Map timestamp of ForeignCard to native due time 2022-05-11 18:58:01 +02:00
RumovZ
74ce551155 Only allow fixed set of CSV delimiters 2022-05-11 18:46:53 +02:00
RumovZ
c565f77c23 ForeignCard.ivl → ForeignCard.interval 2022-05-11 18:46:53 +02:00
RumovZ
dbeca4310b Use decimal number as foreign ease (like '2.5') 2022-05-11 18:46:53 +02:00
RumovZ
8f1bba6c07 Escape HTML entities if CSV is not HTML
Also use name 'is_html' consistently.
2022-05-11 18:46:53 +02:00
RumovZ
f7ac4497b4 Don't use doubly buffered reader in csv 2022-05-11 18:46:53 +02:00
BlueGreenMagick
fb5521eeed
remove image.style.height on resize (#1856) 2022-05-11 10:06:34 +10:00
Damien Elmes
ab1c23953e Update translations 2022-05-10 13:18:07 +10:00
Damien Elmes
bf74ec8203 Fix missing dfa file in build
Added compile_data_attr, then re-ran cargo/update.py.
2022-05-10 12:19:59 +10:00
RumovZ
6c807c1b2e
Fix review queue if limit is reached (#1855) 2022-05-10 12:11:35 +10:00
Henrik Giesel
89530c5f24
Change sequence of Mathjax escaping (#1854) 2022-05-10 11:54:06 +10:00
Henrik Giesel
6043d2f5a2
Set editor size to 1.6 on Windows as well (#1853) 2022-05-10 11:48:11 +10:00
Henrik Giesel
96d9539b9d
Fix activeName updating wrongly when selecting previous tag from invalid tag (#1851) 2022-05-10 11:45:41 +10:00
Abdo
45b12ca104
Store rendered side in TemplateRenderContext (#1852)
* Store rendered side in TemplateRenderContext

* Move _question_side up with the other simple properties (dae)
2022-05-10 11:44:44 +10:00
BlueGreenMagick
68482d37a1
select all tags with Ctrl+A (#1847) 2022-05-10 11:39:54 +10:00
Damien Elmes
1b48d3e3d1 Mention eslint --fix in docs
https://github.com/ankitects/anki/pull/1847#issuecomment-1120954217
2022-05-10 11:39:15 +10:00
BlueGreenMagick
9d98c62d50
Fix when tooltip changes before tooltipObject is created (#1845)
It can happen in TagWithTooltip.svelte
when a tag is normalized beause of leading/trailing delimiter
2022-05-10 11:36:54 +10:00
RumovZ
890b28c1e8
Fix undisruptive formatting issues (#1848)
* Skip unparsable pylib files with black

This was causing black to return a non-zero code, preventing the
subsequent isort from running.

* Organise imports on save
2022-05-09 20:00:20 +10:00
BlueGreenMagick
fc8b976ca8
fix typo. Shortcut uses on:action not on:click (#1846) 2022-05-09 19:55:35 +10:00
RumovZ
3a175c5434 Add csv importing with GUI 2022-05-09 11:48:40 +02:00
RumovZ
2c3a6a43de Add csv metadata extraction on backend 2022-05-09 11:48:40 +02:00
RumovZ
db5f167de5 Add plaintext importing on frontend 2022-05-09 11:48:40 +02:00
RumovZ
9f0f4e6159 Add csv and json importing on backend 2022-05-09 11:48:40 +02:00
RumovZ
5bacc9554a Add Menomosyne serializer 2022-05-09 11:48:40 +02:00
RumovZ
29c691eabd Add start of csv importing on backend 2022-05-09 11:48:40 +02:00
RumovZ
ae940f1faa Add crate csv 2022-05-09 11:48:40 +02:00
BlueGreenMagick
faa21266db
Fix caret jumping to start when unselecting autocomplete suggestion (#1844) 2022-05-09 11:15:56 +10:00
BlueGreenMagick
cc374996cc
align tag icon and text (#1843) 2022-05-09 11:15:44 +10:00
Abdo
7c543eeb2f
Add the av_player_will_play_tags hook (#1842)
A general version of the reviewer_will_play_question_sounds and reviewer_will_play_answer_sounds hooks
2022-05-09 11:08:34 +10:00
Damien Elmes
d946e5ddd5
Fix for crash with invalid dates on Windows (#1837)
https://forums.ankiweb.net/t/bug-report-crashing-when-opening-deck-browser/19768

Caused by a note mtime that was 1000x larger than it should have been.
Check DB will now fix this case (but there are others it still does not
cover, such as invalid card/note IDs).

https://docs.rs/chrono/0.4.19/x86_64-pc-windows-msvc/src/chrono/sys/windows.rs.html#128
2022-05-07 10:30:23 +10:00
Henrik Giesel
df1f7ff96c
Replace sequences of whitespace into single space in AddTags (#1840) 2022-05-07 09:16:57 +10:00
Henrik Giesel
1ec227d926
Make TagAddButton focusable and simulate click on focus (#1838) 2022-05-07 09:15:58 +10:00
Damien Elmes
c8a4e5ea22 Add more progress + abort points to export code
The old `media_files_did_export` hook has been kept around for use with
the legacy apkg exporter (an add-on uses it), and a new 
`legacy_export_progress` hook has been added so we can get progress
from the new colpkg exporter until we move over fully to the new code.
2022-05-06 15:32:23 +10:00
Damien Elmes
228b4331c3 Update translations 2022-05-06 09:27:15 +10:00
RumovZ
99c4ec93d2
Fix some apkg import issues (#1836)
* Allow gathering of orphaned decks

* Skip redundant media checking in apkg import
2022-05-06 09:22:15 +10:00
Damien Elmes
6a95141fd9 Accept .zip as an alias for .apkg
The legacy importer does this already, because some web servers and
clients sniff the content type of .apkg files, and "helpfully" rename
them to .zip
2022-05-05 21:25:59 +10:00
Damien Elmes
72389b97be Show a user-facing message instead of a traceback on invalid file type
While our importing dialog limits the types of files that can be selected,
users can also import by providing a filename on the command line.
2022-05-05 21:24:12 +10:00
Damien Elmes
ac1cbaf719 Fix implicit transaction not being cleared on transact() failure
"release foo" clears the implicit outer transaction, but "rollback to foo"
does not.
2022-05-05 13:39:41 +10:00
Damien Elmes
1297beff63 Minor progress tweaks to apkg importing
- Set progress as soon as possible; previously the extracting and
gathering steps happened prior to the first progress.
- Add "extracting" and "gathering" progress steps, so that large imports
show more feedback in the early stage, and can be more quickly
interrupted.
2022-05-05 12:23:05 +10:00
Damien Elmes
bc6ede7c11 Fix & showing up in MathJax
https://forums.ankiweb.net/t/anki-2-1-52-release-candidate/19412/22

Accidentally introduced in #1818
2022-05-03 14:21:31 +10:00
Damien Elmes
fdbe211539 Support new import code in drag/drop + file double-click cases
https://forums.ankiweb.net/t/anki-2-1-52-release-candidate/19412/24
2022-05-03 14:09:40 +10:00
Matthias Metelka
567b05b731
Fix scrollbars showing on bottom bar (#1833) 2022-05-03 13:57:33 +10:00