Added tweet translation mechanism (#96)

* Added tweet translation mechanism.

* Removed test translation.

It was done via Google Translate which I don't trust for this application.
This commit is contained in:
G Queiroz
2022-06-01 00:06:53 -03:00
committed by GitHub
parent 3687239cd9
commit 93743fc532
15 changed files with 1363 additions and 46 deletions

View File

@@ -71,6 +71,17 @@ module.exports = exports = class Manifest {
}
async get (task) {
if (task === undefined || task === null) {
console.error(task);
throw new Error('Task action is undefined or null.');
return;
}
if (task.input === undefined || task.input === null) {
console.error(task);
throw new Error('Task action is missing input. (tip: remove `twitter-cache.json` and run `gulp` again)');
return;
}
const hash = this.hash(task);
const { input, output, cache: altCachePath } = task;
const ext = path.extname(task.output);