项目作者: Badisi

项目描述 :
NodeJS module utility which provides helpful functions to read and/or verify xbox360 backup iso file
高级语言: JavaScript
项目地址: git://github.com/Badisi/xbw.git
创建时间: 2015-12-13T22:07:15Z
项目社区:https://github.com/Badisi/xbw

开源协议:Other

下载



@badisi/xbw


🎮 NodeJS module utility which provides helpful functions to read and/or verify xbox360 backup iso files.



npm version


npm donwloads


license


build darwin-x64 status
build linux-x64 status
build win32-x64 status
build win32-ia32 status


Installation

xbw is pre-built for node >= 12 and electron on latest macos, linux and windows.

  1. npm install -g @badisi/xbw
  1. yarn global add @badisi/xbw

Usage

  1. $ xbw --help
  2. Usage:
  3. $ xbw <command> <file|folder...> [--help] [options]
  4. Global Commands:
  5. verify .... Verify backup iso files integrity against abgx360
  6. info ...... Extract information from backup iso files
  7. Examples:
  8. $ xbw info .
  9. $ xbw info backup1.iso backup2.iso path/to/backups/folder/
  10. $ xbw verify backup.iso --corrupt --af3 --patchgarbage --patchitanyway
  11. $ xbw verify backup1.iso backup2.iso path/to/backups/folder
  12. $ xbw verify backup.iso --html > output-file.html

API

This package can also be installed locally and used as an API.

  1. const { getIsosInfo, verifyWithAbgx360 } = require('@badisi/xbw');


getIsosInfo(isoPaths: string[]): IsoInfo[]

Extract information from backup iso files

Arguments

  • isoPaths - An array of absolute paths to iso files.

Return

An array of IsoInfo objects that have the following properties:

  • file: string - A string representing the path to the iso backup.
  • titleId: string - A string representing the title id.
  • mediaId: string - A string representing the media id.
  • discCount: number - An integer representing the number of disc.
  • discNumber: number - An integer representing the disc number.
  • regions: Region[] - An array representing the regions.
  • isValid: boolean - A boolean representing whether the file is a valid iso backup or not.

Example

  1. const { getIsosInfo } = require('@badisi/xbw');
  2. const isosInfo = getIsosInfo([
  3. '/Users/User/backups/Game.iso',
  4. '/test.iso'
  5. ]);
  6. console.log(isosInfo);
  7. // => [{
  8. // file: '/Users/User/backups/Game.iso',
  9. // titleId: '12345678',
  10. // mediaId: 'A1B2C3D4',
  11. // discCount: 2,
  12. // discNumber: 1,
  13. // regions: [
  14. // 'PAL'
  15. // 'NTSC_U'
  16. // ],
  17. // isValid: true
  18. // }, {
  19. // file: '/test.iso',
  20. // isValid: false
  21. // }]

verifyWithAbgx360(isoPaths: string[], options?: AbgxOptions, onProgress?: (progress: string) => void): Promise

Verify backup iso files integrity against abgx360

Arguments

  • isoPaths - An array of absolute paths to iso files.
  • options - (Optional) An object of abgx360 options.
  • onProgress - (Optional) A callback which is called for every processed output.

Return

An array of AbgxFile objects that have the following properties:

  • file: string - A string representing the path to the iso backup.
  • status: AbgxStatus - Possible values are: VERIFIED = 0, ERROR = -1, DATA_ERROR = -2 and STEALTH_ERROR = -3.

Example

  1. const { verifyWithAbgx360 } = require('@badisi/xbw');
  2. const files = [
  3. '/Users/User/backups/Game.iso',
  4. '/test.iso'
  5. ];
  6. const abgxOptions = {
  7. corrupt: true,
  8. af3: true,
  9. patchgarbage: true,
  10. patchitanyway: true,
  11. html: true
  12. };
  13. verifiedWithAbgx360(files, options, console.log)
  14. .then(results => console.log(results))
  15. .catch(error => console.error(error));
  16. // => [{
  17. // file: '/Users/User/backups/Game.iso',
  18. // status: 0
  19. // }, {
  20. // file: '/test.iso',
  21. // status: -1
  22. // }]

Credit

License

Copyright © 2013 Badisi

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to use, copy, publish and/or distribute the Software,
but with restriction including the rights to modify, merge, sublicense
and/or sell copies of the Software, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.