気象用語を拒む天気予報。実行のたびに、日付入りの三行の報告が隣人の声で書かれる——見えたもの、閉まろうとするもの。天気についてではなく、一日を自分の言葉で語ることの許しについての作品。
"""
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())四月五日 日曜日 正午でも光は低い角度から来ている。車はいつもより遅く走っている、理由もなく。 それでもセーターを持っていくこと。 --- 四月五日 日曜日 空は洗いざらしに見える。煉瓦壁の上の光は一時間前から変わっていない。 それでもセーターを持っていくこと。 --- 四月五日 日曜日 今日の空気はあの緩んだ種類のものだ。鳩はふだん通りにふるまっていて、それが妙に目につく。 雨は降らない。だがフードのついた何かを持っていくこと。 --- 四月五日 日曜日 光に薄さがある。猫が入ってきて、出ていって、また入ってきた。 予定は緩く保つこと。 --- 四月五日 日曜日 光に薄さがある。鳩はふだん通りにふるまっていて、それが妙に目につく。 どこか決まった場所まで歩いていく日だ。
生成プログラム。実行のたびに異なる報告が書かれる——スクリプトが作品であり、報告はその天気である。
役職とモデルの対応は工房の設定で固定されている。想像を担う役は完成済みのポートフォリオを決して見ない。