using configuration file

This commit is contained in:
2025-06-12 16:52:49 -04:00
parent 200a1bf307
commit 671422976d
6 changed files with 162 additions and 138 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# -------------------------------------
# --- Given month, specific dates
# -------------------------------------
# for dt in 20250528 20250529 20250530 20250531; do
# rsync -ahvv cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/crypto/sim/2025/2025-05/${dt}.*.gz ./
# done
# -------------------------------------
# -------------------------------------
# --- Current month - all files
# -------------------------------------
pushd ./data/crypto
rsync -ahvv cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/crypto/sim/*.gz ./
# -------------------------------------
for srcfname in $(ls *.db.gz); do
dt="${srcfname:0:8}"
tgtfile=${dt}.mktdata.ohlcv.db
echo "${srcfname} -> ${tgtfile}"
gunzip -c $srcfname > temp.db
rm -f ${tgtfile} && sqlite3 temp.db ".dump md_1min_bars" | sqlite3 ${tgtfile} && rm ${srcfname}
done
rm temp.db
popd