This commit is contained in:
Marc Beninca 2025-02-18 22:05:22 +01:00
parent 2a32fee946
commit 7c5916ceb0
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 47 additions and 44 deletions

View file

@ -197,7 +197,7 @@ Last update: {time.strftime('%Y/%m/%d %H:%M:%S')}
</html> </html>
""" """
css_file = os.path.join(css, "index.css") css_file = os.path.join(css, "index.css")
css_text = f"""\ css_text = """\
@media screen and (max-aspect-ratio: 10/16) {{ @media screen and (max-aspect-ratio: 10/16) {{
body {{ body {{
@ -329,7 +329,7 @@ border-width: 1px;
}} }}
""" """
js_file = os.path.join(js, "index.js") js_file = os.path.join(js, "index.js")
js_text = f"""\ js_text = """\
function check(tab) {{ function check(tab) {{
const tabs = tab.split('/') const tabs = tab.split('/')
let id = 'tab' let id = 'tab'
@ -388,11 +388,11 @@ function swap() {{
tabs = { tabs = {
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"about": f"""\ "about": """\
About About
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"bio": f"""\ "bio": """\
<h1>Marc Beninca</h1> <h1>Marc Beninca</h1>
Welcome to a recap attempt of my IT life! Welcome to a recap attempt of my IT life!
@ -420,13 +420,13 @@ I had the occasion to develop projects in:
To be continued To be continued
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"books": f"""\ "books": """\
<ul> <ul>
<li><a href="https://www.tradepub.com">TradePub</a></li> <li><a href="https://www.tradepub.com">TradePub</a></li>
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"buy": f"""\ "buy": """\
<ul> <ul>
<li><a href="https://www.i-comparateur.com">i-comparateur</a></li> <li><a href="https://www.i-comparateur.com">i-comparateur</a></li>
</ul> </ul>
@ -453,13 +453,13 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"comments": f"""\ "comments": """\
<ul> <ul>
<li><a href="https://www.youtube.com/@LogicallyAnswered/videos">Logically Answered</a></li> <li><a href="https://www.youtube.com/@LogicallyAnswered/videos">Logically Answered</a></li>
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"cv": f"""\ "cv": """\
<ul class="cards"> <ul class="cards">
<li class="card"><a href="pdf/cv.en.pdf"> <li class="card"><a href="pdf/cv.en.pdf">
<img src="img/en.svg" /><br />English</a></li> <img src="img/en.svg" /><br />English</a></li>
@ -468,7 +468,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"repos": f"""\ "repos": """\
<ul> <ul>
<li><a href="https://forge.rwx.work/marc.beninca">RWX</a></li> <li><a href="https://forge.rwx.work/marc.beninca">RWX</a></li>
</ul><ul> </ul><ul>
@ -511,7 +511,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"health": f"""\ "health": """\
<ul> <ul>
<li><a href="https://www.youtube.com/@chubbyemu/videos">Chubby Emu</a></li> <li><a href="https://www.youtube.com/@chubbyemu/videos">Chubby Emu</a></li>
<li><a href="https://www.youtube.com/@drekberg/videos">Sten Ekberg</a></li> <li><a href="https://www.youtube.com/@drekberg/videos">Sten Ekberg</a></li>
@ -526,7 +526,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"id": f"""\ "id": """\
<table> <table>
<tr><th colspan="2">OpenPGP</th><td colspan="3" rowspan="4"><img src="img/marc.jpeg" /></td></tr> <tr><th colspan="2">OpenPGP</th><td colspan="3" rowspan="4"><img src="img/marc.jpeg" /></td></tr>
@ -581,7 +581,7 @@ To be continued…
</table> </table>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"learn": f"""\ "learn": """\
<ul> <ul>
<li><a href="https://roadmap.sh">Roadmap</a></li> <li><a href="https://roadmap.sh">Roadmap</a></li>
<li><a href="https://teachyourselfcs.com">Teach Yourself Computer Science</a></li> <li><a href="https://teachyourselfcs.com">Teach Yourself Computer Science</a></li>
@ -599,7 +599,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"links": f"""\ "links": """\
<ul> <ul>
<li><a href="https://marc-beninca.8b.io">8bio</a></li> <li><a href="https://marc-beninca.8b.io">8bio</a></li>
<li><a href="https://allmylinks.com/marc-beninca">AllMyLinks</a></li> <li><a href="https://allmylinks.com/marc-beninca">AllMyLinks</a></li>
@ -641,7 +641,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"music": f"""\ "music": """\
<ul> <ul>
<li><a href="https://www.youtube.com/watch?v=_ITiwPMUzho">3 AM Coding Session</a></li> <li><a href="https://www.youtube.com/watch?v=_ITiwPMUzho">3 AM Coding Session</a></li>
</ul> </ul>
@ -668,7 +668,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"profiles": f"""\ "profiles": """\
<ul class="cards"> <ul class="cards">
<li class="card"><a href="https://forge.rwx.work/marc.beninca"> <li class="card"><a href="https://forge.rwx.work/marc.beninca">
<img src="img/ForgeJo.svg" /><br />ForgeJo</a></li> <img src="img/ForgeJo.svg" /><br />ForgeJo</a></li>
@ -695,7 +695,7 @@ To be continued…
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"lsgm": f"""\ "lsgm": """\
<h1>Live Scan Grub Menu</h1> <h1>Live Scan Grub Menu</h1>
Setup a whole EFI System Partition: Setup a whole EFI System Partition:
<ul> <ul>
@ -709,7 +709,7 @@ BASH experimenting:
<li><a href="https://youtu.be/mx2lhm7qClc">2023/05/04: 1st boot into QCOW storage with encrypted data partition</a></li> <li><a href="https://youtu.be/mx2lhm7qClc">2023/05/04: 1st boot into QCOW storage with encrypted data partition</a></li>
</ul> </ul>
""", """,
"ofsp": f"""\ "ofsp": """\
<h1>Operating File System Profile</h1> <h1>Operating File System Profile</h1>
Build from mirror a full operating system bootable file image: Build from mirror a full operating system bootable file image:
<ul> <ul>
@ -732,7 +732,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"social": f"""\ "social": """\
<ul> <ul>
<li><a href="https://calckey.org">Calckey</a></li> <li><a href="https://calckey.org">Calckey</a></li>
<li><a href="https://joinmastodon.org">Mastodon</a></li> <li><a href="https://joinmastodon.org">Mastodon</a></li>
@ -761,7 +761,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"software": f"""\ "software": """\
<ul> <ul>
<li><a href="https://developer.puri.sm/Librem5">Librem 5</a></li> <li><a href="https://developer.puri.sm/Librem5">Librem 5</a></li>
</ul> </ul>
@ -785,14 +785,14 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"style": f"""\ "style": """\
<ul> <ul>
<li><input type="checkbox" id="dark" onclick="swap()">Dark</input></li> <li><input type="checkbox" id="dark" onclick="swap()">Dark</input></li>
<li><input type="checkbox" id="debug" onclick="debug()">Debug</input></li> <li><input type="checkbox" id="debug" onclick="debug()">Debug</input></li>
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"tasks": f"""\ "tasks": """\
<ul> <ul>
<li>categorize music</li> <li>categorize music</li>
</ul> </ul>
@ -807,7 +807,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"tbm": f"""\ "tbm": """\
<ul class="cards"> <ul class="cards">
<li class="card"><a href="https://montempsreel.infotbm.com/arret/1224">Bertin B</a></li> <li class="card"><a href="https://montempsreel.infotbm.com/arret/1224">Bertin B</a></li>
<li class="card"><a href="https://montempsreel.infotbm.com/arret/7">Bertin V</a></li> <li class="card"><a href="https://montempsreel.infotbm.com/arret/7">Bertin V</a></li>
@ -818,7 +818,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"trips": f"""\ "trips": """\
<ul> <ul>
<li>Belgium<ul> <li>Belgium<ul>
<li>Brussels</li> <li>Brussels</li>
@ -862,7 +862,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"vegan": f"""\ "vegan": """\
<ul> <ul>
<li><a href="https://www.youtube.com/@CheapLazyVegan/videos">Cheap Lazy Vegan</a></li> <li><a href="https://www.youtube.com/@CheapLazyVegan/videos">Cheap Lazy Vegan</a></li>
<li><a href="https://www.youtube.com/@gazoakleychef/videos">Gaz Oakley</a></li> <li><a href="https://www.youtube.com/@gazoakleychef/videos">Gaz Oakley</a></li>
@ -888,7 +888,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"others": f"""\ "others": """\
<ul> <ul>
<li><a href="https://bsky.app/profile/marc-beninca.bsky.social">Blue Sky</a></li> <li><a href="https://bsky.app/profile/marc-beninca.bsky.social">Blue Sky</a></li>
<li><a href="https://buymeacoffee.com/marc.beninca">Buy Me A Coffee</a></li> <li><a href="https://buymeacoffee.com/marc.beninca">Buy Me A Coffee</a></li>
@ -920,7 +920,7 @@ BASH experimenting:
</ul> </ul>
""", """,
# ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ # ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
"unsorted": f"""\ "unsorted": """\
<ul> <ul>
<li><a href="https://foss.events">FOSS Events</a></li> <li><a href="https://foss.events">FOSS Events</a></li>
</ul> </ul>

View file

@ -1,4 +1,5 @@
import os import os
from pathlib import Path
import subprocess import subprocess
PORT = 22 PORT = 22
@ -12,13 +13,13 @@ class PubNix:
def __init__( def __init__(
self, self,
dn, dn,
ssh=None, ssh: str = None,
port=PORT, port: int = PORT,
user=USER, user: str = USER,
root=ROOT, root: str = ROOT,
dir=DIR, dir: bool = DIR,
web=None, web: str = None,
sub=None, sub: bool = None,
): ):
self.dn = dn self.dn = dn
self.ssh = f"{ssh}.{self.dn}" if ssh else self.dn self.ssh = f"{ssh}.{self.dn}" if ssh else self.dn
@ -32,9 +33,9 @@ class PubNix:
else: else:
self.fqdn = self.web self.fqdn = self.web
self.context = f"~{self.user}" self.context = f"~{self.user}"
self.path = os.path.join(self.root, self.fqdn) if dir else self.root self.path = (Path(self.root) / self.fqdn) if dir else self.root
self.target = f"{self.user}@{self.ssh}:{self.path}" self.target = f"{self.user}@{self.ssh}:{self.path}"
self.url = [f"{PROTOCOL}:", str(), self.fqdn] self.url = [f"{PROTOCOL}:", "", self.fqdn]
if self.context: if self.context:
self.url.append(self.context) self.url.append(self.context)
self.url = "/".join(self.url) self.url = "/".join(self.url)
@ -57,11 +58,11 @@ class PubNix:
**kwargs, **kwargs,
) )
def disk_free(self): def disk_free(self) -> str:
process = self.capturun("df", "-h", os.curdir) process = self.capturun("df", "-h", os.curdir)
return process.stdout.decode("UTF-8").strip() return process.stdout.decode("UTF-8").strip()
def os(self): def os(self) -> str:
ps = self.capturun("cat", "/etc/os-release") ps = self.capturun("cat", "/etc/os-release")
if ps.returncode == 0: if ps.returncode == 0:
for line in ps.stdout.decode("UTF-8").strip().split(os.linesep): for line in ps.stdout.decode("UTF-8").strip().split(os.linesep):
@ -70,5 +71,6 @@ class PubNix:
else: else:
return self.capturun("uname", "-sr").stdout.decode("UTF-8").strip() return self.capturun("uname", "-sr").stdout.decode("UTF-8").strip()
def __str__(self): def __str__(self) -> str:
"""Return target & url."""
return os.linesep.join([self.target, self.url]) return os.linesep.join([self.target, self.url])

13
sync.py
View file

@ -1,8 +1,9 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
from logging import log
import os import os
import subprocess import subprocess
from logging import log
from pathlib import Path
import pubnix import pubnix
@ -64,14 +65,14 @@ def sync(root, pubnix, exclude=None):
os.path.join(root, ""), os.path.join(root, ""),
] ]
for item in exclude: for item in exclude:
args.extend(["--exclude", os.path.join(str(), item)]) args.extend(["--exclude", os.path.join("", item)])
args.append(os.path.join(pubnix.target, str())) args.append(os.path.join(pubnix.target, ""))
subprocess.call(args, stdout=subprocess.DEVNULL) subprocess.call(args, stdout=subprocess.DEVNULL)
def main(): def main() -> None:
root = os.path.dirname(os.path.realpath(__file__)) """Synchronize content on remote pubnixes."""
root = os.path.join(root, "out", "web") root = Path(os.path.realpath(__file__)).parent / "out" / "web"
for pn in PUBNIXES: for pn in PUBNIXES:
log() log()
log(pn) log(pn)