w-dwdata-tweq
v1.0.29
Published
A downloader for earthquake data from Taiwan CWA.
Maintainers
Readme
w-dwdata-tweq
A downloader for earthquake data from Taiwan CWA.
Documentation
To view documentation or get support, visit docs.
Installation
Using npm(ES6 module):
npm i w-dwdata-tweqExample:
Link: [dev source code]
import w from 'wsemi'
import WDwdataTweq from './src/WDwdataTweq.mjs'
//fdTagRemove
let fdTagRemove = `./_tagRemove`
w.fsCleanFolder(fdTagRemove)
//fdDwAttime
let fdDwAttime = `./_dwAttime`
w.fsCleanFolder(fdDwAttime)
//fdDwCurrent
let fdDwCurrent = `./_dwCurrent`
w.fsCleanFolder(fdDwCurrent)
//fdResult
let fdResult = `./_result`
w.fsCleanFolder(fdResult)
//fdTaskCpActualSrc
let fdTaskCpActualSrc = `./_taskCpActualSrc`
w.fsCleanFolder(fdTaskCpActualSrc)
//fdTaskCpSrc
let fdTaskCpSrc = `./_taskCpSrc`
w.fsCleanFolder(fdTaskCpSrc)
let yearStart = 2022
let yearEnd = 2022
let opt = {
fdTagRemove,
fdDwAttime,
fdDwCurrent,
fdResult,
fdTaskCpActualSrc,
fdTaskCpSrc,
// fdLog,
// funDownload,
// funGetCurrent,
// funRemove,
// funAdd,
// funModify,
}
let ev = await WDwdataTweq(yearStart, yearEnd, opt)
.catch((err) => {
console.log(err)
})
ev.on('change', (msg) => {
delete msg.type
console.log('change', msg)
})
// change { event: 'start', msg: 'running...' }
// change { event: 'proc-callfun-afterStart', msg: 'start...' }
// change { event: 'proc-callfun-afterStart', msg: 'done' }
// change { event: 'proc-callfun-download', msg: 'start...' }
// change { event: 'proc-callfun-download', num: 2, msg: 'done' }
// change { event: 'proc-callfun-getCurrent', msg: 'start...' }
// change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
// change { event: 'proc-compare', msg: 'start...' }
// change { event: 'proc-compare', numRemove: 0, numAdd: 2, numModify: 0, numSame: 0, msg: 'done' }
// change { event: 'proc-add-callfun-add', id: '111001', msg: 'start...' }
// change { event: 'proc-add-callfun-add', id: '111001', msg: 'done' }
// change { event: 'proc-add-callfun-add', id: '111002', msg: 'start...' }
// change { event: 'proc-add-callfun-add', id: '111002', msg: 'done' }
// ...