From 767a1bcc0f0799d585d6b157818f58112bee988f Mon Sep 17 00:00:00 2001 From: aglaia Date: Tue, 14 Mar 2023 15:44:29 +0100 Subject: [PATCH] i am merging --- .vscode/launch.json | 18 ++++++++++++++++++ booklet/bookletc.py | 36 +++++++++++++++++++++++++++++++++++ carddeck1/cards.html | 8 +++++++- carddeck1/cards.json | 8 +++++++- carddeck1/deck1.py | 2 +- carddeck1/{ => images}/1.jpg | Bin carddeck1/{ => images}/2.jpg | Bin carddeck1/{ => images}/3.jpg | Bin 8 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 booklet/bookletc.py rename carddeck1/{ => images}/1.jpg (100%) rename carddeck1/{ => images}/2.jpg (100%) rename carddeck1/{ => images}/3.jpg (100%) diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..efb2347 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "name": "Python: Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "justMyCode": true, + "cwd": "${workspaceFolder}/${relativeFileDirname}" + } + ] +} \ No newline at end of file diff --git a/booklet/bookletc.py b/booklet/bookletc.py new file mode 100644 index 0000000..6c534a2 --- /dev/null +++ b/booklet/bookletc.py @@ -0,0 +1,36 @@ +from glob import glob +import os +files = glob("content/**", recursive=True) +print(files) +print("----------") + +for file in files: + #print(file) + if file.endswith(".md"): + print(file) + + html_file = file.replace(".md" , ".html") + pandoc_cmd = "pandoc -f markdown -t html" + file + "-o " + + os.system(pandoc_cmd) + print("html file saved!") + + +html_files = glob("content/**", recursive=True) +print("----------") + +all_html = "" + +for html_file in html_files: + if file.endswith(".html"): + print(html_file) +#open the html file and read teh content + html = open(html_file).read() + +# add this content to all_html + all_html += html + + print("------------") + print(all_html) + + output = open() \ No newline at end of file diff --git a/carddeck1/cards.html b/carddeck1/cards.html index ce3fac6..4ad0a2c 100644 --- a/carddeck1/cards.html +++ b/carddeck1/cards.html @@ -18,7 +18,7 @@

panopticon

-

+

The panopticon is a design of institutional building with an inbuilt system of control!

@@ -27,6 +27,12 @@

2. Ilkyaz agini degerlendirmek ve beslemek Genç yazarlarla iletişim kurmak ve İlkyazi tanitmak,
davet etmek.Edebiyat ve sanat çevrelerini ortaklaştirmak adina fikir verme ve oluşturma.

+
+

gezi

+

+

these are the protests in 2013

+
+ diff --git a/carddeck1/cards.json b/carddeck1/cards.json index bc92a09..1da19df 100644 --- a/carddeck1/cards.json +++ b/carddeck1/cards.json @@ -7,11 +7,17 @@ { "name" : "panopticon", "text" : "The panopticon is a design of institutional building with an inbuilt system of control!", - "image": "2.png" + "image": "2.jpg" }, { "name" : "", "text" : "2. Ilkyaz agini degerlendirmek ve beslemek Genç yazarlarla iletişim kurmak ve İlkyazi tanitmak,
davet etmek.Edebiyat ve sanat çevrelerini ortaklaştirmak adina fikir verme ve oluşturma.", "image": "" + }, + { + "name" : "gezi", + "text" : "these are the protests in 2013", + "image": "3.jpg" }] + } \ No newline at end of file diff --git a/carddeck1/deck1.py b/carddeck1/deck1.py index 07c9909..ed062e6 100644 --- a/carddeck1/deck1.py +++ b/carddeck1/deck1.py @@ -1,7 +1,7 @@ import os , json folder = "./images/" #load the json information -with open ("cards.json", "r") as collage: +with open("cards.json", "r") as collage: cards = json.load(collage) #html diff --git a/carddeck1/1.jpg b/carddeck1/images/1.jpg similarity index 100% rename from carddeck1/1.jpg rename to carddeck1/images/1.jpg diff --git a/carddeck1/2.jpg b/carddeck1/images/2.jpg similarity index 100% rename from carddeck1/2.jpg rename to carddeck1/images/2.jpg diff --git a/carddeck1/3.jpg b/carddeck1/images/3.jpg similarity index 100% rename from carddeck1/3.jpg rename to carddeck1/images/3.jpg