up convert sms

This commit is contained in:
Tykayn 2023-09-24 10:20:02 +02:00 committed by tykayn
parent 4fd1a64015
commit f3d062092f
4 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ convert:
bash ./scripts/concat_org.sh
mv all_tasks.org sources/
node parse_orgmode_to_json.mjs
ts-node render_chart.mjs
ts-node render_chart.ts
start:
npm start
copyTasksJson :

View File

@ -11,10 +11,10 @@ const chartType = 'line'
// time in : weeks, months, years, days
// const time_agreggate = 'days'
const time_agreggate = 'days'
// const time_agreggate = 'weeks'
// const time_agreggate = 'months'
const time_agreggate = 'years'
// const time_agreggate = 'years'
function convertStats(tasks: any) {
let converted = []
let weeks = Object.keys(tasks['statistics']['statistics']['dates'][time_agreggate]);

View File

@ -53,7 +53,7 @@ function convertToCsv (elementsArray) {
*/
function convertJsonToCsvAndPersistTSVFile (jsonFilePath, outputFileTSVName) {
console.log('convert', folder_base+'output/' + jsonFilePath)
console.log('convertJsonToCsvAndPersistTSVFile ', folder_base+'output/' + jsonFilePath)
fs.readFile(folder_base+'output/' + jsonFilePath, 'utf8', function (err, data) {
data = JSON.parse(data)
console.log('data', data.length)

View File

@ -17,7 +17,7 @@ const outputAbsolutePath = '/home/tykayn/Nextcloud/ressources/social sorting/out
export async function writeFileInOuputFolderFromJsonObject (fileName, jsonObjectThing) {
// console.log('statistics.dates', statistics.dates)
console.log('writeFileInOuputFolderFromJsonObject', fileName)
let fullpath = `${outputAbsolutePath}${fileName}`
return await fs.writeFileSync(