mirror of
https://github.com/yuzu-emu/shared-hugo-scripts
synced 2024-11-22 10:23:51 +00:00
Added twitter script.
This commit is contained in:
parent
62ced78589
commit
e60278dd62
3 changed files with 120 additions and 0 deletions
40
twitter/app.js
Normal file
40
twitter/app.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
const logger = require('winston');
|
||||
const jsonfile = require('jsonfile');
|
||||
|
||||
const outputFile = '../../../site/data/twitter.json';
|
||||
|
||||
const tweets = [
|
||||
{
|
||||
id: '817201197065109505',
|
||||
order: 1,
|
||||
date: '01/05/2017',
|
||||
author: 'citraemu',
|
||||
image: 'https://pbs.twimg.com/profile_images/699782793736359936/eMLbnRNR_normal.png',
|
||||
message: 'Citra nightlies are back up and better than ever! Sorry for the delay and Happy New Year!'
|
||||
},
|
||||
{
|
||||
id: '776626520110399488',
|
||||
order: 2,
|
||||
date: '09/15/2016',
|
||||
author: 'citraemu',
|
||||
image: 'https://pbs.twimg.com/profile_images/699782793736359936/eMLbnRNR_normal.png',
|
||||
message: 'After much anticipation, Citra now has a JIT! Props again to @MerryMage for another massive contribution to the project!!'
|
||||
},
|
||||
{
|
||||
id: '733831257398747137',
|
||||
order: 3,
|
||||
date: '05/20/2016',
|
||||
author: 'citraemu',
|
||||
image: 'https://pbs.twimg.com/profile_images/699782793736359936/eMLbnRNR_normal.png',
|
||||
message: 'Props to @MerryMage for a fantastic job on Citra\'s audio support https://t.co/Z23AWxcDkf'
|
||||
}
|
||||
];
|
||||
|
||||
jsonfile.writeFile(outputFile, tweets, err => {
|
||||
if (err) {
|
||||
logger.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info(`Wrote ${tweets.length} tweets to ${outputFile}`);
|
||||
});
|
65
twitter/package-lock.json
generated
Normal file
65
twitter/package-lock.json
generated
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"name": "citra-twitter",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
|
||||
"integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k="
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
||||
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
|
||||
},
|
||||
"cycle": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
|
||||
"integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI="
|
||||
},
|
||||
"eyes": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
|
||||
"integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A="
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.1.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
||||
"optional": true
|
||||
},
|
||||
"isstream": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||
"requires": {
|
||||
"graceful-fs": "4.1.11"
|
||||
}
|
||||
},
|
||||
"stack-trace": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
|
||||
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
|
||||
},
|
||||
"winston": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/winston/-/winston-2.4.0.tgz",
|
||||
"integrity": "sha1-gIBQuT1SZh7Z+2wms/DIJnCLCu4=",
|
||||
"requires": {
|
||||
"async": "1.0.0",
|
||||
"colors": "1.0.3",
|
||||
"cycle": "1.0.3",
|
||||
"eyes": "0.1.8",
|
||||
"isstream": "0.1.2",
|
||||
"stack-trace": "0.0.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
15
twitter/package.json
Normal file
15
twitter/package.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "citra-twitter",
|
||||
"version": "1.0.0",
|
||||
"description": "Used in Citra Hugo to import Twitter tweets.",
|
||||
"homepage": "https://citra-emu.org/",
|
||||
"author": "Flame Sage <chris062689@gmail.com>",
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"jsonfile": "^2.4.0",
|
||||
"winston": "^2.2.0"
|
||||
},
|
||||
"preferGlobal": false,
|
||||
"private": true,
|
||||
"license": "GPLv3"
|
||||
}
|
Loading…
Reference in a new issue