Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
/ mgxnode Public archive

A warpper of MgxParser. This is the actual parser used in aocrec.com. The usage example in README.md is obselete!

Notifications You must be signed in to change notification settings

lichifeng/mgxnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO

linux only now

Compile

sudo apt install snapd git libpng-dev doxygen graphviz clang make
sudo snap install node --classic
sudo snap install cmake --classic

git clone https://e.coding.net/lichifeng/mgxparser/mgxnode.git --recursive
npm i cmake-js
npm i cmake-js -g
npm install

usage

parse = require(...);
// use object factory??
var rec = parse("xxx.mgx", {tryfix: true, rawencoding: 'cp936'});
var rec_data = rec.data();
var map_data = rec.map();

// https://stackoverflow.com/a/62708947
var map_file = rec.map("path/to/map.png"); // return what? a path or a file object?
var map_file_hd = rec.map("path/to/map.png", {witdh: 900, height: 450, hd: true});

var [header_file, body_file] = rec.extract({header: 'header.dat', body: 'body.dat'});

others

install node.js: https://github.com/nodesource/distributions/blob/master/README.md
cmake-js/cmake-js#257

About

A warpper of MgxParser. This is the actual parser used in aocrec.com. The usage example in README.md is obselete!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published