Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tmx-tools with all npm packages installed. Try it out:

var tmxTools = require("tmx-tools")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tmx-tools v1.0.15

tmx tools collection, like split tmx into files, or count how many tus in the file and so on.

tmx-tools

This is an exact tools about dealing with tmx files with sax parser We can use this package to count the tu num of a tmx file And also split a tmx file into files accroding to your configuraton

We are tring to add some more functibility to make this more effective

Install

npm install tmx-tools

How to use

The only thing we need to do is requiring or importing it and send some required options

You can check on the example folder to look the details

var path = require('path')
var tmxTools = require('tmx-tools')

// try to use absolute file urls, because the parser don't know the relative uri when the folder level changed
var srcFilePath = path.normalize(path.join(__dirname, 'your file path'))
tmxTools.countTU({ srcFilePath }).then(function (res) {
    console.log(res)
})

LICENSE

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free