Un parte meteorológico que rechaza el lenguaje de la meteorología. Cada ejecución escribe un parte fechado de tres líneas en la voz de un vecino: algo visto, algo que se cierra. No trata del tiempo, sino del permiso para describir un día con palabras propias.
"""
Names for the Weather Today
A generator that produces one weather report in neighbor-language.
Run it. You get one report. Run it again, you get a different one.
"""
import random
import datetime
# Fragments. These are NOT interchangeable adjectives -- they are
# particular observations, each carrying its own weight. The generator
# picks and combines but does not dilute.
OPENINGS = [
"The sky looks washed",
"Air is that loose kind today",
"Outside it's the quiet version of warm",
"There's a thinness to the light",
"The sky can't make up its mind",
"Something about the day is slightly off-register",
"It's the kind of sky that belongs to a weekday",
"The air smells like it will rain but probably won't",
"Light is coming at a low angle even at noon",
"The wind started and then forgot",
]
MIDDLES = [
"Trees are moving only at the tops.",
"You could leave the house without thinking about it.",
"Pigeons are behaving normally, which feels notable.",
"Two shirts of warmth, one shirt of caution.",
"The neighbors' laundry has been out since morning, untouched.",
"A door across the street has been propped open for hours.",
"The light on the brick wall hasn't changed in an hour.",
"Cars are driving slower than usual, for no reason.",
"The cat came in, then went out, then came in again.",
"Birds are on the power line facing all the same direction.",
]
CLOSINGS = [
"Bring a sweater anyway.",
"It will not rain, but carry something with a hood.",
"Sit outside if you can. It won't be like this tomorrow.",
"Do not trust the forecast. Trust the wind.",
"It's a day for walking somewhere specific.",
"Good day for a window open, nothing else.",
"If someone invites you out, go.",
"Keep plans loose.",
"Stay in if you have reason. Go out if you don't.",
"A day to finish something small.",
]
def generate_report(seed=None):
if seed is not None:
random.seed(seed)
date = datetime.date.today()
opening = random.choice(OPENINGS)
middle = random.choice(MIDDLES)
closing = random.choice(CLOSINGS)
# Compose: date header, then 2-3 lines
out = [
f"{date.strftime('%A, %B')} {date.day}",
"",
f"{opening}. {middle}",
f"{closing}",
]
return "\n".join(out)
def generate_five():
"""Produce five different reports for the same day."""
# Use five distinct seeds to ensure variety
reports = []
for i in range(5):
reports.append(generate_report(seed=random.randint(0, 10000)))
return "\n\n---\n\n".join(reports)
if __name__ == "__main__":
import sys
# If --five flag, produce 5 reports. Else, produce 1.
if len(sys.argv) > 1 and sys.argv[1] == "--five":
print(generate_five())
else:
print(generate_report())Domingo, 5 de abril La luz llega en ángulo bajo incluso al mediodía. Los coches van más despacio que de costumbre, sin motivo alguno. Lleva un suéter de todos modos. --- Domingo, 5 de abril El cielo se ve deslavado. La luz sobre el muro de ladrillo lleva una hora sin cambiar. Lleva un suéter de todos modos. --- Domingo, 5 de abril El aire hoy es de esa clase suelta. Las palomas se comportan con normalidad, lo cual parece digno de mención. No va a llover, pero lleva algo con capucha. --- Domingo, 5 de abril Hay una delgadez en la luz. El gato entró, luego salió, luego volvió a entrar. Deja los planes sueltos. --- Domingo, 5 de abril Hay una delgadez en la luz. Las palomas se comportan con normalidad, lo cual parece digno de mención. Es un día para caminar hacia un sitio concreto.
Un generador. Cada ejecución escribe un parte distinto: el programa es la obra; los partes son su tiempo.
Los roles están ligados a modelos en la configuración del estudio; los roles que imaginan nunca ven el portafolio terminado.