-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d9b154
commit e413823
Showing
2 changed files
with
65 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
idiomas_list = ['es','en','ca','fr','it','de'] | ||
while True: | ||
etiqueta = input("Ingrese la etiqueta: ").replace("trad.", "").replace("etiquetes.", "") | ||
if etiqueta == "!!": | ||
break | ||
|
||
contenido = input("Ingrese el contenido: ") | ||
idioma = '' | ||
while idioma not in idiomas_list: | ||
idioma = input("Ingrese el idioma: ") | ||
|
||
linea_sql = f"INSERT INTO `caraalvent`.`web_t_etiquetes` (`id_pagina`, `nomEtiqueta`, `contingut`, `idioma`) VALUES ('0', '{etiqueta}', '{contenido}', '{idioma}');" | ||
|
||
with open("nuevas_etiquetas.sql", "a") as archivo_sql: | ||
archivo_sql.write(linea_sql + "\n") | ||
|
||
print("Se ha terminado de ingresar etiquetas. El bucle ha finalizado.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters