2024-12-03 23:13:28 +00:00
|
|
|
/**
|
|
|
|
* Load a frame, and store it in the message base
|
|
|
|
*/
|
|
|
|
|
|
|
|
load('ansitex/load/page.js');
|
|
|
|
load('ansitex/load/funcs.js');
|
|
|
|
load('lz-string.js');
|
|
|
|
|
|
|
|
/* parse command arguments */
|
|
|
|
if (argv.length !== 1) {
|
|
|
|
writeln('ERROR: Need a frame ID');
|
|
|
|
exit(1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
writeln('Importing frame:'+argv[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
var po = new PageObject(argv[0]);
|
|
|
|
|
|
|
|
// Load ANSItex frame
|
|
|
|
var SESSION_EXT = 'tex';
|
|
|
|
require('ansitex/load/session/ansitex.js','SESSION_ANSITEX');
|
|
|
|
var p = new Page();
|
|
|
|
p.get(po);
|
|
|
|
|
|
|
|
// Load Viewdata frame
|
|
|
|
var SESSION_EXT = 'vtx';
|
|
|
|
require('ansitex/load/session/viewdata.js','SESSION_VIEWDATA');
|
|
|
|
|
2024-12-09 05:12:49 +00:00
|
|
|
var vtx = p.file_content(FRAMES_HOME+SESSION_EXT+'/'+po.toString()+'.'+CONTENT_EXT);
|
|
|
|
|
|
|
|
if (vtx !== undefined)
|
|
|
|
p.raw = vtx;
|
2024-12-03 23:13:28 +00:00
|
|
|
|
|
|
|
p.save();
|