Skip to content

Amateur Data Interchange Format (ADIF) parser and generator

License

Notifications You must be signed in to change notification settings

edwar64896/node-adif-gsp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-adif

NPM Version Build Status Coverage

Examples

Write .adi and .adx data

var adif = require("adif-gsp");

var contact = {
  "call": "AB0CDE",
  "freq": 14.245,
  "mode": "SSB"
  "start": "2014-05-29T23:55:20.000Z",
  "end": "2014-05-30T00:07:43.000Z"
};

// Generate .adi data
var adiWriter = new adif.AdiWriter("MyAppName", "1.0");
var adiData = adiWriter.writeAll([contact]);

// Generate .adx data
var adxWriter = new adif.AdxWriter("MyAppName", "1.0");
var adxData = adxWriter.writeAll([contact]);

Read .adi and .adx data

var adif = require("adif-gsp");

// Read .adi data
var adiData = "<CALL:6>AB0CDE<FREQ:6>14.245<MODE:3>SSB ...";
var adiReader = new adif.AdiReader(adiData);
var contacts = adiReader.readAll();

// Read .adx data
var adxData = "<ADX><RECORDS><RECORD><CALL>AB0CDE</CALL> ... </RECORD></RECORDS></ADX>";
var adxReader = new adif.AdxReader(adiData);
var contacts = adxReader.readAll();

About

Amateur Data Interchange Format (ADIF) parser and generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%