cd /news/large-language-models/a-script-used-to-generate-wikipedia-… · home topics large-language-models article
[ARTICLE · art-36092] src=gist.github.com ↗ pub= topic=large-language-models verified=true sentiment=· neutral

A script used to generate Wikipedia-style pages via ChatGPT

A developer created a script called 'mypedia' that uses ChatGPT to generate short, balanced reference pages in the style of Wikipedia articles. The script takes a name as input, prompts ChatGPT to produce a neutral summary with links to authoritative sources, and saves the output as a Markdown file both locally and to an S3 bucket for public access.

read2 min views12 publishedJun 12, 2026

| //mypedia -- build a short, balanced reference page about a name, using ChatGPT. | |

| const name = args [0]; | |
| if (name === undefined) { | |
| console.log ("Usage: belt mypedia.belt \"name\""); | |

| } | | | else { | | | //first-cut prompt -- refine the wording here. | | | const prompt = "Build a short, balanced reference page about " + name + ". " | | | + "Follow the structure of a Wikipedia article but keep it brief -- an outline of the basic facts, not a long detailed treatment. " | | | + "Cover who or what it is, why it matters, and the essential history. " | | | + "Stay neutral; where there is controversy, note the main sides briefly rather than taking one. " | | | + "Include links to authoritative web sources so the reader can follow the original work. " | | | + "Return the page as Markdown, starting with a top-level heading for the name."; | |

| const markdown = chatGpt.ask (prompt); | |
| const hyphenated = string.replaceAll (name, " ", "-"); | |

| //local copy. | | | const filepath = config.user.prefs.publicfolder + "mypedia/" + hyphenated + ".md"; | |

| file.sureFilePath (filepath); | |
| file.writeWholeFile (filepath, markdown); | |
| console.log ("Wrote " + filepath); | |

| //S3 copy at a calendar-structured, lowercase path, served by PagePark. | |

| const now = new Date (); | |
| const year = now.getFullYear (); | |
| const month = ("0" + (now.getMonth () + 1)).slice (-2); | |
| const day = ("0" + now.getDate ()).slice (-2); | |

| const datepath = year + "/" + month + "/" + day; | | | const slug = hyphenated.toLowerCase () + ".md"; | | | const s3path = "/scripting/mypedia/" + datepath + "/" + slug; | |

| s3.newObject (s3path, markdown, "text/markdown", "public-read"); | |
| console.log ("https://library.scripting.com/" + datepath + "/" + slug); | |

| } |

── more in #large-language-models 4 stories · sorted by recency
── more on @chatgpt 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-script-used-to-gen…] indexed:0 read:2min 2026-06-12 ·