Skip to content

Commit

Permalink
Merge pull request #447 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain authored Dec 14, 2021
2 parents f0acbbf + 5eb18af commit 1c00408
Show file tree
Hide file tree
Showing 13 changed files with 847 additions and 796 deletions.
6 changes: 4 additions & 2 deletions builds/wtf_wikipedia-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* wtf_wikipedia 9.0.2 MIT */
/* wtf_wikipedia 9.0.3 MIT */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -533,6 +533,8 @@
'disamb', //en
'disambig', //en
'disambiguation', //en
// Disambiguation_message_boxes
'letter-numbercombdisambig', 'letter-number combination disambiguation', 'dmbox', 'airport disambiguation', 'biology disambiguation', 'call sign disambiguation', 'caselaw disambiguation', 'chinese title disambiguation', 'disambiguation cleanup', 'genus disambiguation', 'hospital disambiguation', 'human name disambiguation', 'human name disambiguation cleanup', 'letter-number combination disambiguation', 'mathematical disambiguation', 'military unit disambiguation', 'music disambiguation', 'number disambiguation', 'opus number disambiguation', 'phonetics disambiguation', 'place name disambiguation', 'portal disambiguation', 'road disambiguation', 'school disambiguation', 'species latin name abbreviation disambiguation', 'species latin name disambiguation', 'station disambiguation', 'synagogue disambiguation', 'taxonomic authority disambiguation', 'taxonomy disambiguation', 'template disambiguation', 'disamb2', 'disamb3', 'disamb4', 'disambiguation lead', 'disambiguation lead name', 'disambiguation name', 'disamb-term', 'disamb-terms', // i18n
'aðgreining', //is
'aimai', //ja
'ałtsʼáʼáztiin', //nv
Expand Down Expand Up @@ -9725,7 +9727,7 @@

var _fetch = fetch$2;

var _version = '9.0.2';
var _version = '9.0.3';

const unfetch = browser;
/**
Expand Down
2 changes: 1 addition & 1 deletion builds/wtf_wikipedia-client.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/wtf_wikipedia-client.mjs

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions builds/wtf_wikipedia.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* wtf_wikipedia 9.0.2 MIT */
/* wtf_wikipedia 9.0.3 MIT */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('isomorphic-unfetch')) :
typeof define === 'function' && define.amd ? define(['isomorphic-unfetch'], factory) :
Expand Down Expand Up @@ -464,6 +464,8 @@
'disamb', //en
'disambig', //en
'disambiguation', //en
// Disambiguation_message_boxes
'letter-numbercombdisambig', 'letter-number combination disambiguation', 'dmbox', 'airport disambiguation', 'biology disambiguation', 'call sign disambiguation', 'caselaw disambiguation', 'chinese title disambiguation', 'disambiguation cleanup', 'genus disambiguation', 'hospital disambiguation', 'human name disambiguation', 'human name disambiguation cleanup', 'letter-number combination disambiguation', 'mathematical disambiguation', 'military unit disambiguation', 'music disambiguation', 'number disambiguation', 'opus number disambiguation', 'phonetics disambiguation', 'place name disambiguation', 'portal disambiguation', 'road disambiguation', 'school disambiguation', 'species latin name abbreviation disambiguation', 'species latin name disambiguation', 'station disambiguation', 'synagogue disambiguation', 'taxonomic authority disambiguation', 'taxonomy disambiguation', 'template disambiguation', 'disamb2', 'disamb3', 'disamb4', 'disambiguation lead', 'disambiguation lead name', 'disambiguation name', 'disamb-term', 'disamb-terms', // i18n
'aðgreining', //is
'aimai', //ja
'ałtsʼáʼáztiin', //nv
Expand Down Expand Up @@ -9656,7 +9658,7 @@

var _fetch = fetch$2;

var _version = '9.0.2';
var _version = '9.0.3';

const unfetch = require$$0__default["default"];
/**
Expand Down
6 changes: 4 additions & 2 deletions builds/wtf_wikipedia.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* wtf_wikipedia 9.0.2 MIT */
/* wtf_wikipedia 9.0.3 MIT */
import require$$0 from 'isomorphic-unfetch';

/**
Expand Down Expand Up @@ -456,6 +456,8 @@ var disambig_templates = ['dab', //en
'disamb', //en
'disambig', //en
'disambiguation', //en
// Disambiguation_message_boxes
'letter-numbercombdisambig', 'letter-number combination disambiguation', 'dmbox', 'airport disambiguation', 'biology disambiguation', 'call sign disambiguation', 'caselaw disambiguation', 'chinese title disambiguation', 'disambiguation cleanup', 'genus disambiguation', 'hospital disambiguation', 'human name disambiguation', 'human name disambiguation cleanup', 'letter-number combination disambiguation', 'mathematical disambiguation', 'military unit disambiguation', 'music disambiguation', 'number disambiguation', 'opus number disambiguation', 'phonetics disambiguation', 'place name disambiguation', 'portal disambiguation', 'road disambiguation', 'school disambiguation', 'species latin name abbreviation disambiguation', 'species latin name disambiguation', 'station disambiguation', 'synagogue disambiguation', 'taxonomic authority disambiguation', 'taxonomy disambiguation', 'template disambiguation', 'disamb2', 'disamb3', 'disamb4', 'disambiguation lead', 'disambiguation lead name', 'disambiguation name', 'disamb-term', 'disamb-terms', // i18n
'aðgreining', //is
'aimai', //ja
'ałtsʼáʼáztiin', //nv
Expand Down Expand Up @@ -9648,7 +9650,7 @@ const fetch$2 = function (title, options, callback) {

var _fetch = fetch$2;

var _version = '9.0.2';
var _version = '9.0.3';

const unfetch = require$$0;
/**
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
- **[breaking]** - plural methods like .sentences() always return arrays, even with a 'clue' param.
-->

#### 9.0.3
- **[fix]** - typescript error
- **[change]** - update demos

#### 9.0.1

- **[fix]** - runtime error in cli (thanks maxlath!)
Expand Down
56 changes: 26 additions & 30 deletions demo/basic.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
<html></html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>
<body>
<div class="m4">
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
</div>
<div class="m2">
<div>ES5 build:</div>
<b class="m2" id="result">loading...</b>
</div>

<div class="m2">
<div>ESModule:</div>
<b class="m2" id="module">loading...</b>
</div>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>

<body>
<div class="m4">
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
</div>
<div class="m2">
<div>Radiohead members:</div>
<b class="m2" id="result">loading...</b>
</div>

<!-- load minified build -->
<script src="../builds/wtf_wikipedia-client.min.js"></script>
<script defer>
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => {
let val = doc.infobox(0).get('current_members')
let members = val.links().map((link) => link.page())
document.querySelector('#result').innerHTML = members.join(', ')
})
</script>
</body>

<!-- load minified build -->
<script src="../builds/wtf_wikipedia-client.min.js"></script>
<script defer>
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => {
let val = doc.infobox(0).get('current_members')
let members = val.links().map((link) => link.page())
document.querySelector('#result').innerHTML = members.join(', ')
})
</script>
</body>
</html>
</html>
55 changes: 26 additions & 29 deletions demo/es-module.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
<html></html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>
<body>
<div class="m4">
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
</div>
<div class="m2">
<div>ES5 build:</div>
<b class="m2" id="result">loading...</b>
</div>

<div class="m2">
<div>ESModule:</div>
<b class="m2" id="module">loading...</b>
</div>
<!-- test es-module -->
<script type="module">
import wtf from '../builds/wtf_wikipedia-client.mjs'
wtf.fetch('Toronto Raptors').then(doc => {
let coach = doc.infobox().get('coach')
document.querySelector('#module').innerHTML = coach.text() //'Nick Nurse'
})
</script>
</body>
</html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>

<body>
<div class="m4">
client-side test for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
</div>

<div class="m2">
<div>Raptors Coach:</div>
<b class="m2" id="module">loading...</b>
</div>
<!-- test es-module -->
<script type="module">
import wtf from '../builds/wtf_wikipedia-client.mjs'
wtf.fetch('Toronto Raptors').then(doc => {
let coach = doc.infobox().get('coach')
document.querySelector('#module').innerHTML = coach.text() //'Nick Nurse'
})
</script>
</body>

</html>
29 changes: 29 additions & 0 deletions demo/plugin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/spencer-css" />
</head>

<body>
<div class="m4">
client-side plugin demo for <a href="https://github.com/spencermountain/wtf_wikipedia">wtf_wikipedia</a>
</div>
<script src="https://unpkg.com/wtf_wikipedia"></script>
<script src="https://unpkg.com/wtf-plugin-classify"></script>
<script defer>
window.onload = function () {
wtf.plugin(window.wtfClassify)
wtf.fetch('On a Friday', { lang: 'en' }).then((doc) => {
document.querySelector('#result').innerHTML = `
<div >${doc.title()}</div>
<pre >${JSON.stringify(doc.classify(), null, 2)}</pre>
`
})
}
</script>
</body>

</html>
Loading

0 comments on commit 1c00408

Please sign in to comment.