Skip to content

Semi-automatically writing Wikipedia list articles using Wikidata/Wikipedia APIs

License

Notifications You must be signed in to change notification settings

colinmorris/wiki-listicle-generation

Repository files navigation

A hacky experiment in semi-automatically creating a Wikipedia list article using data from Wikidata, and Wikipedia categories. Target first article is "List of gay novels prior to the Stonewall riots".

  • scrape_gay_novel_data.py grabs all pages in Wikipedia's "Novels with gay themes" category, and fetches the corresponding Wikidata item. Writes results to noveldat.json.
  • write_listicle.py generates a file containing wikitext table populated with data from noveldat.json

prematter.wiki and postmatter.wiki contain hand-written wikitext to precede and follow the generated table. The final article is the result of catting them with the table generated by write_listicle.py sandwiched in the middle.

About

Semi-automatically writing Wikipedia list articles using Wikidata/Wikipedia APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages