Sam Therapy
153ba14fab
All checks were successful
continuous-integration/drone/push Build is passing
- Convert to yarn v2 with zero installs - Refactor much of app to use config instead of flags Co-authored-by: Sam Therapy <sam@samtherapy.net> Reviewed-on: Sam/fediverse-imagebot#1
19 lines
404 B
TypeScript
19 lines
404 B
TypeScript
import getConfig from "./helpers/config.js";
|
|
import { config } from "./helpers/types.js";
|
|
import getLocalImage from "./local.js";
|
|
import getRemoteImage from "./remote.js";
|
|
|
|
/**
|
|
* Main function
|
|
*/
|
|
async function main() {
|
|
const conf: config = await getConfig();
|
|
|
|
if (conf.remote) await getRemoteImage(conf);
|
|
else await getLocalImage(conf);
|
|
return;
|
|
}
|
|
|
|
// Run the main function, obviously.
|
|
main();
|