Commit 85ded142 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 948cfb96
......@@ -16,7 +16,7 @@ let arr=[]
{
if (!files[i].includes('.csv'))
continue
arr.push(read('E:\\fail\\btc1\\'+files[i]))
arr.push(read('E:\\fail\\btc1\\'+files[i],files[i]))
}
let files2 = await fs.readdirSync('E:\\fail\\btc2')
......@@ -24,7 +24,7 @@ let arr=[]
{
if (!files2[i].includes('.csv'))
continue
arr.push(read('E:\\fail\\btc2\\'+files2[i]))
arr.push(read('E:\\fail\\btc2\\'+files2[i],files2[i]))
}
// console.log(files)
......@@ -35,12 +35,20 @@ let arr=[]
}
async function read(dir)
async function read(dir,name)
{
let arr=[]
let com = await fs.readFileSync(dir, 'utf8');
com=com.split('\n')
console.log(com.length)
// for (let i=1;i<)
name=name.split('_')
let uniq=name[4]+'_'+name[5]
uniq=uniq.replace('.csv','')
console.log(uniq)
// console.log(com.length)
for (let i=1;i<com.length;i++)
{
}
// console.log(com)
// com = JSON.parse(com)
}
......
let t='jCTVo1KpLd14YuLRiN_btc2&48&51.4&9_Buy'
console.log(t.length)
t = t.replace(/_/g, '').replace(/Lp/g, '').replace(/BTC/g, '').replace(/ /g, '').replace(/btc2/g, '').replace(/btc3/g, '').replace(/btc4/g, '').replace(/&/g, '').replace(/btc/g, '').replace(/:/g, '')
t=removeDot(t)
console.log(t)
function removeDot(text)
{
let token=''
for (let i=0;i<text.length;i++)
if (text[i] !=='.' )
token=token+text[i]
return token
}
\ No newline at end of file
let t='220818102341_O1_BNC_BTCUSDT_Lp19500_22BTC13.csv'
t=t.split('_')
let uniq=t[4]+'_'+t[5]
uniq=uniq.replace('.csv','')
console.log(uniq)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment