42cbe42f06
* Add crate csv * Add start of csv importing on backend * Add Menomosyne serializer * Add csv and json importing on backend * Add plaintext importing on frontend * Add csv metadata extraction on backend * Add csv importing with GUI * Fix missing dfa file in build Added compile_data_attr, then re-ran cargo/update.py. * Don't use doubly buffered reader in csv * Escape HTML entities if CSV is not HTML Also use name 'is_html' consistently. * Use decimal number as foreign ease (like '2.5') * ForeignCard.ivl → ForeignCard.interval * Only allow fixed set of CSV delimiters * Map timestamp of ForeignCard to native due time * Don't trim CSV records * Document use of empty strings for defaults * Avoid creating CardGenContexts for every note This requires CardGenContext to be generic, so it works both with an owned and borrowed notetype. * Show all accepted file types in import file picker * Add import_json_file() * factor → ease_factor * delimter_from_value → delimiter_from_value * Map columns to fields, not the other way around * Fallback to current config for csv metadata * Add start of new import csv screen * Temporary fix for compilation issue on Linux/Mac * Disable jest bazel action for import-csv Jest fails with an error code if no tests are available, but this would not be noticable on Windows as Jest is not run there. * Fix field mapping issue * Revert "Temporary fix for compilation issue on Linux/Mac" This reverts commit 21f8a261408cdae49ec031aa21a1b659c4f66d82. * Add HtmlSwitch and move Switch to components * Fix spacing and make selectors consistent * Fix shortcut tooltip * Place import button at the top with path * Fix meta column indices * Remove NotetypeForString * Fix queue and type of foreign cards * Support different dupe resolution strategies * Allow dupe resolution selection when importing CSV * Test import of unnormalized text Close #1863. * Fix logging of foreign notes * Implement CSV exports * Use db_scalar() in notes_table_len() * Rework CSV metadata - Notetypes and decks are either defined by a global id or by a column. - If a notetype id is provided, its field map must also be specified. - If a notetype column is provided, fields are now mapped by index instead of name at import time. So the first non-meta column is used for the first field of every note, regardless of notetype. This makes importing easier and should improve compatiblity with files without a notetype column. - Ensure first field can be mapped to a column. - Meta columns must be defined as `#[meta name]:[column index]` instead of in the `#columns` tag. - Column labels contain the raw names defined by the file and must be prettified by the frontend. * Adjust frontend to new backend column mapping * Add force flags for is_html and delimiter * Detect if CSV is HTML by field content * Update dupe resolution labels * Simplify selectors * Fix coalescence of oneofs in TS * Disable meta columns from selection Plus a lot of refactoring. * Make import button stick to the bottom * Write delimiter and html flag into csv * Refetch field map after notetype change * Fix log labels for csv import * Log notes whose deck/notetype was missing * Fix hiding of empty log queues * Implement adding tags to all notes of a csv * Fix dupe resolution not being set in log * Implement adding tags to updated notes of a csv * Check first note field is not empty * Temporary fix for build on Linux/Mac * Fix inverted html check (dae) * Remove unused ftl string * Delimiter → Separator * Remove commented-out line * Don't accept .json files * Tweak tag ftl strings * Remove redundant blur call * Strip sound and add spaces in csv export * Export HTML by default * Fix unset deck in Mnemosyne import Also accept both numbers and strings for notetypes and decks in JSON. * Make DupeResolution::Update the default * Fix missing dot in extension * Make column indices 1-based * Remove StickContainer from TagEditor Fixes line breaking, border and z index on ImportCsvPage. * Assign different key combos to tag editors * Log all updated duplicates Add a log field for the true number of found notes. * Show identical notes as skipped * Split tag-editor into separate ts module (dae) * Add progress for CSV export * Add progress for text import * Tidy-ups after tag-editor split (dae) - import-csv no longer depends on editor - remove some commented lines
600 lines
9.4 KiB
Python
600 lines
9.4 KiB
Python
"""
|
|
@generated
|
|
cargo-raze generated Bazel file.
|
|
|
|
DO NOT EDIT! Replaced on runs of cargo-raze
|
|
"""
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
licenses([
|
|
"notice", # See individual crates for specific licenses
|
|
])
|
|
|
|
# Aliased targets
|
|
alias(
|
|
name = "ammonia",
|
|
actual = "@raze__ammonia__3_1_4//:ammonia",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "async_trait",
|
|
actual = "@raze__async_trait__0_1_52//:async_trait",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "blake3",
|
|
actual = "@raze__blake3__1_3_1//:blake3",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "bytes",
|
|
actual = "@raze__bytes__1_1_0//:bytes",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "chrono",
|
|
actual = "@raze__chrono__0_4_19//:chrono",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "coarsetime",
|
|
actual = "@raze__coarsetime__0_1_21//:coarsetime",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "csv",
|
|
actual = "@raze__csv__1_1_6//:csv",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "env_logger",
|
|
actual = "@raze__env_logger__0_9_0//:env_logger",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "flate2",
|
|
actual = "@raze__flate2__1_0_22//:flate2",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "fluent",
|
|
actual = "@raze__fluent__0_16_0//:fluent",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "fluent_bundle",
|
|
actual = "@raze__fluent_bundle__0_15_2//:fluent_bundle",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "fluent_syntax",
|
|
actual = "@raze__fluent_syntax__0_11_0//:fluent_syntax",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "fnv",
|
|
actual = "@raze__fnv__1_0_7//:fnv",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "futures",
|
|
actual = "@raze__futures__0_3_21//:futures",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "hex",
|
|
actual = "@raze__hex__0_4_3//:hex",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "htmlescape",
|
|
actual = "@raze__htmlescape__0_3_1//:htmlescape",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "id_tree",
|
|
actual = "@raze__id_tree__1_8_0//:id_tree",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "inflections",
|
|
actual = "@raze__inflections__1_1_1//:inflections",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "intl_memoizer",
|
|
actual = "@raze__intl_memoizer__0_5_1//:intl_memoizer",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "itertools",
|
|
actual = "@raze__itertools__0_10_3//:itertools",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "lazy_static",
|
|
actual = "@raze__lazy_static__1_4_0//:lazy_static",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "linkcheck",
|
|
actual = "@raze__linkcheck__0_4_1_alpha_0//:linkcheck",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "nom",
|
|
actual = "@raze__nom__7_1_1//:nom",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "num_cpus",
|
|
actual = "@raze__num_cpus__1_13_1//:num_cpus",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "num_enum",
|
|
actual = "@raze__num_enum__0_5_7//:num_enum",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "num_format",
|
|
actual = "@raze__num_format__0_4_0//:num_format",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "num_integer",
|
|
actual = "@raze__num_integer__0_1_44//:num_integer",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "once_cell",
|
|
actual = "@raze__once_cell__1_10_0//:once_cell",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "pct_str",
|
|
actual = "@raze__pct_str__1_1_0//:pct_str",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "phf",
|
|
actual = "@raze__phf__0_10_1//:phf",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "pin_project",
|
|
actual = "@raze__pin_project__1_0_10//:pin_project",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "proc_macro_nested",
|
|
actual = "@raze__proc_macro_nested__0_1_7//:proc_macro_nested",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "prost",
|
|
actual = "@raze__prost__0_9_0//:prost",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "prost_build",
|
|
actual = "@raze__prost_build__0_9_0//:prost_build",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "pulldown_cmark",
|
|
actual = "@raze__pulldown_cmark__0_8_0//:pulldown_cmark",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "pyo3",
|
|
actual = "@raze__pyo3__0_15_1//:pyo3",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "rand",
|
|
actual = "@raze__rand__0_8_5//:rand",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "regex",
|
|
actual = "@raze__regex__1_5_5//:regex",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "reqwest",
|
|
actual = "@raze__reqwest__0_11_3//:reqwest",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "rusqlite",
|
|
actual = "@raze__rusqlite__0_26_3//:rusqlite",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "scopeguard",
|
|
actual = "@raze__scopeguard__1_1_0//:scopeguard",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde",
|
|
actual = "@raze__serde__1_0_136//:serde",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde_aux",
|
|
actual = "@raze__serde_aux__3_0_1//:serde_aux",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde_derive",
|
|
actual = "@raze__serde_derive__1_0_136//:serde_derive",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde_json",
|
|
actual = "@raze__serde_json__1_0_79//:serde_json",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde_repr",
|
|
actual = "@raze__serde_repr__0_1_7//:serde_repr",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "serde_tuple",
|
|
actual = "@raze__serde_tuple__0_5_0//:serde_tuple",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "sha1",
|
|
actual = "@raze__sha1__0_6_1//:sha1",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "slog",
|
|
actual = "@raze__slog__2_7_0//:slog",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "slog_async",
|
|
actual = "@raze__slog_async__2_7_0//:slog_async",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "slog_envlogger",
|
|
actual = "@raze__slog_envlogger__2_2_0//:slog_envlogger",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "slog_term",
|
|
actual = "@raze__slog_term__2_9_0//:slog_term",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "strum",
|
|
actual = "@raze__strum__0_23_0//:strum",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "tempfile",
|
|
actual = "@raze__tempfile__3_3_0//:tempfile",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "tokio",
|
|
actual = "@raze__tokio__1_17_0//:tokio",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "tokio_util",
|
|
actual = "@raze__tokio_util__0_6_9//:tokio_util",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "unic_langid",
|
|
actual = "@raze__unic_langid__0_9_0//:unic_langid",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "unic_ucd_category",
|
|
actual = "@raze__unic_ucd_category__0_9_0//:unic_ucd_category",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "unicase",
|
|
actual = "@raze__unicase__2_6_0//:unicase",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "unicode_normalization",
|
|
actual = "@raze__unicode_normalization__0_1_19//:unicode_normalization",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "utime",
|
|
actual = "@raze__utime__0_3_1//:utime",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "walkdir",
|
|
actual = "@raze__walkdir__2_3_2//:walkdir",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "zip",
|
|
actual = "@raze__zip__0_5_13//:zip",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
alias(
|
|
name = "zstd",
|
|
actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd",
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
# Export file for Stardoc support
|
|
exports_files(
|
|
[
|
|
"crates.bzl",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
exports_files(["licenses.json"])
|