ham

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 6 Imported by: 0

README

cmd/termlog

screenshot

The main driver for writing the rest of this code. A cross platform console based ham contact logger. I'm developing it for my own use, so it only has features I need/want.

  • Saves logs as ADIF files with custom fields
  • Supports auto-commiting log filesgit to a git repository
  • DX cluster & POTA spot monitoring
  • Radio control through hamlib (github.com/dh1tw/goHamlib)
  • Logs for both WSJT-X and fldigi
  • LoTW integration (syncs QSL information from LoTW to stored ADIF files)

Installation

Linux x64
```
sudo apt-get install -y libhamlib2
sudo wget https://github.com/tzneal/ham-go/releases/download/v0.2.0/termlog.amd64 -O /usr/bin/termlog
sudo chmod a+x /usr/bin/termlog
/usr/bin/termlog --upgrade-config
```
Linux/32 bit ARM (Raspberry Pi)
sudo apt-get install -y libhamlib2
sudo wget https://github.com/tzneal/ham-go/releases/download/v0.2.0/termlog.arm -O /usr/bin/termlog
sudo chmod a+x /usr/bin/termlog
/usr/bin/termlog --upgrade-config
Linux/64 bit ARM
sudo apt-get install -y libhamlib2
sudo wget https://github.com/tzneal/ham-go/releases/download/v0.2.0/termlog.arm64 -O /usr/bin/termlog
sudo chmod a+x /usr/bin/termlog
/usr/bin/termlog --upgrade-config

Precompiled binaries are also available at https://github.com/tzneal/ham-go/releases

Configuration

  1. Run termlog once, then hit Ctrl+Q to quit. This will create an initial config file at ~/.termlog.toml that you can then modify.
  2. Fill out the operator section at a minimum

Custom Commands

Custom user commands can be reached through Ctrl+E. These command are defined in the configuration file and environment variables are used to pass state to the command line.

As an exanple, the following will construct a command that syncs the current ADIF log file with LoTW using tqsl.

  [[Operator.Commands]]
    Name = "Sync Current Logfile with LoTW"
    Command = "$TQSL -a compliant --nodate --upload --batch $LOGFILE"

Environment Variables

  • LOGFILE - Path to the current logfile
  • TQSL - Path to the tqsl binary configured in the configuration file
Custom Fields

In the configuration file, custom ADIF fields can be defined. A SOTA field is defined in the default configuration and can be removed if not needed.

  [[Operator.CustomFields]]
    Name = "sota_ref"
    Label = "SOTA"
    Width = 8
    Default = ""

Command line options

Usage of ./termlog:
  -color-test
    	display a color test
  -config string
    	path to the configuration file (default "~/.termlog.toml")
  -hamlib-list
    	list the supported libhamlib devices
  -index
    	index the ADIF files passed in on the command line
  -key-test
    	list keyboard events
  -log string
    	specify a log file to load and write to
  -no-net
    	disable all features that require network access (useful for POTA/SOTA)
  -no-rig
    	disable rig control, even if enabled in the config file
  -search string
    	search the indexed ADIF files and print the results
  -sync-lotw-qsl
    	fetches QSL information from LoTW to update log QSL information in the default log directory
  -upgrade-config
    	upgrade the configuration file to the latest format

Commands

Shortcut Command
Ctrl+Q Quit termlog
Ctrl+H Display Help
Ctrl+N Start a new QSO (clearing the current one if not saved)
Ctrl+D Set the QSO time on to the current time
Ctrl+S Save the QSO to the log and start a new one
Ctrl+G Commit the current logfile to git
Ctrl+B Save a bookmark
Alt+B Open the bookmark list
Ctrl+L Focus the QSO List
Ctrl+E Display custom user commands
Ctrl+R Force screen redraw
Alt+Left Tune down 500khz
Alt+Right Tune up 500khz

adif

ADIF parsing and writing

callsigns

Callsign lookup interface with a couple of supported backends.

db

ADIF indexer used to quickly identify when you last saw a contact and how many times you've logged him.

dxcc

Callsign lookup via prefixes/exceptions through the data at www.country-files.com (works offline).

dxcluster

The beginnings of a DXCluster client.

fldigi

Enough code to parse the realtime fldigi emitted logs and save them to termlog.

wsjtx

Enough code to parse the realtime WSJT-X emitted logs and save them to termlog. I use this when running FT8 to capture logs in real time from WSJT-X.

Documentation

Index

Constants

View Source
const BuildDate = "2020-05-02"
View Source
const Version = "v0.1.0-2-g6d58692"

Variables

This section is empty.

Functions

func FileOrDirectoryExists

func FileOrDirectoryExists(fn string) bool

FileOrDirectoryExists returns true if the file or directory exists.

Types

type Bookmark

type Bookmark struct {
	Frequency float64
	Mode      BookmarkMode
	Created   time.Time
	Notes     string
	Width     int
}

Bookmark is a bookmark of a particular frequency with notes for later reference

type BookmarkMode

type BookmarkMode goHamlib.Mode

BookmarkMode exists solely so we can provide a text serialization of goHamlib.Mode

func (BookmarkMode) MarshalText

func (b BookmarkMode) MarshalText() (text []byte, err error)

func (*BookmarkMode) UnmarshalText

func (b *BookmarkMode) UnmarshalText(text []byte) error

type Bookmarks

type Bookmarks struct {
	Bookmark []Bookmark
	Filename string `toml:"-"`
}

Bookmarks are used for storing frequencies and notes

func OpenBookmarks

func OpenBookmarks(filename string) (*Bookmarks, error)

OpenBookmarks opens a bookmarks file

func (*Bookmarks) AddBookmark

func (b *Bookmarks) AddBookmark(m Bookmark)

AddBookmark adds a new bookmarks

func (*Bookmarks) RemoveAt

func (b *Bookmarks) RemoveAt(idx int)

RemoveAt removes an existing bookmark

func (*Bookmarks) Save

func (b *Bookmarks) Save() error

Save writes out the bookmarks file

func (*Bookmarks) Write

func (b *Bookmarks) Write(w io.Writer) error

Write writes the bookmarks to a writer

func (*Bookmarks) WriteToFile

func (b *Bookmarks) WriteToFile(path string) error

WriteToFile writes the bookmarks to a given file

Directories

Path Synopsis
cmd
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL