mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 03:51:25 -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,36 @@
|
||||
|
||||
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/13.0.0/ucd/UnicodeData.txt`, './UnicodeData.txt');
|
||||
|
||||
fetchFile(`/Public/emoji/13.1/emoji-test.txt`, './emoji-test.txt');
|
||||
|
||||
fetchFile(`/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt`, './GraphemeBreakProperty.txt');
|
||||
|
||||
fetchFile(`/Public/13.0.0/ucd/emoji/emoji-data.txt`, './emoji-data.txt');
|
||||
Reference in new issue
Block a user