forked from spencermountain/wtf_wikipedia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scratch.js
37 lines (33 loc) · 1.02 KB
/
scratch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
const wtf = require('./src/index');
// const wtf = require('./builds/wtf_wikipedia');
// const wtf = require('./build');
function from_file(page) {
let str = require('fs').readFileSync('./tests/cache/' + page.toLowerCase() + '.txt', 'utf-8');
let options = {
};
let r = wtf.parse(str, options);
console.log(r.sections[0].tables);
// console.log(r);
}
// wtf.from_api('Aldous Huxley', 'en', function(markup) {
// var obj = wtf.parse(markup);
// console.log(obj.infoboxes[0].data.birth_date);
// });
// from_file('list');
// from_file('bluejays');
// from_file('earthquakes');
// from_file('al_Haytham');
// from_file('redirect');
from_file('raith_rovers');
// from_file('royal_cinema');
// from_file('Toronto_Star');
// from_file('royal_cinema');
// from_file('Radiohead');
// from_file('Jodie_Emery');
// from_file('Redirect')
// from_file("Africaans")
// from_file('K.-Nicole-Mitchell');
// from_file('United-Kingdom');
// from_file('Dollar-Point,-California');
// console.log(wtf.html(`pre-[[mirror stage]]`));