anki/ftl
RumovZ e759885734
Backend colpkg exporting (#1719)
* Implement colpkg exporting on backend

* Use exporting logic in backup.rs

* Refactor exporting.rs

* Add backend function to export collection

* Refactor backend/collection.rs

* Use backend for colpkg exporting

* Don't use default zip compression for media

* Add exporting progress

* Refactor media file writing

* Write dummy collections

* Localize dummy collection note

* Minimize dummy db size

* Use `NamedTempFile::new()` instead of `new_in`

* Drop redundant v2 dummy collection

* COLLECTION_VERSION -> PACKAGE_VERSION

* Split `lock_collection()` into two to drop flag

* Expose new colpkg in GUI

* Improve dummy collection message

* Please type checker

* importing-colpkg-too-new -> exporting-...

* Compress the media map in the v3 package (dae)

On collections with lots of media, it can grow into megabytes.

Also return an error in extract_media_file_names(), instead of masking
it as an optional.

* Store media map as a vector in the v3 package (dae)

This compresses better (eg 280kb original, 100kb hashmap, 42kb vec)

In the colpkg import case we don't need random access. When importing
an apkg, we will need to be able to fetch file data for a given media
filename, but the existing map doesn't help us there, as we need
filename->index, not index->filename.

* Ensure folders in the media dir don't break the file mapping (dae)
2022-03-15 16:48:02 +10:00
..
core Backend colpkg exporting (#1719) 2022-03-15 16:48:02 +10:00
qt View menu (#1668) 2022-02-17 16:31:46 +10:00
usage Garbage collect unused Fluent strings (#1482) 2021-11-12 18:19:01 +10:00
BUILD.bazel fix missing dependencies on ftl:sync 2021-10-26 08:30:13 +10:00
duplicate-string.py run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
extract-strings.py run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
format_check.py run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
format.py run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
README.md fix documentation links 2021-06-03 16:51:03 +10:00
remove-unused.sh Garbage collect unused Fluent strings (#1482) 2021-11-12 18:19:01 +10:00
sync.py Tweak ftl:sync paths 2022-02-25 17:24:52 +10:00
transform-string.py run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
update-ankimobile-usage.sh Garbage collect unused Fluent strings (#1482) 2021-11-12 18:19:01 +10:00
update-desktop-usage.sh Garbage collect unused Fluent strings (#1482) 2021-11-12 18:19:01 +10:00

Files related to Anki's translations.

Please see https://translating.ankiweb.net/anki/developers