My Problem...
I recently read the wonderful book
In termux you are able to work with python and git. So i came up with a small python project containing of one python script and a markdown file at the moment.
The python file uses the rich library because i can render markdown pretty to the cli (with syntax highlighting).
from rich.console import Console
from rich.markdown import Markdown
def main():
console = Console()
with open("angular.md") as f:
content: str = f.read()
cards: list[str] = content.split('<!-- Card -->')
numberOfCards: int = len(cards)
for card in cards:
console.clear()
sides = card.split('<!-- Sides -->')
console.print(Markdown(sides[0]))
input("\nshow the answer!")
console.print(Markdown(sides[1]))
input("\nnext card!")
console.clear()
if __name__ == "__main__":
main()
The content of my flashcards is stored in a markdown file. I use html comments to seperate the individual cards and the question and the answer on each individual card.
. (The name of the project will change.) S
On my phone i have to clone the repo in termux:
git clone https://github.com/taijidude/mochi-cards.git
Install the needed dependencies (typer is a neat cli framework which brings the rich library as dependency. I use
When hitting enter the answer is shown:
Thank you for your Attention!
SOCIAL SHARE CARD GENERATOR