This repository contains a small tool that when added to your common.js
file on Wikipedia or any other Medaiwiki site, will provide you an interface to generate summary of article sections.
Demo video: https://www.youtube.com/watch?v=mja1C6FnWes
To install the Mediawiki Summarizer tool, follow the instructions below:
- Access your user page on Wikipedia or any other Wikimedia site by clicking on your username at the top right of the webpage.
- Navigate to your common.js page, which you can find as a subpage of your user page, such as User:YourUsername/common.js
- Click "Edit" at the top right of the common.js page.
- Copy and paste the following code snippet into the text editor on the common.js page:
mw.loader
.using(["oojs-ui-core", "oojs-ui.styles.icons-content"])
.done(function () {
var version = Date.now();
$.when(
mw.loader.getScript('https://tonythomas01.github.io/wikipedia-section-summaries/sectionFinder.js', 'text/javascript'),
mw.loader.getScript('https://tonythomas01.github.io/wikipedia-section-summaries/widget.js', 'text/javascript'),
mw.loader.load("https://tonythomas01.github.io/wikipedia-section-summaries/widget.css", "text/css")
).then(
function () {
initializeSectionSummarizer();
},
function (e) {
mw.log.error(e.message);
}
);
});
- Click "Save page" to save your changes.
- Create an OpenAI Key using: OpenAI API key
- Refresh your Wikipedia/Wikimedia page, and the Mediawiki Summarizer tool should now be available on supported pages.
The Mediawiki Summarizer will provide you with a summarized sections on Wikipedia or other Wikimedia sites. Look for an icon with a robot located in each long section in an article or a talk page.
If you encounter any issues or need help with the Mediawiki Summarizer tool, please submit an issue on the GitHub repository.