1
0

Add random short story prompt page

This commit is contained in:
Tim Van Baak 2024-02-04 19:36:20 -08:00
parent 6a6ffb79aa
commit 7b3ed4fb98
14 changed files with 55422 additions and 0 deletions

View File

@ -6,3 +6,5 @@ title: Pages
A very serious look at [horses in philosophy](./horse).
A [random short story prompt](./prompt/).

17
src/page/prompt/genre.txt Normal file
View File

@ -0,0 +1,17 @@
{"name":"Action/Adventure","desc":"A suspenseful story in which a mission involving risk and danger forms the primary storyline. The protagonist, who is typically operating outside the course of his or her daily life, embarks on a journey to confront obstacles and prove worthiness. Action sequences are frequently featured, especially those involving chases, explosions, and attacks. This genre has its roots in Greek and Medieval literature, including Homers classic epic poem, the Iliad, which tells of the battles and events during the weeks of a quarrel between King Agamemnon and the warrior Achilles. Common elements: likeable hero, unlikeable antagonist, physical action, fast pace, violence, changeable setting."}
{"name":"Comedy","desc":"A story that typically maintains a light, satirical, or familiar tone and features amusing characters and situations. Humor is the fundamental driving force. The word “comedy” comes from the Greek word komos, which means revelry or merry-making--and indeed, comedy has its origins in ancient Athens, where it was used in celebrations dedicated to the Greek god of wine and revelry. Subgenres of comedies include screwball comedies, which derive humor from improbable situations and characters, black comedies, which have darker undertones, and romantic comedies, which focus on the antics of lovestruck characters. Common elements: love and sex, stock characters and situations, everyday speech, puns, and cheerful endings."}
{"name":"Crime Caper","desc":"A lighthearted crime story in which the main characters perpetrate one or more crimes--e.g. thefts, swindles, or kidnappings--in full view of the reader or filmgoer. The plot focuses on the criminals and their attempts at escape or atonement. Scenes often leverage offbeat humor and acts of unusual cleverness or audacity. Common elements: The criminals are the main characters (the investigative team may appear but is not the main focus), complicated plots, flawed protagonists."}
{"name":"Drama","desc":"A story that relies on the emotional and relational development of realistic characters. Themes are often drawn from intense, real life issues such as addiction, infidelity, race and class tension, disease, and corruption to name a few. Conflict, which is a central component, may arise internally, within the main character, or may exist among multiple characters. Common elements: realistic characters, emotional themes, depth, moral grappling, conflict."}
{"name":"Fairy Tale","desc":"A narrative that often features folkloric characters such as fairies, elves, trolls, or witches engaged in fantastic or magical events that illuminate universal truths. Fairy tales usually exist in a time-suspended context, with minimal references to actual events, people, and places. They are often short and intended for children, although there are exceptions to that rule. Common elements: conflict between good and evil, talking animals, royalty, archetypes, use of traditional beginnings and endings, i.e., “Once upon a time...” and “...happily ever after.”"}
{"name":"Fantasy","desc":"An imaginative story that typically weaves magic or other supernatural phenomena into a self-coherent plot or setting (e.g. magic spells, mythical creatures, fabled kingdoms, witchcraft, wizardry, medieval universes). Unlike science fiction and horror stories, fantasy stories usually avoid deeply scientific themes or macabre plots. They tend to take place in imaginary worlds where magic and magical creatures are common, and they may serve as a bridge between medievalism and popular culture. Common elements: magic, mythological undertones, internal coherence, adventure."}
{"name":"Ghost Story","desc":"A frightening story premised on the possibility of ghosts, which may appear by their own volition or through summoning by magic. Ghost stories are usually scary, leveraging suspense, a sense of the uncanny, and supernatural occurrences to elicit feelings of fear and foreboding. Ghosts appear in literature as early as Homers Odyssey, which chronicles the hero encountering spirits of the dead during a journey to the underworld. Common elements: hauntings, supernatural intervention, chilling and suspenseful atmospheres."}
{"name":"Historical Fiction","desc":"A story that takes place in a setting drawn from history. Historical fiction is usually presented from the perspective of the historical characters, whose behavior is consistent with the manners and social norms of the time. Scenes and dialogue are well researched and imaginatively reconstructed to be as authentic as possible. Common elements: believability, historically-accurate detail, authentic dialogue, historical settings and persons. While there are no rules on how far in the past a story must be set to qualify it as a historical fiction piece, many are in agreement that the story must be set at least 25 years or more in the past."}
{"name":"Horror","desc":"A story intended to provoke an emotional, psychological, or physical fear response in the audience. Horror stories frequently contain supernatural elements, though not always, and the central menace may serve as a metaphor for the fears of society. Common elements: eerie atmosphere, morbid themes, heightened suspense, focus on death and evil, uncanny situations and persons."}
{"name":"Mystery","desc":"A story that frequently involves a mysterious death or a crime to be solved, though not always. The main character is often a detective who must consider a small group of suspects--each of whom must have a reasonable motive and opportunity for committing the crime. The detective eventually cracks the code by logical deduction from clues presented to the reader or filmgoer. Common elements: overt clues, hidden evidence, inference gaps, suspense, foreshadowing, red herrings."}
{"name":"Political Satire","desc":"A story that uses irony and sarcasm to expose human folly and vice in the political arena. Political satires often critique the status quo and, in doing so, offer alternatives and possibilities for improvements. Solutions are not a requirement of political satire. Instead, satires job is to reveal problems and contradictions--it is not obligated to solve them. Common elements: wit, irony, sarcasm, parody, exaggeration, juxtaposition, double entendre."}
{"name":"Romance","desc":"A story that typically revolves around two people as they develop romantic love for each other and try to build a relationship. Romance stories may explore love at first sight, forbidden love, or love triangles. Common elements: a central love story and a complex and emotionally satisfying ending."}
{"name":"Romantic Comedy","desc":"A story that combines love and humor. Typically, these are stories with light, funny plotlines centered on romantic ideals such as fate and true love. Romantic comedies often feature couples that are polar opposites in terms of temperament, social status, or situation in life. Common elements: voiceovers, comedy, awkwardness, sexual innuendo, “meet cute” (when one character meets another character in a cute way)."}
{"name":"Science Fiction","desc":"An imaginative story, usually set in the future or in an alternative universe, in which new technology, scientific principles, or political systems are developed or applied. Science fiction frequently explores the potential consequences of scientific, social, or other innovations, and has been called a “literature of ideas.” Common elements: futuristic technologies, outer space, alternative visions of earth and society."}
{"name":"Spy","desc":"A story that involves espionage, secret agents, or secret service organizations as an important context or plot device. Spy fiction emerged in the early twentieth century, propelled by the establishment of modern intelligence agencies and rivalries between them. Common elements: espionage, secret agents, rogue states, organized crime, fundamentalism, terrorist networks, technological sabotage."}
{"name":"Suspense","desc":"A story that slowly generates feelings of anxiety, anticipation and uncertainty in the audience. Typically the main character becomes aware of danger only gradually, thus exacerbating the audiences discomfort. Common elements: slower pace, heightened anticipation, audience knows more than main character, dramatic music."}
{"name":"Thriller","desc":"A fast-paced, gripping, plot-centered story that invokes an emotional thrill by mixing intense fear and excitement. Usually the protagonist is in danger from the outset. These fast-paced stories typically involve major threats to the main character and/or wider society and the attempts to prevent something from occurring. Common elements: faster pace, action scenes, plot twists, prominent villain, “ticking clock” timing."}

83
src/page/prompt/index.md Normal file
View File

@ -0,0 +1,83 @@
---
title: Random Prompt Generator
---
This prompt is randomly generated using the current day as a seed.
<a id=new href="#"></a>
Sources: [[1]](https://www.nycmidnight.com/genres) [[2]](https://52prompts.com/random-location-generator/) [[3]](https://archive.ph/tDYtI)
***
*Genre:* <abbr id=genre>Loading...</abbr> <noscript>Mystery</noscript>
*Location:* <span id=loc>Loading...</span> <noscript>This web page</noscript>
*Required word: one of* <span id=word>...</span> <noscript>This, page, requires, JavaScript</noscript>
Length: 1,000 words
<script>
// PRNG for deterministic prompt randomization
// https://stackoverflow.com/a/47593316
function sfc32(a, b, c, d) {
return function() {
a |= 0; b |= 0; c |= 0; d |= 0;
var t = (a + b | 0) + d | 0;
d = d + 1 | 0;
a = b ^ b >>> 9;
b = c + (c << 3) | 0;
c = (c << 21 | c >>> 11);
c = c + t | 0;
return (t >>> 0) / 4294967296;
}
}
let params = new URL(document.location).searchParams;
let now = new Date();
let a = params.get("a") || `${now.getFullYear()}`;
let b = params.get("b") || `${now.getMonth()}`;
let c = params.get("c") || `${now.getDay()}`;
let d = params.get("d") || `${now.getFullYear()}${now.getMonth()}${now.getDay()}`;
console.log("Seeds:", a, b, c, d);
rand = sfc32(+a, +b, +c, +d);
// takes a few iterations to get rolling
rand(); rand(); rand(); rand(); rand();
// pre-choose some randoms to avoid race conditions
// the words fetch will call rand() another few thousand times
let genreRand = rand();
let locRand = rand();
let wordRand = Math.floor(10 * rand());
fetch("genre.txt")
.then(response => response.text())
.then(genres => {
let genreList = genres.split("\n");
let genre = JSON.parse(genreList[Math.floor(genreRand * genreList.length)]);
document.getElementById("genre").innerText = genre.name;
document.getElementById("genre").title = genre.desc;
});
fetch("location.txt")
.then(response => response.text())
.then(text => {
let locationList = text.split("\n");
let loc = locationList[Math.floor(locRand * locationList.length)];
document.getElementById("loc").innerText = loc;
});
fetch(`words${wordRand}.txt`)
.then(response => response.text())
.then(text => {
let wordList = text.split("\n");
let words = wordList
.map(word => ({ word, sort: rand() }))
.sort((a, b) => a.sort - b.sort)
.map(({ word }) => `<a href="https://www.dictionary.com/browse/${word}">${word}</a>`)
.slice(0, 5)
.join(", ");
document.getElementById("word").innerHTML = words;
let link = document.getElementById("new");
link.href = `?a=${Math.floor(rand() * 1e9)}&b=${Math.floor(rand() * 1e9)}&c=${Math.floor(rand() * 1e9)}&d=${Math.floor(rand() * 1e9)}`;
link.innerText = "New prompt";
});
</script>

View File

@ -0,0 +1,140 @@
Gas Station
Cottage
Bakery
Pizzaria
Department store
Arboretum
Zoo
Farm
Plantation
Mansion
Coffee shop
Forest
Backyard
Garden
Daycare
Gym
Mall
Rest stop
Street corner
Jewelry store
Shoe store
Hut
The beach
Boardwalk
School
Lunch room
Office
Amusement park
Carnival
Restaurant
Burger joint
Food truck
Aquarium
Church
Basketball court
Baseball park
Park
Concert stadium
Bar
Car wash
Lounge
Auto repair place
Garage
Corn maze
Doctors office
Dump
Grocery store
Library
Hospital
Cave
Downtown
Bank
Warehouse
Airport
Boxing club
Police station
Jail
Prison
Cruise ship
Nursing home
Airplane
Swimming pool
Playground
Cemetery
Desert
Museum
Bowling alley
Arcade
Cellar
Yacht
Marina
Hotel
Collage campus
Casino
Balcony
Movie theater
Pawn shop
Whiskey bar
Blues bar
Camp site
Pumpkin patch
Laundromat
Fast food restaurant
Lake house
Vineyard
Food court
Kitchen
Hardware store
Cabin
Art gallery
Ambulance
Antique store
Attic
Barbershop
Boat
Chiropractor\s office
Dance studio
Fire station
Golf course
Hardware store
Helicopter
Ski slope
Jewelry store
Karaoke bar
Yarn shop
Barn
Lighthouse
Nursing home
Office cubicle
Pet store
Police station
Summer camp
Tree house
Unemployment office
Garage sale
Classroom
Gymnasium
Lunch room
Construction site
Wax museum
Funeral home
Bike shop
Office
Candy store
Photo booth
Morgue
Sauna
Storage locker
Liquor store
Subway
Waiting room
Skate park
Lobby
Green house
Ice rink
Court room
Flea market
Basement
Bathroom
Driveway

5518
src/page/prompt/words0.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words1.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words2.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words3.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words4.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words5.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words6.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words7.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words8.txt Normal file

File diff suppressed because it is too large Load Diff

5518
src/page/prompt/words9.txt Normal file

File diff suppressed because it is too large Load Diff