feat(learn): Markdown files beside the PDFs, read formatted

A studyset's files take Markdown (.md, .markdown) as well as PDFs, in
the same synced rows with a kind (payload schema 3, written only for
Markdown, so older apps skip those rows). Upload a PDF becomes Upload a
file; a Markdown file must be UTF-8 text.

The reader opens one formatted and read-only through the editor's
Markdown reader, keeping fenced code, which that reader drops; the file
itself never changes, and its source text is a tap away, selectable too.
It has neither search, zoom nor screenshots. It reads in 100 parts by
its top-level blocks, so reading progress, deadlines and the cards and
notes tied to a place work as a PDF's pages do, shown as a share; its
outermost headings are its chapters.

Whats-New: Upload Markdown files beside your PDFs: they open formatted, with reading progress, deadlines and flashcards from what you select.
Whats-New-De: Lade Markdown-Dateien neben deine PDFs hoch: Sie öffnen sich formatiert, mit Lesefortschritt, Fristen und Karteikarten aus deiner Auswahl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-10 21:30:46 +01:00
commit 151f848360
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
5 changed files with 1460 additions and 195 deletions

View file

@ -281,7 +281,7 @@
"studysetNotesInTopics": "Die Notizen sind in seinen Themen",
"studysetNotesInTopicsHint": "Oder schreib hier eine: „Material hinzufügen → Notiz erstellen“.",
"studysetFilesInTopics": "Die Dateien sind in seinen Themen",
"studysetFilesInTopicsHint": "Oder füg hier eine hinzu: „Material hinzufügen → PDF hochladen“.",
"studysetFilesInTopicsHint": "Oder füg hier eine hinzu: „Material hinzufügen → Datei hochladen“.",
"studysetBrowseAllFlashcards": "{count, plural, =1{Ansehen} other{Alle {count} ansehen}}",
"studysetCreateFlashcards": "Karteikarten erstellen",
"studysetStudy": "Lernen",
@ -1153,8 +1153,8 @@
"studyButtonGone": "Dieses Lernset gibt es nicht mehr.",
"pdfPageField": "PDF-Seite",
"studysetTabFiles": "Dateien",
"pdfUploadMenu": "PDF hochladen",
"pdfFileType": "PDFs",
"pdfUploadMenu": "Datei hochladen",
"pdfFileType": "PDFs und Markdown",
"pdfAdded": "„{title}“ hinzugefügt.",
"pdfNotPdf": "Diese Datei ist kein PDF.",
"pdfTooLarge": "Dieses PDF ist größer als {megabytes} MB.",
@ -1163,7 +1163,7 @@
"pdfDuplicateKeep": "Vorhandenes behalten",
"pdfDuplicateAdd": "Kopie hinzufügen",
"filesEmpty": "Noch keine Dateien",
"filesEmptyHint": "Nutze „Material hinzufügen → PDF hochladen“, um eines hinzuzufügen.",
"filesEmptyHint": "Nutze „Material hinzufügen → Datei hochladen“, um eines hinzuzufügen.",
"filesSort": "Sortieren",
"filesSortCustom": "Eigene Reihenfolge",
"filesSortName": "Name (A–Z)",
@ -2182,5 +2182,25 @@
"pathViewSteps": "Schritte",
"pathViewScroll": "Scrollen",
"runnerOutline": "Gliederung",
"runnerScrollLocked": "Beantworte die Frage oben, um weiterzumachen."
"runnerScrollLocked": "Beantworte die Frage oben, um weiterzumachen.",
"markdownNotText": "Diese Datei ist kein Markdown-Text in UTF-8.",
"markdownTooLarge": "Diese Markdown-Datei ist größer als {megabytes} MB.",
"markdownShare": "{percent} %",
"markdownAt": "Bei {percent} %",
"readerByPlace": "Stelle",
"proposalsFromPart": "Aus diesem Abschnitt",
"readerReferencedShare": "Referenzierte Stelle: {percent} %",
"readerUseCurrentShare": "Aktuelle verwenden ({percent} %)",
"progressMarkdownShare": "{percent} % gelesen",
"markdownDeadlineUpcoming": "Beginnt in {days, plural, =1{1 Tag} other{{days} Tagen}} – {percent} %/Tag geplant",
"markdownDeadlinePassed": "Frist abgelaufen – noch {percent} %",
"markdownDeadlineToday": "Heute fällig – noch {percent} %",
"markdownDeadlinePace": "{percent} %/Tag, um in {days, plural, =1{1 Tag} other{{days} Tagen}} {target} % zu erreichen",
"markdownDeadlineHelp": "Lies bis zu einem Tag einen Teil der Datei. Der Fortschritt folgt der weitesten Stelle, bis zu der du beim Lesen scrollst.",
"markdownDeadlineReach": "Erreichen (%)",
"markdownDeadlineChapterEntry": "{title} · bis {percent} %",
"markdownToShareToday": "heute bis {percent} %",
"markdownDeadlinesProgress": "{furthest} %/{target} % · {when}",
"readerShowSource": "Quelltext zeigen",
"readerShowFormatted": "Formatiert zeigen"
}

View file

@ -330,7 +330,7 @@
"studysetNotesInTopics": "The notes are in its topics",
"studysetNotesInTopicsHint": "Or write one here: \"Add material → Create a note\".",
"studysetFilesInTopics": "The files are in its topics",
"studysetFilesInTopicsHint": "Or add one here: \"Add material → Upload a PDF\".",
"studysetFilesInTopicsHint": "Or add one here: \"Add material → Upload a file\".",
"studysetBrowseAllFlashcards": "{count, plural, =1{Browse it} other{Browse all {count}}}",
"@studysetBrowseAllFlashcards": {"description": "Opens the card browser on every flashcard of a studyset's topics.", "placeholders": {"count": {"type": "int"}}},
"studysetCreateFlashcards": "Create flashcards",
@ -1326,8 +1326,8 @@
"studyButtonGone": "That studyset no longer exists.",
"pdfPageField": "PDF page",
"studysetTabFiles": "Files",
"pdfUploadMenu": "Upload a PDF",
"pdfFileType": "PDFs",
"pdfUploadMenu": "Upload a file",
"pdfFileType": "PDFs and Markdown",
"pdfAdded": "Added \"{title}\".",
"@pdfAdded": {"placeholders": {"title": {"type": "String"}}},
"pdfNotPdf": "This file isn't a PDF.",
@ -1339,7 +1339,7 @@
"pdfDuplicateKeep": "Keep the one there",
"pdfDuplicateAdd": "Add a copy",
"filesEmpty": "No files yet",
"filesEmptyHint": "Use \"Add material → Upload a PDF\" to add one.",
"filesEmptyHint": "Use \"Add material → Upload a file\" to add one.",
"filesSort": "Sort",
"filesSortCustom": "Custom order",
"filesSortName": "Name (A–Z)",
@ -2690,5 +2690,45 @@
"runnerOutline": "Outline",
"@runnerOutline": {"description": "The list of a learning path's steps beside or over its page in the Scroll view."},
"runnerScrollLocked": "Answer the question above to go on.",
"@runnerScrollLocked": {"description": "Below the question a learning path's page stops at, in the Scroll view."}
"@runnerScrollLocked": {"description": "Below the question a learning path's page stops at, in the Scroll view."},
"markdownNotText": "This file isn't Markdown text in UTF-8.",
"@markdownNotText": {"description": "A file named .md or .markdown that couldn't be read as text."},
"markdownTooLarge": "This Markdown file is larger than {megabytes} MB.",
"@markdownTooLarge": {"description": "A Markdown file over the server's limit for files.", "placeholders": {"megabytes": {"type": "int"}}},
"markdownShare": "{percent}%",
"@markdownShare": {"description": "How much of a Markdown file is read, or where in it something is, in percent", "placeholders": {"percent": {"type": "int"}}},
"markdownAt": "At {percent}%",
"@markdownAt": {"description": "Where in a Markdown file the cards or the note below are: a heading in the reader's panels", "placeholders": {"percent": {"type": "int"}}},
"readerByPlace": "Place",
"@readerByPlace": {"description": "Segment in a Markdown file's cards panel: the cards grouped by where in the file they are (as Page does for PDFs)"},
"proposalsFromPart": "From this part",
"@proposalsFromPart": {"description": "Button in a Markdown file's cards panel: an assistant proposes flashcards from the part of the file in view"},
"readerReferencedShare": "Referenced place: {percent}%",
"@readerReferencedShare": {"description": "Below a card being written beside a Markdown file: where in the file it is tied to", "placeholders": {"percent": {"type": "int"}}},
"readerUseCurrentShare": "Use current ({percent}%)",
"@readerUseCurrentShare": {"description": "Button: ties the card to the place in the Markdown file in view", "placeholders": {"percent": {"type": "int"}}},
"progressMarkdownShare": "{percent}% read",
"@progressMarkdownShare": {"description": "A studyset's Progress: how much of a Markdown file is read", "placeholders": {"percent": {"type": "int"}}},
"markdownDeadlineUpcoming": "Starts in {days, plural, =1{1 day} other{{days} days}} — {percent}%/day planned",
"@markdownDeadlineUpcoming": {"description": "A Markdown file's reading deadline not started yet", "placeholders": {"days": {"type": "int"}, "percent": {"type": "int"}}},
"markdownDeadlinePassed": "Deadline passed — {percent}% left",
"@markdownDeadlinePassed": {"description": "A Markdown file's reading deadline that passed", "placeholders": {"percent": {"type": "int"}}},
"markdownDeadlineToday": "Due today — {percent}% left",
"@markdownDeadlineToday": {"description": "A Markdown file's reading deadline due today", "placeholders": {"percent": {"type": "int"}}},
"markdownDeadlinePace": "{percent}%/day to reach {target}% in {days, plural, =1{1 day} other{{days} days}}",
"@markdownDeadlinePace": {"description": "A Markdown file's reading deadline on its way: how much to read a day", "placeholders": {"percent": {"type": "int"}, "target": {"type": "int"}, "days": {"type": "int"}}},
"markdownDeadlineHelp": "Read a share of the file by a day. Progress follows the furthest you scroll as you read.",
"@markdownDeadlineHelp": {"description": "Help in the deadline sheet of a Markdown file"},
"markdownDeadlineReach": "Reach (%)",
"@markdownDeadlineReach": {"description": "Field in the deadline sheet of a Markdown file: the share to reach, in percent"},
"markdownDeadlineChapterEntry": "{title} · to {percent}%",
"@markdownDeadlineChapterEntry": {"description": "A heading of a Markdown file offered as a deadline's target, with the share it ends at", "placeholders": {"title": {"type": "String"}, "percent": {"type": "int"}}},
"markdownToShareToday": "to {percent}% today",
"@markdownToShareToday": {"description": "Chip on a Markdown file's deadline: how far to read today", "placeholders": {"percent": {"type": "int"}}},
"markdownDeadlinesProgress": "{furthest}%/{target}% · {when}",
"@markdownDeadlinesProgress": {"description": "A Markdown file's deadline: how far it is read of the share to reach, and when", "placeholders": {"furthest": {"type": "int"}, "target": {"type": "int"}, "when": {"type": "String"}}},
"readerShowSource": "Show the source text",
"@readerShowSource": {"description": "Tooltip: shows a Markdown file as written, rather than formatted"},
"readerShowFormatted": "Show it formatted",
"@readerShowFormatted": {"description": "Tooltip: shows a Markdown file formatted again, after its source text"}
}

View file

@ -1729,7 +1729,7 @@ abstract class AppLocalizations {
/// No description provided for @studysetFilesInTopicsHint.
///
/// In en, this message translates to:
/// **'Or add one here: \"Add material → Upload a PDF\".'**
/// **'Or add one here: \"Add material → Upload a file\".'**
String get studysetFilesInTopicsHint;
/// Opens the card browser on every flashcard of a studyset's topics.
@ -6793,13 +6793,13 @@ abstract class AppLocalizations {
/// No description provided for @pdfUploadMenu.
///
/// In en, this message translates to:
/// **'Upload a PDF'**
/// **'Upload a file'**
String get pdfUploadMenu;
/// No description provided for @pdfFileType.
///
/// In en, this message translates to:
/// **'PDFs'**
/// **'PDFs and Markdown'**
String get pdfFileType;
/// No description provided for @pdfAdded.
@ -6853,7 +6853,7 @@ abstract class AppLocalizations {
/// No description provided for @filesEmptyHint.
///
/// In en, this message translates to:
/// **'Use \"Add material → Upload a PDF\" to add one.'**
/// **'Use \"Add material → Upload a file\" to add one.'**
String get filesEmptyHint;
/// No description provided for @filesSort.
@ -12877,6 +12877,126 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Answer the question above to go on.'**
String get runnerScrollLocked;
/// A file named .md or .markdown that couldn't be read as text.
///
/// In en, this message translates to:
/// **'This file isn\'t Markdown text in UTF-8.'**
String get markdownNotText;
/// A Markdown file over the server's limit for files.
///
/// In en, this message translates to:
/// **'This Markdown file is larger than {megabytes} MB.'**
String markdownTooLarge(int megabytes);
/// How much of a Markdown file is read, or where in it something is, in percent
///
/// In en, this message translates to:
/// **'{percent}%'**
String markdownShare(int percent);
/// Where in a Markdown file the cards or the note below are: a heading in the reader's panels
///
/// In en, this message translates to:
/// **'At {percent}%'**
String markdownAt(int percent);
/// Segment in a Markdown file's cards panel: the cards grouped by where in the file they are (as Page does for PDFs)
///
/// In en, this message translates to:
/// **'Place'**
String get readerByPlace;
/// Button in a Markdown file's cards panel: an assistant proposes flashcards from the part of the file in view
///
/// In en, this message translates to:
/// **'From this part'**
String get proposalsFromPart;
/// Below a card being written beside a Markdown file: where in the file it is tied to
///
/// In en, this message translates to:
/// **'Referenced place: {percent}%'**
String readerReferencedShare(int percent);
/// Button: ties the card to the place in the Markdown file in view
///
/// In en, this message translates to:
/// **'Use current ({percent}%)'**
String readerUseCurrentShare(int percent);
/// A studyset's Progress: how much of a Markdown file is read
///
/// In en, this message translates to:
/// **'{percent}% read'**
String progressMarkdownShare(int percent);
/// A Markdown file's reading deadline not started yet
///
/// In en, this message translates to:
/// **'Starts in {days, plural, =1{1 day} other{{days} days}} — {percent}%/day planned'**
String markdownDeadlineUpcoming(int days, int percent);
/// A Markdown file's reading deadline that passed
///
/// In en, this message translates to:
/// **'Deadline passed — {percent}% left'**
String markdownDeadlinePassed(int percent);
/// A Markdown file's reading deadline due today
///
/// In en, this message translates to:
/// **'Due today — {percent}% left'**
String markdownDeadlineToday(int percent);
/// A Markdown file's reading deadline on its way: how much to read a day
///
/// In en, this message translates to:
/// **'{percent}%/day to reach {target}% in {days, plural, =1{1 day} other{{days} days}}'**
String markdownDeadlinePace(int percent, int target, int days);
/// Help in the deadline sheet of a Markdown file
///
/// In en, this message translates to:
/// **'Read a share of the file by a day. Progress follows the furthest you scroll as you read.'**
String get markdownDeadlineHelp;
/// Field in the deadline sheet of a Markdown file: the share to reach, in percent
///
/// In en, this message translates to:
/// **'Reach (%)'**
String get markdownDeadlineReach;
/// A heading of a Markdown file offered as a deadline's target, with the share it ends at
///
/// In en, this message translates to:
/// **'{title} · to {percent}%'**
String markdownDeadlineChapterEntry(String title, int percent);
/// Chip on a Markdown file's deadline: how far to read today
///
/// In en, this message translates to:
/// **'to {percent}% today'**
String markdownToShareToday(int percent);
/// A Markdown file's deadline: how far it is read of the share to reach, and when
///
/// In en, this message translates to:
/// **'{furthest}%/{target}% · {when}'**
String markdownDeadlinesProgress(int furthest, int target, String when);
/// Tooltip: shows a Markdown file as written, rather than formatted
///
/// In en, this message translates to:
/// **'Show the source text'**
String get readerShowSource;
/// Tooltip: shows a Markdown file formatted again, after its source text
///
/// In en, this message translates to:
/// **'Show it formatted'**
String get readerShowFormatted;
}
class _AppLocalizationsDelegate

View file

@ -1039,7 +1039,7 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get studysetFilesInTopicsHint =>
'Oder füg hier eine hinzu: „Material hinzufügen → PDF hochladen“.';
'Oder füg hier eine hinzu: „Material hinzufügen → Datei hochladen“.';
@override
String studysetBrowseAllFlashcards(int count) {
@ -4216,10 +4216,10 @@ class AppLocalizationsDe extends AppLocalizations {
String get studysetTabFiles => 'Dateien';
@override
String get pdfUploadMenu => 'PDF hochladen';
String get pdfUploadMenu => 'Datei hochladen';
@override
String get pdfFileType => 'PDFs';
String get pdfFileType => 'PDFs und Markdown';
@override
String pdfAdded(String title) {
@ -4253,7 +4253,7 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get filesEmptyHint =>
'Nutze „Material hinzufügen → PDF hochladen“, um eines hinzuzufügen.';
'Nutze „Material hinzufügen → Datei hochladen“, um eines hinzuzufügen.';
@override
String get filesSort => 'Sortieren';
@ -8224,4 +8224,103 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get runnerScrollLocked =>
'Beantworte die Frage oben, um weiterzumachen.';
@override
String get markdownNotText => 'Diese Datei ist kein Markdown-Text in UTF-8.';
@override
String markdownTooLarge(int megabytes) {
return 'Diese Markdown-Datei ist größer als $megabytes MB.';
}
@override
String markdownShare(int percent) {
return '$percent %';
}
@override
String markdownAt(int percent) {
return 'Bei $percent %';
}
@override
String get readerByPlace => 'Stelle';
@override
String get proposalsFromPart => 'Aus diesem Abschnitt';
@override
String readerReferencedShare(int percent) {
return 'Referenzierte Stelle: $percent %';
}
@override
String readerUseCurrentShare(int percent) {
return 'Aktuelle verwenden ($percent %)';
}
@override
String progressMarkdownShare(int percent) {
return '$percent % gelesen';
}
@override
String markdownDeadlineUpcoming(int days, int percent) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days Tagen',
one: '1 Tag',
);
return 'Beginnt in $_temp0 – $percent %/Tag geplant';
}
@override
String markdownDeadlinePassed(int percent) {
return 'Frist abgelaufen – noch $percent %';
}
@override
String markdownDeadlineToday(int percent) {
return 'Heute fällig – noch $percent %';
}
@override
String markdownDeadlinePace(int percent, int target, int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days Tagen',
one: '1 Tag',
);
return '$percent %/Tag, um in $_temp0 $target % zu erreichen';
}
@override
String get markdownDeadlineHelp =>
'Lies bis zu einem Tag einen Teil der Datei. Der Fortschritt folgt der weitesten Stelle, bis zu der du beim Lesen scrollst.';
@override
String get markdownDeadlineReach => 'Erreichen (%)';
@override
String markdownDeadlineChapterEntry(String title, int percent) {
return '$title · bis $percent %';
}
@override
String markdownToShareToday(int percent) {
return 'heute bis $percent %';
}
@override
String markdownDeadlinesProgress(int furthest, int target, String when) {
return '$furthest %/$target % · $when';
}
@override
String get readerShowSource => 'Quelltext zeigen';
@override
String get readerShowFormatted => 'Formatiert zeigen';
}

View file

@ -1030,7 +1030,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get studysetFilesInTopicsHint =>
'Or add one here: \"Add material → Upload a PDF\".';
'Or add one here: \"Add material → Upload a file\".';
@override
String studysetBrowseAllFlashcards(int count) {
@ -4178,10 +4178,10 @@ class AppLocalizationsEn extends AppLocalizations {
String get studysetTabFiles => 'Files';
@override
String get pdfUploadMenu => 'Upload a PDF';
String get pdfUploadMenu => 'Upload a file';
@override
String get pdfFileType => 'PDFs';
String get pdfFileType => 'PDFs and Markdown';
@override
String pdfAdded(String title) {
@ -4215,7 +4215,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get filesEmptyHint =>
'Use \"Add material → Upload a PDF\" to add one.';
'Use \"Add material → Upload a file\" to add one.';
@override
String get filesSort => 'Sort';
@ -8150,6 +8150,105 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get runnerScrollLocked => 'Answer the question above to go on.';
@override
String get markdownNotText => 'This file isn\'t Markdown text in UTF-8.';
@override
String markdownTooLarge(int megabytes) {
return 'This Markdown file is larger than $megabytes MB.';
}
@override
String markdownShare(int percent) {
return '$percent%';
}
@override
String markdownAt(int percent) {
return 'At $percent%';
}
@override
String get readerByPlace => 'Place';
@override
String get proposalsFromPart => 'From this part';
@override
String readerReferencedShare(int percent) {
return 'Referenced place: $percent%';
}
@override
String readerUseCurrentShare(int percent) {
return 'Use current ($percent%)';
}
@override
String progressMarkdownShare(int percent) {
return '$percent% read';
}
@override
String markdownDeadlineUpcoming(int days, int percent) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Starts in $_temp0 — $percent%/day planned';
}
@override
String markdownDeadlinePassed(int percent) {
return 'Deadline passed — $percent% left';
}
@override
String markdownDeadlineToday(int percent) {
return 'Due today — $percent% left';
}
@override
String markdownDeadlinePace(int percent, int target, int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return '$percent%/day to reach $target% in $_temp0';
}
@override
String get markdownDeadlineHelp =>
'Read a share of the file by a day. Progress follows the furthest you scroll as you read.';
@override
String get markdownDeadlineReach => 'Reach (%)';
@override
String markdownDeadlineChapterEntry(String title, int percent) {
return '$title · to $percent%';
}
@override
String markdownToShareToday(int percent) {
return 'to $percent% today';
}
@override
String markdownDeadlinesProgress(int furthest, int target, String when) {
return '$furthest%/$target% · $when';
}
@override
String get readerShowSource => 'Show the source text';
@override
String get readerShowFormatted => 'Show it formatted';
}
/// The translations for English, as used in the United Kingdom (`en_GB`).