import json gen
This commit is contained in:
parent
6436881cae
commit
8024236fac
|
@ -4,8 +4,8 @@
|
|||
* @type {{duration: string, start: string, content: null}}
|
||||
*/
|
||||
import fs from 'node-fs';
|
||||
import tasksList from '../sources/tasks.json' assert { type: "json" };
|
||||
|
||||
//import tasksList from './../sources/tasks.json' assert { type: "json" };
|
||||
import tasksList from './../sources/tasks.json';
|
||||
|
||||
|
||||
let folderPrefix = './emploi-du-temps/folders_build';
|
||||
|
@ -14,7 +14,12 @@ async function foldersGeneration(dirpath){
|
|||
await fs.promises.mkdir(`${folderPrefix}/${dirpath}`, { recursive: true })
|
||||
}
|
||||
export let sectionsCleaned = {}
|
||||
// TODO prendre le groupe de type projets; récupérer les tâches de level 2
|
||||
|
||||
/**
|
||||
*
|
||||
* @param generate_folders
|
||||
* @returns Object un objet décrivant chaque partie des tasks.json
|
||||
*/
|
||||
export function get_sections_from_tasks_orgfile(generate_folders= false){
|
||||
|
||||
tasksList.contents.map( elem => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
import fs from 'node-fs';
|
||||
import tasksList from '../sources/tasks.json'
|
||||
import {get_sections_from_tasks_orgfile} from "./folder_from_tasks"; assert { type: "json" };
|
||||
import {get_sections_from_tasks_orgfile} from "./folder_from_tasks.mjs" ;
|
||||
|
||||
const timespan_base = {
|
||||
start: "8",
|
||||
|
@ -52,8 +52,8 @@ const categories = [
|
|||
'projets',
|
||||
]
|
||||
|
||||
const projects = ['emploi du temps','rangement','migration Rise','dev','calendar maker','noeud garage','report orgmode','partage ftp']
|
||||
const areas = [
|
||||
let projects = ['emploi du temps','rangement','migration Rise','dev','calendar maker','noeud garage','report orgmode','partage ftp']
|
||||
let areas = [
|
||||
'achats',
|
||||
'administratif',
|
||||
'apprendre emacs',
|
||||
|
@ -67,7 +67,7 @@ const areas = [
|
|||
'travaux bricolage',
|
||||
'vacances'
|
||||
]
|
||||
const ressources = [
|
||||
let ressources = [
|
||||
'social sorting',
|
||||
'PIM',
|
||||
'lecture',
|
||||
|
@ -172,6 +172,8 @@ let day_categories_map = [
|
|||
|
||||
const sections = get_sections_from_tasks_orgfile()
|
||||
|
||||
projects = Object.keys(sections.projects)
|
||||
console.log(projects)
|
||||
|
||||
function loopOneDay(){
|
||||
// passer sur les catégories et faire progresser l'index des éléments des catégories
|
||||
|
|
Loading…
Reference in New Issue