Browse Source

feat: copy static files

Signed-off-by: QuentinN42 <quentin@lieumont.fr>
master
QuentinN42 5 months ago
parent
commit
f5954a87ff
Signed by untrusted user: number42 GPG Key ID: 2CD7D563712B3A50
  1. 1
      .gitignore
  2. 34
      builder/__main__.py
  3. 48
      config.json
  4. BIN
      static/chat.png
  5. BIN
      static/codimd.png
  6. BIN
      static/element.png
  7. BIN
      static/eole.png
  8. BIN
      static/framasoft.png
  9. BIN
      static/gitea.png
  10. BIN
      static/glpi.png
  11. BIN
      static/jitsi.png
  12. BIN
      static/jupyter.png
  13. 25
      static/lnf.svg
  14. BIN
      static/lufi.png
  15. BIN
      static/nextcloud.png
  16. BIN
      static/oss.png
  17. BIN
      static/peertube.png
  18. BIN
      static/printer.png
  19. BIN
      static/rezel_color.png
  20. BIN
      static/rtd.png
  21. BIN
      static/s.png
  22. BIN
      static/synapses.png
  23. BIN
      static/text.png
  24. BIN
      static/wekan.png
  25. BIN
      static/zimbra.png

1
.gitignore

@ -1 +1,2 @@
build
__pycache__

34
builder/__main__.py

@ -1,11 +1,14 @@
"""Jinja2 generator."""
from json import load
from os import getenv, listdir
from os import getenv, listdir, mkdir
import shutil
from jinja2 import Environment, FileSystemLoader # type: ignore
BASE_PATH = 'config.json'
BASE = 'builder/'
STATIC_FOLDER = 'static/'
OUT_DIR = 'build/'
env = Environment(loader=FileSystemLoader(BASE + 'templates'))
@ -37,8 +40,8 @@ def write_output(result, location) -> None:
f.write(result)
def main():
"""Script entrypoint."""
def process_templates() -> None:
"""Process all templates."""
args = get_arguments()
files = get_files_to_process()
for file in files:
@ -47,9 +50,32 @@ def main():
file,
args
),
'build/' + file
OUT_DIR + file
)
def list_static_files() -> list:
"""Return a list of static files."""
return listdir(STATIC_FOLDER)
def process_static() -> None:
"""Copy all static files."""
mkdir(OUT_DIR + STATIC_FOLDER)
for file in list_static_files():
shutil.copy(STATIC_FOLDER + file, OUT_DIR + STATIC_FOLDER + file)
def main():
"""Script entrypoint."""
try:
shutil.rmtree(OUT_DIR)
except FileNotFoundError:
pass
mkdir(OUT_DIR)
process_templates()
process_static()
if __name__ == "__main__":
main()

48
config.json

@ -10,33 +10,39 @@
"content": [
{
"url": "https://imprimeweb.telecom-paris.fr/",
"image": "https://eole.telecom-paris.fr/system/files/inline-images/csm_multifonction.png",
"image": "./static/printer.png",
"name": "Imprime Web",
"description": "TODO"
},
{
"url": "https://synapses.telecom-paris.fr/",
"image": "https://synapses.telecom-paris.fr/assets/bootstrap/3.3.5/images/cloud_synapses.png",
"image": "./static/synapses.png",
"name": "Synapses",
"description": "TODO"
},
{
"url": "https://eole.telecom-paris.fr/",
"image": "https://eole.telecom-paris.fr/system/files/Eole_logoWeb2017.png",
"image": "./static/eole.png",
"name": "Eole",
"description": "TODO"
},
{
"url": "https://doc.telecom-paris.fr/",
"image": "https://docs.readthedocs.io/en/stable/_images/logo.png",
"image": "./static/rtd.png",
"name": "Docs DSI",
"description": "Services informatiques de Télécom Paris"
},
{
"url": "https://sos.telecom-paris.fr/front/helpdesk.public.php",
"image": "https://adte.ca/wp-content/uploads/2018/06/logo-GLPI-500-blue-300x165.png",
"image": "./static/glpi.png",
"name": "SOS",
"description": "Tickets SOS de Télécom Paris"
},
{
"url": "https://z.imt.fr",
"image": "./static/zimbra.png",
"name": "Zimbra",
"description": "Mails"
}
]
},
@ -48,85 +54,85 @@
"content": [
{
"url": "https://tutos.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/cotcot.png",
"image": "./static/rezel_color.png",
"name": "Tutos",
"description": "LE service de tutos en ligne, made in Rezel !"
},
{
"url": "https://matrix.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/element.png",
"image": "./static/element.png",
"name": "Matrix",
"description": "Service de chat en ligne, hébergé chez Rezel"
},
{
"url": "https://lnf.rezel.net/",
"image": "https://garezeldap.rezel.net/media/services/t%C3%A9l%C3%A9chargement_DpYObwK.svg",
"image": "./static/lnf.svg",
"name": "Lost'N Found",
"description": "Service de gestion des objets trouvés"
},
{
"url": "https://wekan.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/wekan-logo.svg",
"image": "./static/wekan.png",
"name": "Wekan",
"description": "Outil de productivité : gérez vos projets de manière collaborative et efficace !"
},
{
"url": "https://chat.rezel.net/",
"image": "https://garezeldap.rezel.net/media/services/chat.png",
"image": "./static/chat.png",
"name": "Chat",
"description": "Le Club Chat (Conservation de l'histoire associative de Télécom) a été créé en 2019 suite à une idée d'élèves des promos 2019, 2020 et 2021. Il a pour but de regrouper les savoirs de l'ENST / Télécom."
},
{
"url": "https://notes.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/codimd_dVmTeH9.png",
"image": "./static/codimd.png",
"name": "Notes",
"description": "Notes permet une édition en temps-réel de documents en Markdown. Les documents sont facilement partageables et éditables par plusieurs personnes."
},
{
"url": "https://lufi.rezel.net",
"image": "https://framalibre.org/sites/default/files/leslogos/Lufi_1.png",
"image": "./static/lufi.png",
"name": "Lufi",
"description": "Oubliez WeTransfer, Lufi a un quota plus élevé, est plus personnalisable, protège vos données, et conserve l'historique dans votre navigateur !"
},
{
"url": "https://text.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/20367028.png",
"image": "./static/text.png",
"name": "Share Secure Text",
"description": "PrivateBin est un service libre de pastebin, qui permet d'héberger et de partager des données textuelles."
},
{
"url": "https://s.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/index_IPVgkJE.png",
"image": "./static/s.png",
"name": "Short URL and QR generator",
"description": "Un raccourcisseur d'urls avec un qrcode en prime, profitez de ce service développé par 4 Télécommiens, dans le cadre de PAF."
},
{
"url": "https://peertube.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/langfr-800px-Logo_de_PeerTube.svg.png",
"image": "./static/peertube.png",
"name": "Peertube",
"description": "Regardez des vidéos en ligne, hébergées chez nous !"
},
{
"url": "https://drive.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/Nextcloud_Logo.svg.png",
"image": "./static/nextcloud.png",
"name": "Drive",
"description": "Votre nouveau Google Drive où vos données sont en lieu sûr : édition de documents, classeurs, présentation, formulaires, ... vous y gagnez au change !"
},
{
"url": "https://git.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/512px-Gitea_Logo.svg.png",
"image": "./static/gitea.png",
"name": "Git Forge",
"description": "Gitea est un mini Gitlab très pratique pour vos projets de développement perso ou de groupe."
},
{
"url": "https://meet.rezel.net",
"image": "https://garezeldap.rezel.net/media/services/800px-Logo_Jitsi.svg.png",
"image": "./static/jitsi.png",
"name": "Meet",
"description": "LE service de visioconférence en ligne, hébergé chez Rezel"
},
{
"url": "https://notebook.rezel.net",
"image": "https://avatars3.githubusercontent.com/u/7388996?s=400&v=4",
"image": "./static/jupyter.png",
"name": "Jupyter Notebook",
"description": "Notebook vous permet d'écrire, d'exécuter et de partager des notebooks Python (et bien plus encore!) entièrement en ligne, le tout sur une interface aussi élégante qu'ergonomique !"
}
@ -140,13 +146,13 @@
"content": [
{
"url": "https://opensource.org/",
"image": "https://opensource.org/sites/default/files/public/osi_keyhole_300X300_90ppi_0.png",
"image": "./static/oss.png",
"name": "Open Source Initiative",
"description": "TODO"
},
{
"url": "https://framasoft.org/",
"image": "https://framasoft.org/img/biglogo-notxt.png",
"image": "./static/framasoft.png",
"name": "Framasoft",
"description": "TODO"
}

BIN
static/chat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 KiB

BIN
static/codimd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
static/element.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/eole.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
static/framasoft.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
static/gitea.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/glpi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
static/jitsi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
static/jupyter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

25
static/lnf.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/lufi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
static/nextcloud.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
static/oss.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
static/peertube.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/printer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/rezel_color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
static/rtd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/s.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
static/synapses.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
static/text.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
static/wekan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
static/zimbra.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Loading…
Cancel
Save