mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
build(site): [SITE-07] reproduce historical Unicode data and ship source notices
This commit is contained in:
1 parent
1fed96a909
commit
65368809ee
38 files changed
+78160
-9
No files matched your search
@@ -0,0 +1,34 @@
|
||||
|
||||
var http = require('http');
|
||||
var fs = require('fs');
|
||||
|
||||
function fetchFile(PATH, DEST) {
|
||||
|
||||
var options = {
|
||||
hostname: 'www.unicode.org',
|
||||
port: 80,
|
||||
path: PATH,
|
||||
method: 'GET'
|
||||
};
|
||||
|
||||
var req = http.request(options, (res) => {
|
||||
var dest = fs.createWriteStream(DEST);
|
||||
|
||||
console.log(`STATUS: ${res.statusCode}`);
|
||||
console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
|
||||
res.pipe(dest);
|
||||
});
|
||||
|
||||
req.on('error', (e) => {
|
||||
console.log(`problem with request: ${e.message}`);
|
||||
});
|
||||
|
||||
// write data to request body
|
||||
req.end();
|
||||
}
|
||||
|
||||
// fetchFile(`/Public/9.0.0/ucd/UnicodeData.txt`, './UnicodeData.txt');
|
||||
// 10.0.0 is still a WIP, but some emojis only show up in 10.0.0
|
||||
fetchFile(`/Public/10.0.0/ucd/UnicodeData-10.0.0d5.txt`, './UnicodeData.txt');
|
||||
|
||||
fetchFile(`/Public/emoji/5.0/emoji-test.txt`, './emoji-test.txt');
|
||||
Reference in new issue
Block a user