You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
6.2 KiB
Python
81 lines
6.2 KiB
Python
import json
|
|
|
|
# Data to be written
|
|
|
|
roomthings = {}
|
|
roomthings["room"]={"bookstand": "To his right is a mahogany stand on which sit 26 books - on which, I should say, 26 books normally ought to sit, but, as always, a book is missing, a book with an inscription, '5', on its flap. Nothing about this stand, though, looks at all abnormal or out of proportion, no hint of a missing publication, no filing card or 'ghost', as librarians quaintly call it, no conspicuous gap or blank",
|
|
|
|
"windowsill": "Crawling across his windowsill is a tiny animal, indigo and saffron in colour, not a cockroach, not a blowfly, but a kind of wasp, laboriously dragging a sugar crumb along with it. Hoping to crush it with a casual blow, Vowl lifts up his right hand; but it abruptly flaps its wings, flying off without giving its assailant an opportunity to do it any harm.",
|
|
|
|
"door": "Padding into his bathroom, Vowl dabs at his brow and throat with a damp cloth. Back to his room.",
|
|
|
|
"visiting-card": "Laid out languorously, all day long, on a couch or on a sofa, or on occasion rocking to and fro in his rocking chair, stubbornly trying to copy out on an old visiting-card that indistinct motif that had sprung at him from his rug, as frail as an infant but not now, thanks to Cochin's surgical skills, in all that much physical pain, our protagonist starts hallucinating, blowing his mind. ",
|
|
|
|
"rug": "His mind runs riot. Lost in thought, scrutinising his rug, Vowl starts imagining 5, 6, 26 distinct visual combinations, absorbing but also insubstantial, as though an artist's rough drafts but of what? - that, possibly, which a psychiatrist would call Jungian slips, an infinity of dark, mythic, anonymous portraits flitting through his brain, as it burrows for a solitary, global signal that might satisfy his natural human lust for signification both instant and lasting, a signal that might commandingly stand out from this chain of discontinuous links, this miasma of shadowy tracings, all of which, or so you would think, ought to knit up to form a kind of paradigmatic configuration, of which such partial motifs can furnish only anagrams and insipid approximations: \n a body crumpling up, a hoodlum, a portrait of an artist as a young dog; \n a bullock, a Bogartian falcon, a brooding blackbird; \n an arthritic old man; \n a sigh;"}
|
|
roomthings["island"]={
|
|
"stick": "At dusk, using a sharp rock, Ishmail cuts a notch on a stick (to tick off his first night as a castaway); and, with a total of 20 such cuts, constructs a hut, a sort of impromptu shack, with a door, four walls, and flooring and roofing built out of mud. With no matchsticks at hand, though, his food is invariably raw.",
|
|
|
|
"compound": "It was built, circa 1930, in a crypto-rococo fashion imitating, variously, a pink-icing casino in Monaco, a bungalow on a Malayan plantation, a colonialist villa, an ultra-chic condominium in Miami and Tara from GWTW. ",
|
|
|
|
"cushion": " a numb, downcast, haggard Ishmail withdraws his hand. What, again, occurs is that this cushion, say - a thing normally as soft and downy as a baby's bottom - is, to his touch, now a hard, cold, compact block, as rock-hard as a diamond, as though part of a shadowy twin world consubstantial with Ishmail's own but caught through a glass darkly, a living mirror of our own world and just as cold, shiny and insular as a mirror. "}
|
|
roomthings["bar"]={
|
|
"barman": """BARMAN (who knows a thing or two): Morning, mon Commandant.
|
|
COMMANDANT (calming down now that, although in mufti, his rank is plain to this barman): Ah, good morning to you, my boy, good morning!
|
|
BARMAN (who has a slight but distinct hint of Oirishry about him): And what, pray, can I do for you, sir? Your wish is my command.
|
|
COMMANDANT (licking his lips): You know what I fancy most of all - a port-flip.
|
|
BARMAN (frowning)-. What? """,
|
|
|
|
"port": """COMMANDANT (furiously pointing in front of him): Now look, that's port, isn't it?
|
|
BARMAN (in agony): Uh huh . . . but. . .
|
|
COMMANDANT (livid): So? So? And (pointing again) that's an. . . """}
|
|
|
|
# -------------------
|
|
room = {
|
|
"name": "room",
|
|
|
|
"message": """
|
|
Incurably insomniac, Anton Vowl turns on a light. According to his watch it's only 12.20. With a loud and languorous sigh Vowl sits up, stuffs a pillow at his back, draws his quilt up around his chin, picks up his whodunit and idly scans a paragraph or two; but, judging its plot impossibly difficult to follow in his condition, its vocabulary too whimsically multisyllabic for comfort, throws it away in disgust.
|
|
""",
|
|
|
|
"death": """
|
|
It's all in vain. His subconscious vision starts buzzing around him again, buzzing around and within him, choking and suffocating him.""",
|
|
|
|
"intro":"""1
|
|
|
|
Which at first calls to mind a probably familiar story of a drunk man waking up with his brain in a whirl.""",
|
|
"items": roomthings["room"]
|
|
}
|
|
|
|
island = {
|
|
"name": "island",
|
|
"message": """
|
|
But six days go past, and his unusually robust constitution allows him finally to sit up and look around him. Our protagonist is now disturbingly skinny but can still, if with difficulty, climb out of his pit — a pit that was almost his tomb. So Ishmail starts living again.""",
|
|
"death": """
|
|
At which point Ishmail falls victim to hallucinations, possibly from consuming a poisonous black mushroom or having had too much to drink; or, why not, from having shrunk so much as to vanish wholly from sight""",
|
|
"intro":"""2
|
|
|
|
In which luck, God's alias and alibi, plays a callous trick on a suitor cast away on an island.""",
|
|
"items": roomthings["island"]
|
|
}
|
|
|
|
bar = {
|
|
"name": "bar",
|
|
"message": """
|
|
MAN, sitting down and barking (with gruff and, as you might say, military incivility): Barman! """,
|
|
"death":"""BARMAN (abruptly dying): Aaaaaaah! Shhhhhhh . . . R.I.P.
|
|
COMMANDANT (about to go but first noticing his body): What a storm in a port-flip!
|
|
|
|
Which is what you might call adding insult to injury.""",
|
|
"intro": """3
|
|
|
|
"Oh, how idiotic," murmurs Vowl. But just as idiotic, now, is his vision of a man going into a bar: """,
|
|
"items": roomthings["bar"]
|
|
}
|
|
|
|
placedata = {"room":room, "island":island, "bar":bar}
|
|
# Serializing json
|
|
json_messages = json.dumps(placedata, indent=4)
|
|
|
|
# Writing to sample.json
|
|
with open("voiddata.json", "w") as outfile:
|
|
outfile.write(json_messages) |