{"id":17166731,"url":"https://github.com/willf/nanogenmo-2021","last_synced_at":"2025-03-24T18:15:45.838Z","repository":{"id":66569810,"uuid":"424027623","full_name":"willf/NaNoGenMo-2021","owner":"willf","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-03T00:05:52.000Z","size":449,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T12:52:25.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-02T23:16:16.000Z","updated_at":"2022-04-09T16:34:06.000Z","dependencies_parsed_at":"2023-07-14T03:30:52.397Z","dependency_job_id":null,"html_url":"https://github.com/willf/NaNoGenMo-2021","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2FNaNoGenMo-2021","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2FNaNoGenMo-2021/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2FNaNoGenMo-2021/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2FNaNoGenMo-2021/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willf","download_url":"https://codeload.github.com/willf/NaNoGenMo-2021/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245325221,"owners_count":20596818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T23:06:30.069Z","updated_at":"2025-03-24T18:15:45.820Z","avatar_url":"https://github.com/willf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NaNoGenMo 2021 Entry\n## Will Fitzgerald\n\n## Brainstorming Movies\n\n**First of all: [The Results](nanogenmo2021.md)**\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/1/1f/The_Pleasure_Seekers_%281920%29_-_4.jpg\"  width=\"200\" /\u003e\n\nHere's the basic idea:\n\n1. Get a big list of movie names, say, from [American films from 1920](https://en.wikipedia.org/wiki/List_of_American_films_of_1920)\n2. Generate a prompt from this information to send to OpenAI's generate API.\n3. Turn this all into a story.\n\nMost of the code here is about managing text. Basically, things go through these stages:\n\n1. First a [text file](table.txt) was created from [Wikipedia](https://en.wikipedia.org/wiki/List_of_American_films_of_1920). This was done manaually.\n2. Then this is parsed, and a [JSONL-format](https://jsonlines.org) file is created, with parsed information, one per line: [table.json](table.json).\n3. Then, this is enriched by creating a prompt which is sent to the Open API and then collecting the result and adding it to the dictionaries, again, one per line: [synopsis.json](synopsis.json).\n4. Then, a script is run to create the result, which is called [Possible Movies](nanogenmo2021.md).\n\n```bash\n❯ python nanogenmo2021.py --help              \nusage: nanogenmo2021.py [-h] [--table TABLE] [--json JSON]\n                        [--synopsis SYNOPSIS] [--story STORY] [--n N]\n                        [--create_json] [--create_story] [--create_synopses]\n\n@willf nanogenmo2021\n\noptional arguments:\n  -h, --help           show this help message and exit\n  --table TABLE        input wiki file\n  --json JSON          JSON file pre-synopses\n  --synopsis SYNOPSIS  JSON file with Synopsis\n  --story STORY        story file\n  --n N                number of stories to generate\n  --create_json        create json file\n  --create_story       create story file\n  --create_synopses    create synopsis file\n```\n\nThat is, something like:\n\n```bash\npython nanogenmo2021.py --create_json\npython nanogenmo2021.py --create_synopses\npython nanogenmo2021.py --create_story\n```\n\nThe prompt, for an original line like this:\n\n```wikipedia\n[[The Adventurer (1920 film)|The Adventurer]] || [[J. Gordon Edwards]] || [[William Farnum]], [[Estelle Taylor]] || Historical || [[Fox Film]]\n```\nis:\n\n\u003e The Adventurer is a historical movie directed by J. Gordon Edwards. It stars William Farnum and Estelle Taylor. Give a synopsis of the movie.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fnanogenmo-2021","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillf%2Fnanogenmo-2021","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fnanogenmo-2021/lists"}