Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.
/ node-adif Public archive

Amateur Data Interchange Format (ADIF) parser and generator

License

Notifications You must be signed in to change notification settings

7h0ma5/node-adif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-adif

NPM Version Build Status Coverage

Examples

Write .adi and .adx data

var adif = require("adif");

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");

// 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