-
Notifications
You must be signed in to change notification settings - Fork 5
Description
An idea from 2016, done in under 256 chars as a Nano-NaNoGenMo or #NNNGM:
from random import choice as c
print(open("intro.txt").read())
s = open("stuff.txt").read().splitlines()
for _ in range(3843):
print(f"\nOn meillä {c(s)}, {c(s)}, {c(s)} ja {c(s)}")
print(f"On {c(s)}, {c(s)}, {c(s)} ja {c(s)}")Perfect or Black Friday/Weekend/Week, Leevi and the Leavings' Finnish song Onnelliset comments on happiness and consumerism.
However, only eight home appliances are mentioned in the 1981 song.
On meillä stereot, televisio, mikroaaltouuni ja videonauhuri
On pakastin, kahvinkeitin, mikroprosessori ja pölynimuri
Translated:
We have a stereo, television, microwave oven and VCR
An oven, coffee machine, computer and vacuum cleaner
Nowadays, there's even more stuff we need to acquire! Let's extend it with an extra 23 058 things.
- Repo: https://github.com/hugovk/NaNoGenMo-2019/tree/master/on-meilla
- PDF: https://github.com/hugovk/NaNoGenMo-2019/raw/master/on-meilla/on-meilla.pdf
- TXT: https://github.com/hugovk/NaNoGenMo-2019/raw/master/on-meilla/on-meilla.txt
Preview:
On meillä uniseuranta, pöytätietokone, elokuvaääni ja mukanakulkeva
On paikannus, vastaanotin, älylukko ja joustokeulaOn meillä aktiivisuusranneke, sähköhammasharja, videokamera ja pelikuulokemikrofoni
On leikkimökki, prosenttista, autoblaster ja valjasOn meillä tyttönukke, termosmuki, jalustakaiutinpari ja makuupussi
On tasoisella, kantojärjestelmä, rakenne ja kiinnitysOn meillä kattila, toimintapelin, järjestelmäkamera ja porttinen
On päätarjoukset, pöytälevy, savustusgrilli ja ohjelma
This involved some prep:
raw.txt has 33 pages of Black Friday tat from a webshop.
Then find the, for example, -älykello (smartwatch), -kaasugrilli (gas grill),
-televisio (television) and -minikopteri (minicopter) in:
- Xiaomi Amazfit Stratos -älykello, musta
- Weber Genesis II LX S-340 GBS -kaasugrilli, rosteri
- ProCaster 43UNB820H 43" 4K Ultra HD Smart LED -televisio
- Ryze Tello, powered by DJI -minikopteri, valkoinen
(There's some false positive products in there, but it'll do.)
And cut the initial dash, and sort and remove duplicates:
grep -o "\-[a-zäö]\+" raw.txt | cut -c 2- | sort | uniq > stuff.txtThen the Python script prints intro.txt, and generates this pattern until 50k words:
On meillä A, B, C ja D
On E, F, G ja H
python on-meilla.py > on-meilla.txt