cabrillo
v0.1.0
Published
cabrillo Ham radio log conversion lib
Downloads
6
Readme
Cabrillo.js
- Now support CQWW series,CQWPX series,NAQP and Standard template log
- works in a browser, on a server
Introduction
Cabrillo.js is a JavaScript library that converts cabrillo contest files and json to each other.
Installation
Currently only npm installation is supported
npm install cabrillo --save
Usage
Convert JSON objects into cabrillo's standard format string
objectToCabrillo(json,option)
Example:
var cabrillo = require('cabrillo')
var fs = require('fs') // if in Node.js
var data = fs.readFileSync('contest.json')
var option = {
contest:'NAQP'
}
fs.writeFile("contest.txt", cabrilloCore.objectToCabrillo(data,option), err =>{
if(err) throw err;
console.log("Success!");
} )
Convert a cabrillo string to a json object
cabrilloToObject(String,option)
Example:
var cabrillo = require('cabrillo')
var fs = require('fs') // if in Node.js
var data = fs.readFileSync('contest.txt')
var option = {
contest:'NAQP'
}
fs.writeFile('contest.json', JSON.stringify(cabrilloCore.cabrilloToObject(data,option), null, 4), err => {
if(err) throw err;
console.log("Success!");
});
Example
The sample file example.js is stored in the example folder.
git clone https://github.com/YuYanDev/cabrillo.js
cd cabrillo.js
npm run example
License
Created by YuYan ( DE BG6TTI - K6TTI )