diff --git a/core/config.js b/core/config.js index 1e69b6ef..e425bdfa 100644 --- a/core/config.js +++ b/core/config.js @@ -319,7 +319,7 @@ function getDefaultConfig() { // http://manpages.ubuntu.com/manpages/trusty/man1/xdms.1.html cmd : 'xdms', args : [ 'f', '{filePath}' ] - } + }, }, fileTypes : { @@ -460,6 +460,12 @@ function getDefaultConfig() { ext : '.dms', shortDescUtil : 'XDMS2Desc', longDescUtil : 'XDMS2LongDesc', + }, + { + desc : 'SIO2PC Atari Disk Image', + sig : '9602', // 16bit sum of "NICKATARI" + ext : '.atr', + archiveHandler : 'Atr', } ] }, @@ -581,6 +587,26 @@ function getDefaultConfig() { cmd : 'tar', args : [ '-xvf', '{archivePath}', '-C', '{extractPath}', '{fileList}' ], } + }, + + Atr : { + decompress : { + cmd : 'atr', + args : [ '{archivePath}', 'x', '-a', '-o', '{extractPath}' ] + }, + list : { + cmd : 'atr', + args : [ '{archivePath}', 'ls', '-la1' ], + entryMatch : '^[rwxs-]{5}\\s+([0-9]+)\\s\\([0-9\\s]+\\)\\s([^\\r\\n\\s]*)(?:[^\\r\\n]+)?$', + }, + extract : { + cmd : 'atr', + // :TODO: If text, we need to ensure to normalize + // :TODO: can only do a single file & need full path. May need e.g. {fileName}, '{extractPath}\{fileName}' ??? + // ....create a small wrapper .js: atrex.js --extract {archivePath} --to {extractPath} + // note: -l converts Atari 0x9b line feeds to 0x0a; not ideal if we're dealing with a binary of course. + args : [ '{archivePath}', 'x', '-a', '-o', '{extractPath}', '{fileList}' ] + } } }, },