You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. #!/usr/bin/env node
  2. const { readBinaryFileArch } = require('.');
  3. async function main() {
  4. const args = process.argv.slice(2);
  5. if (args.length !== 1) {
  6. console.log('Usage: read-binary-file-arch <path-to-file>');
  7. process.exit(1);
  8. }
  9. const filePath = args[0];
  10. try {
  11. const arch = await readBinaryFileArch(filePath);
  12. console.log(arch);
  13. } catch (error) {
  14. console.error(error.message);
  15. }
  16. }
  17. main();