node-wsjtx-companion – Diff between revs 1 and 4
?pathlinks?
Rev 1 | Rev 4 | |||
---|---|---|---|---|
Line 12... | Line 12... | |||
12 | const moment = require('moment') |
12 | const moment = require('moment') |
|
13 | const winston = require('winston') |
13 | const winston = require('winston') |
|
14 | const yargs = require('yargs') |
14 | const yargs = require('yargs') |
|
15 | const dns = require('dns') |
15 | const dns = require('dns') |
|
16 | const dgram = require('dgram') |
16 | const dgram = require('dgram') |
|
17 | const udpServer = dgram.createSocket('udp4') |
17 | const udpServer = dgram.createSocket( { type: 'udp4', reuseAddr: true } ) |
|
18 | const { WsjtxUdpParser } = require('@henriquegravina/wsjtxudpparser') |
18 | const { WsjtxUdpParser } = require('@henriquegravina/wsjtxudpparser') |
|
19 | const { AdifReader } = require('tcadif') |
19 | const { AdifReader } = require('tcadif') |
|
20 | const Readable = require('stream').Readable |
20 | const Readable = require('stream').Readable |
|
Line 21... | Line 21... | |||
21 | |
21 | |
|
Line 244... | Line 244... | |||
244 | x = record.QSO_DATE |
244 | x = record.QSO_DATE |
|
245 | o = config.ham.qslTemplateMap.date |
245 | o = config.ham.qslTemplateMap.date |
|
246 | x = x.padStart((x.length + o.length) / 2).padEnd(o.length) |
246 | x = x.padStart((x.length + o.length) / 2).padEnd(o.length) |
|
247 | template = template.replace(o, x) |
247 | template = template.replace(o, x) |
|
Line 248... | Line 248... | |||
248 | |
248 | |
|
249 | // the frequency, mdoe and band |
249 | // the frequency, mode and band |
|
250 | x = `${parseInt(record.FREQ)} / ${record.MODE} / ${record.BAND}` |
250 | x = `${parseInt(record.FREQ)} / ${record.MODE} / ${record.BAND}` |
|
251 | o = config.ham.qslTemplateMap.conn |
251 | o = config.ham.qslTemplateMap.conn |
|
252 | x = x.padStart((x.length + o.length) / 2).padEnd(o.length) |
252 | x = x.padStart((x.length + o.length) / 2).padEnd(o.length) |