parent
4c82687640
commit
0b17c608d1
@ -1,8 +1,21 @@
|
|||||||
FROM python:3.9-slim
|
FROM python:3.9-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git
|
RUN apt-get update && apt-get install -y git texlive-latex-extra texlive-lang-chinese python3 python3-pip
|
||||||
|
# RUN apt-get update && apt-get install -y git texlive-latex-extra texlive-lang-chinese python3 python3-pip texlive-lang-european
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
texlive-lang-european \
|
||||||
|
texlive \
|
||||||
|
texlive-latex-extra \
|
||||||
|
texlive-fonts-recommended \
|
||||||
|
texlive-fonts-extra \
|
||||||
|
texlive-pictures \
|
||||||
|
texlive-science
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# CMD om de container niet direct te stoppen
|
# CMD om de container niet direct te stoppen
|
||||||
CMD ["sleep", "infinity"]
|
CMD ["sleep", "infinity"]
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Maak sleutelmap aan
|
||||||
|
mkdir -p ~/.apt/keyrings
|
||||||
|
|
||||||
|
# Voeg sleutels toe
|
||||||
|
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x04EE7237B7D453EC | tee ~/.apt/keyrings/debian.asc
|
||||||
|
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x648ACFD622F3D138 | tee ~/.apt/keyrings/debian.asc
|
||||||
|
|
||||||
|
# Voeg de repositories toe aan de apt-bronlijst
|
||||||
|
echo "deb [signed-by=$HOME/.apt/keyrings/debian.asc] http://deb.debian.org/debian bookworm main contrib non-free" > ~/.apt/sources.list.d/debian.list
|
||||||
|
echo "deb [signed-by=$HOME/.apt/keyrings/debian.asc] http://security.debian.org/debian-security bookworm-security main contrib non-free" >> ~/.apt/sources.list.d/debian.list
|
||||||
|
echo "deb [signed-by=$HOME/.apt/keyrings/debian.asc] http://deb.debian.org/debian bookworm-updates main contrib non-free" >> ~/.apt/sources.list.d/debian.list
|
||||||
|
|
||||||
|
# Werk apt bij
|
||||||
|
apt-get update --allow-unauthenticated
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
\relax
|
||||||
|
\providecommand\babel@aux[2]{}
|
||||||
|
\@nameuse{bbl@beforestart}
|
||||||
|
\catcode `"\active
|
||||||
|
\babel@aux{dutch}{}
|
||||||
|
\gdef \@abspage@last{22}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,46 @@
|
|||||||
|
import csv
|
||||||
|
|
||||||
|
# Instellingen
|
||||||
|
input_csv = "flashcards.csv"
|
||||||
|
output_tex = "flashcards.tex"
|
||||||
|
|
||||||
|
# LaTeX-header
|
||||||
|
latex_header = r"""
|
||||||
|
\documentclass[a4paper]{article}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[dutch]{babel}
|
||||||
|
\usepackage{flashcards}
|
||||||
|
\usepackage{geometry}
|
||||||
|
\geometry{a4paper, margin=1cm}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\section*{Chinese Flashcards}
|
||||||
|
"""
|
||||||
|
|
||||||
|
# LaTeX-footer
|
||||||
|
latex_footer = r"""
|
||||||
|
\end{document}
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Lees CSV en genereer LaTeX-flashcards
|
||||||
|
flashcards = []
|
||||||
|
with open(input_csv, newline='', encoding='utf-8') as csvfile:
|
||||||
|
reader = csv.reader(csvfile)
|
||||||
|
next(reader) # Sla de header over
|
||||||
|
for row in reader:
|
||||||
|
karakter, pinyin, betekenis = row
|
||||||
|
flashcards.append(
|
||||||
|
f"\\begin{{flashcard}}{{{karakter}}}\n"
|
||||||
|
f"\\textbf{{Pinyin:}} {pinyin}\\\\[0.5em]\n"
|
||||||
|
f"\\textbf{{Betekenis:}} {betekenis}\n"
|
||||||
|
f"\\end{{flashcard}}\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Schrijf de LaTeX-uitvoer naar een bestand
|
||||||
|
with open(output_tex, "w", encoding="utf-8") as texfile:
|
||||||
|
texfile.write(latex_header)
|
||||||
|
texfile.writelines(flashcards)
|
||||||
|
texfile.write(latex_footer)
|
||||||
|
|
||||||
|
print(
|
||||||
|
f"LaTeX-bestand '{output_tex}' gegenereerd. Compileer dit met pdflatex om een PDF te maken: pdflatex {output_tex}")
|
||||||
@ -0,0 +1 @@
|
|||||||
|
pandas
|
||||||
@ -1,88 +0,0 @@
|
|||||||
2025-01-30 08:11:07,499 - qrcodegen.py - Script gestart voor platform: spotify. CSV bestand: nummers.csv, Output PDF: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:11:07,572 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:07,695 - qrcodegen.py - URL voor 'Bohemian Rhapsody - Queen' gevonden.
|
|
||||||
2025-01-30 08:11:07,770 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:08,043 - qrcodegen.py - URL voor 'Roller Coaster - Danny Vera' gevonden.
|
|
||||||
2025-01-30 08:11:08,110 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:08,231 - qrcodegen.py - URL voor 'Hotel California - Eagles' gevonden.
|
|
||||||
2025-01-30 08:11:08,312 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:08,437 - qrcodegen.py - URL voor 'Piano Man - Billy Joel' gevonden.
|
|
||||||
2025-01-30 08:11:08,518 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:08,694 - qrcodegen.py - URL voor 'Fix You - Coldplay' gevonden.
|
|
||||||
2025-01-30 08:11:08,774 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:08,920 - qrcodegen.py - URL voor 'Stairway To Heaven - Led Zeppelin' gevonden.
|
|
||||||
2025-01-30 08:11:08,995 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:09,110 - qrcodegen.py - URL voor 'Black - Pearl Jam' gevonden.
|
|
||||||
2025-01-30 08:11:09,188 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:09,328 - qrcodegen.py - URL voor 'Avond - Boudewijn de Groot' gevonden.
|
|
||||||
2025-01-30 08:11:09,401 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:09,525 - qrcodegen.py - URL voor 'Nothing Else Matters (Albumversie) - Metallica' gevonden.
|
|
||||||
2025-01-30 08:11:09,595 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:11:09,715 - qrcodegen.py - URL voor 'Love Of My Life - Queen' gevonden.
|
|
||||||
2025-01-30 08:11:09,729 - qrcodegen.py - PDF succesvol gegenereerd: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:12:59,529 - qrcodegen.py - Script gestart voor platform: spotify. CSV bestand: nummers.csv, Output PDF: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:12:59,597 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:12:59,709 - qrcodegen.py - URL voor 'Bohemian Rhapsody - Queen' gevonden.
|
|
||||||
2025-01-30 08:12:59,806 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:12:59,978 - qrcodegen.py - URL voor 'Roller Coaster - Danny Vera' gevonden.
|
|
||||||
2025-01-30 08:13:00,061 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:00,180 - qrcodegen.py - URL voor 'Hotel California - Eagles' gevonden.
|
|
||||||
2025-01-30 08:13:00,256 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:00,380 - qrcodegen.py - URL voor 'Piano Man - Billy Joel' gevonden.
|
|
||||||
2025-01-30 08:13:00,449 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:00,572 - qrcodegen.py - URL voor 'Fix You - Coldplay' gevonden.
|
|
||||||
2025-01-30 08:13:00,644 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:00,756 - qrcodegen.py - URL voor 'Stairway To Heaven - Led Zeppelin' gevonden.
|
|
||||||
2025-01-30 08:13:00,816 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:00,964 - qrcodegen.py - URL voor 'Black - Pearl Jam' gevonden.
|
|
||||||
2025-01-30 08:13:01,040 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:01,167 - qrcodegen.py - URL voor 'Avond - Boudewijn de Groot' gevonden.
|
|
||||||
2025-01-30 08:13:01,253 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:01,371 - qrcodegen.py - URL voor 'Nothing Else Matters (Albumversie) - Metallica' gevonden.
|
|
||||||
2025-01-30 08:13:01,458 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:01,614 - qrcodegen.py - URL voor 'Love Of My Life - Queen' gevonden.
|
|
||||||
2025-01-30 08:13:01,638 - qrcodegen.py - PDF succesvol gegenereerd: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:13:52,844 - qrcodegen.py - Script gestart voor platform: spotify. CSV bestand: nummers.csv, Output PDF: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:13:52,936 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:53,050 - qrcodegen.py - URL voor 'Bohemian Rhapsody - Queen' gevonden.
|
|
||||||
2025-01-30 08:13:53,136 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:53,262 - qrcodegen.py - URL voor 'Roller Coaster - Danny Vera' gevonden.
|
|
||||||
2025-01-30 08:13:53,353 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:53,491 - qrcodegen.py - URL voor 'Hotel California - Eagles' gevonden.
|
|
||||||
2025-01-30 08:13:53,562 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:53,678 - qrcodegen.py - URL voor 'Piano Man - Billy Joel' gevonden.
|
|
||||||
2025-01-30 08:13:53,750 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:53,904 - qrcodegen.py - URL voor 'Fix You - Coldplay' gevonden.
|
|
||||||
2025-01-30 08:13:53,977 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:54,103 - qrcodegen.py - URL voor 'Stairway To Heaven - Led Zeppelin' gevonden.
|
|
||||||
2025-01-30 08:13:54,175 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:54,350 - qrcodegen.py - URL voor 'Black - Pearl Jam' gevonden.
|
|
||||||
2025-01-30 08:13:54,429 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:54,540 - qrcodegen.py - URL voor 'Avond - Boudewijn de Groot' gevonden.
|
|
||||||
2025-01-30 08:13:54,612 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:54,739 - qrcodegen.py - URL voor 'Nothing Else Matters (Albumversie) - Metallica' gevonden.
|
|
||||||
2025-01-30 08:13:54,812 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:13:54,976 - qrcodegen.py - URL voor 'Love Of My Life - Queen' gevonden.
|
|
||||||
2025-01-30 08:13:54,999 - qrcodegen.py - PDF succesvol gegenereerd: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:14:55,877 - qrcodegen.py - Script gestart voor platform: spotify. CSV bestand: nummers.csv, Output PDF: nummers_met_qr.pdf
|
|
||||||
2025-01-30 08:14:55,941 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:56,058 - qrcodegen.py - URL voor 'Bohemian Rhapsody - Queen' gevonden.
|
|
||||||
2025-01-30 08:14:56,146 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:56,264 - qrcodegen.py - URL voor 'Roller Coaster - Danny Vera' gevonden.
|
|
||||||
2025-01-30 08:14:56,342 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:56,454 - qrcodegen.py - URL voor 'Hotel California - Eagles' gevonden.
|
|
||||||
2025-01-30 08:14:56,519 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:56,698 - qrcodegen.py - URL voor 'Piano Man - Billy Joel' gevonden.
|
|
||||||
2025-01-30 08:14:56,775 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:56,896 - qrcodegen.py - URL voor 'Fix You - Coldplay' gevonden.
|
|
||||||
2025-01-30 08:14:56,983 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:57,122 - qrcodegen.py - URL voor 'Stairway To Heaven - Led Zeppelin' gevonden.
|
|
||||||
2025-01-30 08:14:57,196 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:57,330 - qrcodegen.py - URL voor 'Black - Pearl Jam' gevonden.
|
|
||||||
2025-01-30 08:14:57,408 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:57,532 - qrcodegen.py - URL voor 'Avond - Boudewijn de Groot' gevonden.
|
|
||||||
2025-01-30 08:14:57,613 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:57,740 - qrcodegen.py - URL voor 'Nothing Else Matters (Albumversie) - Metallica' gevonden.
|
|
||||||
2025-01-30 08:14:57,828 - qrcodegen.py - Succesvol Spotify toegangstoken verkregen.
|
|
||||||
2025-01-30 08:14:57,973 - qrcodegen.py - URL voor 'Love Of My Life - Queen' gevonden.
|
|
||||||
2025-01-30 08:14:57,998 - qrcodegen.py - PDF succesvol gegenereerd: nummers_met_qr.pdf
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,6 +0,0 @@
|
|||||||
pandas
|
|
||||||
qrcode[pil]
|
|
||||||
Pillow
|
|
||||||
reportlab
|
|
||||||
requests
|
|
||||||
python-dotenv
|
|
||||||
Loading…
Reference in new issue