forked from bluesky-social/social-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (30 loc) · 1.27 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Command } from 'commander';
import fetchPO from './src/fetchPO.js';
import updatePOT from './src/updatePOT.js';
import checkPO from './src/checkPO.js';
const program = new Command();
program
.description('Unofficial bridge between Bluesky and Transifex')
;
program.command('update-pot')
.description('Update the .pot file in this repository starting from the one generated from the Bluesky repository.')
.argument('<branch>', 'the name of the Bluesky branch')
.argument('<potFile>', 'the path to the Bluesky .pot file')
.argument('<outputDir>', 'the path to the output directory')
.argument('<ghOutput>', 'the value of the GITHUB_OUTPUT environment variable (may be empty)')
.action(updatePOT)
;
program.command('fetch-po')
.description('Fetch the .po files from Transifex and update this repository.')
.argument('<token>', 'the Transifex API token')
.argument('<output>', 'where to store the downloaded .po files')
.argument('<ghOutput>', 'the value of the GITHUB_OUTPUT environment variable (may be empty)')
.action(fetchPO)
;
program.command('check-po')
.description('Check if a .po file is valid.')
.argument('<file>', 'the path of the .po file to be checked')
.action(checkPO)
;
await program.parseAsync();
process.exit(0);