-
Notifications
You must be signed in to change notification settings - Fork 0
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#NNNGM “O Fortuna” - Unix fortunes in Latin via google translate #30
Comments
kimslawson
changed the title
#NNNGM O Fortuna - Unix fortunes via google translate
#NNNGM “O Fortuna” - Unix fortunes in Latin via google translate
Nov 12, 2022
Changed from a dependency on a local installation of fortune(1) to using the fortune API documented here https://helloacm.com/fortune/. Shortened the code significantly (thanks, pestis!) Here's the code (233 bytes)import googletrans as g,requests as r
w=0
e='unicode_escape'
while w<5e4:t=g.Translator().translate(r.get('https://api.justyy.workers.dev/api/fortune').text.encode('raw_'+e).decode(e),'la').text.strip('"');print(t);w+=len(t.split()) Sample output
Repo |
Added a PDF version of the output, formatted as a book with LaTeX. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's better than fortunes? Fortunes in Latin, of course!
This is my NanoNanoGenMo entry for 2022 (now completed).
The text was updated successfully, but these errors were encountered: