Compare commits

...

18 Commits

Author SHA1 Message Date
b481863d47 added Reichard
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 20s
2025-07-30 00:07:49 +02:00
4078f5f83d changed header image
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 40s
2025-07-27 23:01:57 +02:00
42498fe19b removed tests
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 8s
2025-07-19 09:58:31 +02:00
ZbynekDostal
bb7b075657 news update
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 13s
2025-07-19 09:56:34 +02:00
ZbynekDostal
864c0dbddd news update
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 20s
2025-07-19 09:48:46 +02:00
595f8087dc revert test
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 9s
2025-07-17 11:37:25 +02:00
winbloat
285f0cd443 news update
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 13s
2025-07-17 11:36:15 +02:00
2637281af6 revert test
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 19s
2025-07-17 11:35:34 +02:00
winbloat
c27071bdcd news update
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 8s
2025-07-17 11:32:17 +02:00
5d9a306c64 added requirements.txt
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 24s
2025-07-17 11:23:09 +02:00
9c85ee9f2f removed nonsense news
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 8s
2025-07-17 11:10:22 +02:00
967457883a news update
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 19s
2025-07-17 11:07:53 +02:00
e43abc01e6 replace logo with white text
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 24s
2025-07-16 01:57:20 +02:00
d580765162 removed last test news
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 8s
2025-07-16 01:20:51 +02:00
dcc3ee8b55 edit test line
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 14s
2025-07-16 01:19:35 +02:00
c6591219e6 added horizontal line separator
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 18s
2025-07-16 01:15:27 +02:00
52042c4c35 first news + edit.py edit
All checks were successful
Modelari site build and deploy / Build-site (push) Successful in 8s
2025-07-16 01:01:34 +02:00
9a9ac137ef first news 2025-07-16 00:59:39 +02:00
8 changed files with 38 additions and 2 deletions

View File

@@ -20,6 +20,7 @@
<li><a href="about.html">O nás</a></li> <li><a href="about.html">O nás</a></li>
<li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li> <li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li>
<li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li> <li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li>
<li><a href="https://www.reichard.cz/"><img src="img/reichard_white.png" alt="Reichard logo" style="max-width:100%;"></a></li>
</ul> </ul>
</nav> </nav>
</aside> </aside>

View File

@@ -20,6 +20,7 @@
<li><a href="about.html">O nás</a></li> <li><a href="about.html">O nás</a></li>
<li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li> <li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li>
<li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li> <li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li>
<li><a href="https://www.reichard.cz/"><img src="img/reichard_white.png" alt="Reichard logo" style="max-width:100%;"></a></li>
</ul> </ul>
</nav> </nav>
</aside> </aside>

29
edit.py
View File

@@ -3,10 +3,31 @@ from tkinter import messagebox
from tkinter import filedialog from tkinter import filedialog
import os import os
import shutil import shutil
from git import Repo
PATH_OF_GIT_REPO = r'.git'
COMMIT_MESSAGE = 'news update'
HTML_INSERT_TAG = "<!-- INSERT HERE -->" HTML_INSERT_TAG = "<!-- INSERT HERE -->"
uploaded_image_path = None # Global to track uploaded image uploaded_image_path = None # Global to track uploaded image
def git_pull():
try:
repo = Repo(PATH_OF_GIT_REPO)
origin = repo.remotes.origin
origin.pull()
except:
messagebox.showerror("Git error", "Something went wrong while pulling from origin")
def git_push():
try:
repo = Repo(PATH_OF_GIT_REPO)
repo.git.add(update=True)
repo.index.commit(COMMIT_MESSAGE)
origin = repo.remote(name='origin')
origin.push()
except:
messagebox.showerror("Git error", "Something went wrong while pushing to origin")
def upload_image(): def upload_image():
global uploaded_image_path global uploaded_image_path
path = filedialog.askopenfilename( path = filedialog.askopenfilename(
@@ -37,7 +58,7 @@ def submit_content():
# if not html_file_path: # if not html_file_path:
# return # return
html_file_path = './home.html' html_file_path = './index.html'
if not img_lib: if not img_lib:
new_entry = f""" new_entry = f"""
@@ -85,7 +106,7 @@ def submit_content():
return return
full_entry = f"{new_entry}\n{image_tag}" if image_tag else new_entry full_entry = f"{new_entry}\n{image_tag}" if image_tag else new_entry
new_html = html_content.replace(HTML_INSERT_TAG, f"{HTML_INSERT_TAG}\n{full_entry}") new_html = html_content.replace(HTML_INSERT_TAG, f"{HTML_INSERT_TAG}\n{full_entry}\n<hr>")
with open(html_file_path, 'w', encoding='utf-8') as f: with open(html_file_path, 'w', encoding='utf-8') as f:
f.write(new_html) f.write(new_html)
@@ -94,6 +115,8 @@ def submit_content():
except Exception as e: except Exception as e:
messagebox.showerror("Error", str(e)) messagebox.showerror("Error", str(e))
git_push()
# GUI Setup # GUI Setup
root = tk.Tk() root = tk.Tk()
@@ -122,5 +145,7 @@ img_lib_text.pack(padx=10, pady=5)
submit_button = tk.Button(root, text="Submit to HTML", command=submit_content) submit_button = tk.Button(root, text="Submit to HTML", command=submit_content)
submit_button.pack(pady=5) submit_button.pack(pady=5)
git_pull()
root.mainloop() root.mainloop()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 138 KiB

BIN
img/reichard_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -20,6 +20,7 @@
<li><a href="about.html">O nás</a></li> <li><a href="about.html">O nás</a></li>
<li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li> <li><a href="https://animo.zamberk.cz"><img src="img/animo.png" alt="Animo logo" style="max-width:100%;"></a></li>
<li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li> <li><a href="index.html"><img src="img/logo.png" alt="FMCZ logo" style="max-width:100%;"></a></li>
<li><a href="https://www.reichard.cz/"><img src="img/reichard_white.png" alt="Reichard logo" style="max-width:100%;"></a></li>
</ul> </ul>
</nav> </nav>
</aside> </aside>
@@ -30,6 +31,11 @@
<ul> <ul>
<!-- INSERT HERE --> <!-- INSERT HERE -->
<li><i>16.7.2025</i></li>
<li><b>Spuštění stránek</b></li>
<li>Slavnostně oznamujeme spuštění kroužkových stránek</li>
<hr>
</ul> </ul>
</section> </section>
</main> </main>

3
requirements.txt Normal file
View File

@@ -0,0 +1,3 @@
tk
GitPython
shutils