wpi
wtf-plugin-i18n
npm i wtf-plugin-i18n
wpi

wtf-plugin-i18n

a pretty-committed wikipedia markup parser

by spencer kelly

1.0.1 (see all)License:MITTypeScript:Not Found
npm i wtf-plugin-i18n
Readme
wtf-plugin-i18n
a plugin for wtf_wikipedia

npm install wtf-plugin-i18n

This plugin adds support for many additional multi-language templates in wtf_wikipedia.

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-i18n'))

//'flag' template in arabic wikipedia
wtf('hello world {{علم|EU}}').text()
// 'hello world 🇪🇺'

let doc = wtf(`{{Cita libru |url=cool.com |title= citation template }}`)
doc.references().length
// 1
<script src="https://unpkg.com/wtf_wikipedia"></script>
<script src="https://unpkg.com/wtf-plugin-i18n"></script>
<script defer>
  wtf.plugin(window.wtfI18n)
  wtf.fetch('https://de.wikipedia.org/wiki/Hamburg').then((doc) => {
    console.log(doc.coordinates())
  })
</script>

work-in-progress

MIT

Downloads/wk

1

GitHub Stars

639

LAST COMMIT

9mos ago

MAINTAINERS

1

CONTRIBUTORS

62

OPEN ISSUES

50

OPEN PRs

0
VersionTagPublished
1.0.1
latest
4mos ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate