-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant upload this file #1178
Comments
Thanks for the example! |
aalemayhu
added a commit
that referenced
this issue
Jul 14, 2023
aalemayhu
added a commit
that referenced
this issue
Jul 14, 2023
The code is ugly as hell but this adds a new fallback parser. For power users who already have an established workflow, this will not introduce any issues but only be triggered when their upload would not create any flashcards. It relies heavily on the format suggested here #1178: The fallback parser takes a bullet list as input and generates one or more flashcards for each bullet point. The bullet points are separated by a blank line (\n). In the bullet point, the question and answer are separated by a dash (-). If there are more answers, f.ex. in the close deletion case, then answers are comma delimited after the dash (answer1, answer, etc.) ## Examples ### Cloze card ``` The capital of France is _____. - Paris. ``` That generates the following flashcard: ``` Front of the card: The capital of France is {{c1::Paris}}. ``` ### Basic card Input: ``` What is the capital of Kosovo? - Pristina ``` Output: ``` Front of the card: What is the capital of Kosovo? Back of the card: Pristina ``` ## Supported formats Note this does not work in the Notion integration but is a fallback mechanism added for people uploading files that are not handled by the current DeckParser. So I am hoping people see the error message about no cards less often with this change. This is a fallback so things like styling and images do not work. Markdown, HTML, and ZIP support work for the fallback parser. But note that there might be some unexpected issues like the styling is not applied and there are cases where the front gets duplicated content. Enjoy!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
new.zip
The text was updated successfully, but these errors were encountered: