Skip to content

Instantly share code, notes, and snippets.

@mishin
Created August 1, 2023 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mishin/3aa0242c8f41fe48c9c0ba5b43c19517 to your computer and use it in GitHub Desktop.
Save mishin/3aa0242c8f41fe48c9c0ba5b43c19517 to your computer and use it in GitHub Desktop.
Читаем песню и выводим ее перевод и транскрипцию
f1 = open('spain.txt')
f2 = open('transcribition_from_es.txt')
f3 = open('translate_ru.txt')
for line1, line2, line3 in zip(f1, f2, f3):
print(line1.strip())
print(line2.strip())
print(line3.strip())
@mishin
Copy link
Author

mishin commented Aug 2, 2023

from jinja2 import Template
tm = Template("""{
  "rObject": "{{uuid}}",
  "forceCreateProcess": true
}""")

with open('id.md') as f1:
    for line1 in f1:
        msg = tm.render(uuid=line1.strip())
        print(msg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment