diff --git a/ansitex.src b/ansitex.src deleted file mode 100644 index 3cb80de..0000000 --- a/ansitex.src +++ /dev/null @@ -1 +0,0 @@ -exec "?ansitex" diff --git a/main.js b/main.js index 9cc40f1..dece69d 100644 --- a/main.js +++ b/main.js @@ -7,7 +7,7 @@ */ log(LOG_DEBUG,'* INIT: ANSItex'); -var debug_mode = 'ansitex/at0593/10010011'; // eg: 'user/password/10010010001'; +var debug_mode = ''; // eg: 'user/password/10010010001'; // SBBS Key definitions require('key_defs.js','KEY_ESC'); diff --git a/export.js b/tools/export.js similarity index 100% rename from export.js rename to tools/export.js diff --git a/tools/frame_load.js b/tools/frame_load.js new file mode 100644 index 0000000..a49098c --- /dev/null +++ b/tools/frame_load.js @@ -0,0 +1,29 @@ +load('ansitex/load/funcs.js'); +load('ansitex/load/page.js'); + +/* parse command arguments */ +if (argv.length !== 1) { + writeln('! ERROR: Need 1 arguments only'); + exit(1); +} + +var file = argv.shift(); + +var ext = file_getext(file).substr(1).toLowerCase(); + +// Type of frame to load +switch (ext) { + case 'tex': + require('ansitex/load/session/ansitex.js','SESSION_ANSITEX'); + break; + + case 'vtx': + require('ansitex/load/session/viewdata.js','SESSION_VIEWDATA'); + break; +} + +var page = new Page(false); +page.import(file); +//page.build(); +//page.get(new PageObject(980,'a')); +page.save(); diff --git a/frames_check.js b/tools/frames_check.js similarity index 100% rename from frames_check.js rename to tools/frames_check.js diff --git a/frames_list.js b/tools/frames_list.js similarity index 100% rename from frames_list.js rename to tools/frames_list.js diff --git a/frames_tag.js b/tools/frames_tag.js similarity index 100% rename from frames_tag.js rename to tools/frames_tag.js diff --git a/tools/msgbases_list.js b/tools/msgbases_list.js new file mode 100644 index 0000000..90e3296 --- /dev/null +++ b/tools/msgbases_list.js @@ -0,0 +1,4 @@ +load('ansitex/load/msgbases.js'); + +var ma = new MsgAreas(); +writeln(JSON.stringify(ma.list)); diff --git a/save.js b/tools/save.js similarity index 100% rename from save.js rename to tools/save.js