GithubHelp home page GithubHelp logo

adif's Introduction

ADIF parser and generator

Build Status

This library is meant to be used for reading and writing of ADIF data (ADI format only for now, although the XML based ADIX is almost the same).

The current format I am targeting is ADIF 3.1.0 as described at the ADIF site.

This code is released under the Apache License 2.0

Adding this library to your project

Please use Jitpack.io by configuring a repository and dependency in the following way:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.MarSik</groupId>
    <artifactId>adif</artifactId>
    <version>v1.2.1</version>
</dependency>

Reading ADIF files

import org.marsik.ham.adif.Adif3
import org.marsik.ham.adif.AdiReader

AdiReader reader = new AdiReader();
BufferedReader buffInput = ...; // get buffered reader from stream or file
Optional<Adif3> adif = reader.read(buffInput);

Note: For reading Logbook of the World adi files enable the quirks mode with reader.setQuirksMode(true);. The quirks mode accepts submodes (i.e PSK31) in the modes fields and translates them to the appropriate mode (i.e. PSK).

Writing ADIF files

import org.marsik.ham.adif.Adif3Record
import org.marsik.ham.adif.AdifHeader
import org.marsik.ham.adif.AdiWriter

AdiWriter writer = new AdiWriter();
writer.append(/* AdifHeader */)
for Adif3Record record: /* some data source */ {
  writer.append(record);
}
writer.toString() // -> to some output

adif's People

Contributors

marsik avatar cniesen avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.