sync: 2026-10-27 15:36

This commit is contained in:
benji.benji committed 2026-10-27 15:36:17 +01:00
1 parent db1e1adf3d
commit 5465c51d8d
8 files changed
+72 -8

No files matched your search

+25 -6
View File
@@ -4,21 +4,27 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
<<<<<<< Updated upstream
"id": "8394721853d949c0", "id": "8394721853d949c0",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "b850042edcdc35ee", "id": "b850042edcdc35ee",
=======
"id": "c244cecb07d7aabe",
"type": "tabs",
"children": [
{
"id": "3449545729fd0f00",
>>>>>>> Stashed changes
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "pdf",
"state": { "state": {
"file": "BD/TD.md", "file": "SCR/SCR 1.1/CM-SCR.1.1_Access_Perm.pdf"
"mode": "source",
"source": false
}, },
"icon": "lucide-file", "icon": "lucide-file-text",
"title": "TD" "title": "CM-SCR.1.1_Access_Perm"
} }
} }
] ]
@@ -189,6 +195,7 @@
"bases:Créer une nouvelle base": false "bases:Créer une nouvelle base": false
} }
}, },
<<<<<<< Updated upstream
"active": "b850042edcdc35ee", "active": "b850042edcdc35ee",
"lastOpenFiles": [ "lastOpenFiles": [
"EGOD/EGOD - Demule thenon.md", "EGOD/EGOD - Demule thenon.md",
@@ -206,6 +213,18 @@
"SCR/SCR 1.1/image.png", "SCR/SCR 1.1/image.png",
"SCR/SCR 1.1/CM-SCR.1.1_Access_Perm.pdf", "SCR/SCR 1.1/CM-SCR.1.1_Access_Perm.pdf",
"SCR/SCR 1.1/TD.md", "SCR/SCR 1.1/TD.md",
=======
"active": "3449545729fd0f00",
"lastOpenFiles": [
"SCR/SCR 1.1/TD.md",
"SCR/SCR 1.1/image.png",
"SCR/SCR 1.1/Sans titre.md",
"BD/TD.md",
"Pasted image 20261013162420.png",
"Pasted image 20261006141945.png",
"SCR/SCR 1.1/CM-SCR.1.1_Access_Perm.pdf",
"DEV1.1/CM.md",
>>>>>>> Stashed changes
"Pasted image 20261002121116.png", "Pasted image 20261002121116.png",
"BD/BD 1.1.md", "BD/BD 1.1.md",
"DEV1.1/TP/README.md", "DEV1.1/TP/README.md",
File renamed without changes.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

+3
View File
@@ -297,8 +297,11 @@ R5:
SELECT * FROM (Modèle NATURAL JOIN Propriétaire) JOIN Personne ON NumPropriétaire = NumPersonne; SELECT * FROM (Modèle NATURAL JOIN Propriétaire) JOIN Personne ON NumPropriétaire = NumPersonne;
``` ```
![[Pasted image 20261013162420.png]]
# TD4
# TD 5 # TD 5
## exercice 1 ## exercice 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

+5
View File
@@ -0,0 +1,5 @@
TP
# TP
+38 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/python3 #!/usr/bin/python3
import getpass import getpass
import os, subprocess import os, subprocess
import random
class Colors: class Colors:
RED = "\033[0;31m" RED = "\033[0;31m"
@@ -11,6 +11,7 @@ class Colors:
END = "\033[0m" END = "\033[0m"
def ask(question: str, default=None, required=False, confidential=False): def ask(question: str, default=None, required=False, confidential=False):
"""Ask a question to the user and check if the result is good""" """Ask a question to the user and check if the result is good"""
while True: while True:
@@ -31,10 +32,32 @@ def ask(question: str, default=None, required=False, confidential=False):
else: else:
print(f"{Colors.RED}this field is required !{Colors.END}") print(f"{Colors.RED}this field is required !{Colors.END}")
tips = [
f"you can use environnment variables to set an Email and a Discord to the README file ! "
]
print(Colors.YELLOW+random.choice(tips)+Colors.END)
project_name = ask("enter your project filename > ", required=True) project_name = ask("enter your project filename > ", required=True)
libs = ask("enter your libs flags press (let the field blank if None) > ", default="") libs = ask("enter your libs flags press (let the field blank if None) > ", default="")
readme = """
# ###PROJECTNAME###
## Description
## Compilation / Execution
pour compiler le projet il suffit d'éxecuter : ```make```
pour éxecuter le projet il suffit d'éxécuter : ```bin/###PROJECTNAME###```
## FAQ
"""
template = f"""# tool macros template = f"""# tool macros
CC ?= gcc CC ?= gcc
#CXX ?= #CXX ?=
@@ -110,6 +133,20 @@ with open("Makefile", "w", encoding="utf-8", errors="ignore") as f:
f.write(template) f.write(template)
print(f"{Colors.GREEN}Makefile build successfully !{Colors.END}") print(f"{Colors.GREEN}Makefile build successfully !{Colors.END}")
f.close() f.close()
readme=readme.replace("###PROJECTNAME###",project_name)
mail=os.getenv("EMAIL") or None
mail=os.getenv("DISCORD") or None
if not mail == None and not discord == None:
readme+=f"\n\n## Bugs / Question\n-email: {mail}\n- Discord: {discord}"
with open("README.md", "w", encoding="utf-8", errors="ignore") as f:
f.write(readme)
print(f"{Colors.GREEN}README written successfully !{Colors.END}")
f.close()
os.system("make makedir") os.system("make makedir")
open("src/main.c", "w").write( open("src/main.c", "w").write(
"""#include <stdio.h>\n#include <stdlib.h>\n\nint main(void) {\n\n\treturn EXIT_SUCCESS;\n}""" """#include <stdio.h>\n#include <stdlib.h>\n\nint main(void) {\n\n\treturn EXIT_SUCCESS;\n}"""