first attempt to generate time schedule from assets in js
This commit is contained in:
parent
83ee5f7853
commit
031a04e545
6
Makefile
6
Makefile
|
@ -1,6 +1,8 @@
|
|||
default : concat
|
||||
concat:
|
||||
bash scripts/concat_org.sh >> scripts/stats.org
|
||||
echo "* " | tee -a scripts/stats.org
|
||||
date | tee -a scripts/stats.org
|
||||
bash scripts/concat_org.sh |tee -a scripts/stats.org
|
||||
convert:
|
||||
npm start
|
||||
copyTasksJson :
|
||||
|
@ -9,4 +11,4 @@ copyTasksJson :
|
|||
npm start;
|
||||
render :
|
||||
serve output
|
||||
firefox http://localhost:3000/output_all_tasks_report
|
||||
firefox http://localhost:3000/output_all_tasks_report
|
||||
|
|
|
@ -9,21 +9,71 @@ const timespan_base = {
|
|||
duration: "60", // minutes
|
||||
content: null
|
||||
}
|
||||
const days = [{
|
||||
label: "lundi"
|
||||
}, {
|
||||
label: "mardi"
|
||||
}, {
|
||||
label: "mercredi"
|
||||
}, {
|
||||
label: "jeudi"
|
||||
}, {
|
||||
label: "vendredi"
|
||||
}, {
|
||||
label: "samedi"
|
||||
}, {
|
||||
label: "dimanche"
|
||||
},
|
||||
|
||||
const day_start_hour = 9;
|
||||
const day_activities_hours = 10;
|
||||
const activity_duration_default=60;
|
||||
|
||||
const ressources_nope = [
|
||||
{
|
||||
label: "social sorting"
|
||||
},
|
||||
{
|
||||
label: "gestion de l'information"
|
||||
},
|
||||
{
|
||||
label: "lecture"
|
||||
}, {
|
||||
|
||||
label: "architecture"
|
||||
}, {
|
||||
label: "climat"
|
||||
}, {
|
||||
label: "nucléaire"
|
||||
}, {
|
||||
label: "dessins"
|
||||
}, {
|
||||
label: "partage de documents"
|
||||
}, {
|
||||
label: "recherche et éducation"
|
||||
},
|
||||
{
|
||||
label: "emploi du temps"
|
||||
},
|
||||
]
|
||||
|
||||
const categories = [
|
||||
'aires de responsabilité',
|
||||
'archives',
|
||||
'ressources',
|
||||
'projets',
|
||||
]
|
||||
|
||||
const projects = ['emploi du temps','rangement','migration Rise','dev','calendar maker','noeud garage','report orgmode','partage ftp']
|
||||
const areas = [
|
||||
'achats',
|
||||
'administratif',
|
||||
'apprendre emacs',
|
||||
'associations',
|
||||
'boulot',
|
||||
'communication et écriture',
|
||||
'corvées',
|
||||
'habitudes',
|
||||
'santé',
|
||||
'social',
|
||||
'travaux bricolage',
|
||||
'vacances'
|
||||
]
|
||||
const ressources = [
|
||||
'social sorting',
|
||||
'PIM',
|
||||
'lecture',
|
||||
'architecture',
|
||||
'climat',
|
||||
'nucléaire',
|
||||
'dessins',
|
||||
'partage de documents',
|
||||
'recherche et éducation'
|
||||
]
|
||||
// préremplir avec des créneaux réservés
|
||||
|
||||
|
@ -53,7 +103,7 @@ const hours_spans = [
|
|||
color: "white"
|
||||
},
|
||||
{
|
||||
start: "19",
|
||||
start: "21",
|
||||
duration: "30", // minutes
|
||||
label: "préparation dodo",
|
||||
color: "white"
|
||||
|
@ -61,41 +111,143 @@ const hours_spans = [
|
|||
|
||||
]
|
||||
|
||||
const ressources = [
|
||||
{
|
||||
label: "social sorting"
|
||||
},
|
||||
{
|
||||
label: "gestion de l'information"
|
||||
},
|
||||
{
|
||||
label: "lecture"
|
||||
}, {
|
||||
|
||||
label: "architecture"
|
||||
}, {
|
||||
label: "climat"
|
||||
}, {
|
||||
label: "nucléaire"
|
||||
}, {
|
||||
label: "dessins"
|
||||
}, {
|
||||
label: "partage de documents"
|
||||
}, {
|
||||
label: "recherche et éducation"
|
||||
},
|
||||
{
|
||||
label: "emploi du temps"
|
||||
},
|
||||
const days = [{
|
||||
label: "lundi"
|
||||
}, {
|
||||
label: "mardi"
|
||||
}, {
|
||||
label: "mercredi"
|
||||
}, {
|
||||
label: "jeudi"
|
||||
}, {
|
||||
label: "vendredi"
|
||||
},
|
||||
/**
|
||||
{
|
||||
label: "samedi"
|
||||
},
|
||||
{
|
||||
label: "dimanche"
|
||||
},
|
||||
**/
|
||||
]
|
||||
|
||||
|
||||
function displayDays() {
|
||||
|
||||
console.log('projets', projects.length)
|
||||
console.log('aires de responsabilité', areas.length)
|
||||
console.log('ressources actuelles', ressources.length)
|
||||
|
||||
|
||||
days.forEach((elem, index) => {
|
||||
|
||||
console.log('*' , elem.label)
|
||||
// ajouter les créneaux à chaque journée
|
||||
console.log('' )
|
||||
console.log('*' , elem.label )
|
||||
loopOneDay();
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
displayDays();
|
||||
|
||||
// configs qui bouclent pour chaque catégorie
|
||||
let category_index = 0;
|
||||
let projects_index = 0;
|
||||
let area_index = 0;
|
||||
let ressources_index = 0;
|
||||
let day_hour = day_start_hour;
|
||||
let day_minutes_counter = 0;
|
||||
let max_min_a_day = day_minutes_counter * day_activities_hours;
|
||||
let daily_duration = 15; // minutes
|
||||
|
||||
let day_categories_map = [
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
function loopOneDay(){
|
||||
// passer sur les catégories et faire progresser l'index des éléments des catégories
|
||||
|
||||
console.log('** ' ,day_hour ,'h revue journalière')
|
||||
day_minutes_counter += daily_duration
|
||||
|
||||
console.log('** ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,'h appels tel')
|
||||
day_minutes_counter += 20
|
||||
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** areas : ' ,area_index, ' : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,areas[area_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
area_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** areas : ' ,area_index, ' : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,areas[area_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
area_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** projects : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,projects[projects_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
projects_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** projects : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,projects[projects_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
projects_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** projects : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,projects[projects_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
projects_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** ressources : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,ressources[ressources_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
ressources_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** ressources : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,ressources[ressources_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
ressources_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
console.log('** ressources : ' ,convertMinutesOfDayToHourDisplay(day_minutes_counter) ,ressources[ressources_index])
|
||||
day_minutes_counter += activity_duration_default
|
||||
ressources_index++
|
||||
resetIndexesIfNeeded()
|
||||
|
||||
day_minutes_counter = 0;
|
||||
// for(let ii =day_minutes_counter; ii < max_min_a_day; ii+=activity_duration_default ){
|
||||
|
||||
// day_minutes_counter += activity_duration_default
|
||||
// }
|
||||
}
|
||||
|
||||
function resetIndexesIfNeeded(){
|
||||
if(area_index >= areas.length){
|
||||
area_index = 0;
|
||||
console.log('# --- retour de areas --- ')
|
||||
}
|
||||
if(ressources_index >= ressources.length){
|
||||
ressources_index = 0;
|
||||
console.log('# --- retour de ressources --- ')
|
||||
}
|
||||
if(projects_index >= projects.length){
|
||||
projects_index = 0;
|
||||
console.log('# --- retour de projets --- ')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// TODO améliorer le rendu pour avoir les minutes arrondies dans l'heure
|
||||
function convertMinutesOfDayToHourDisplay(max_min_a_day){
|
||||
|
||||
// return day_start_hour + (max_min_a_day/60) + ' h'
|
||||
return day_start_hour + Math.round(max_min_a_day/60) + 'h'
|
||||
}
|
||||
|
||||
|
||||
console.log("* Emploi du temps pour une semaine \n")
|
||||
displayDays();
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
* Emploi du temps pour une semaine
|
||||
|
||||
projets 8
|
||||
aires de responsabilité 12
|
||||
ressources actuelles 9
|
||||
|
||||
* lundi
|
||||
** 9 h revue journalière
|
||||
** 9h h appels tel
|
||||
** areas : 0 : 10h achats
|
||||
** areas : 1 : 11h administratif
|
||||
** projects : 12h emploi du temps
|
||||
** projects : 13h rangement
|
||||
** projects : 14h migration Rise
|
||||
** ressources : 15h social sorting
|
||||
** ressources : 16h PIM
|
||||
** ressources : 17h lecture
|
||||
|
||||
* mardi
|
||||
** 9 h revue journalière
|
||||
** 9h h appels tel
|
||||
** areas : 2 : 10h apprendre emacs
|
||||
** areas : 3 : 11h associations
|
||||
** projects : 12h dev
|
||||
** projects : 13h calendar maker
|
||||
** projects : 14h noeud garage
|
||||
** ressources : 15h architecture
|
||||
** ressources : 16h climat
|
||||
** ressources : 17h nucléaire
|
||||
|
||||
* mercredi
|
||||
** 9 h revue journalière
|
||||
** 9h h appels tel
|
||||
** areas : 4 : 10h boulot
|
||||
** areas : 5 : 11h communication et écriture
|
||||
** projects : 12h report orgmode
|
||||
** projects : 13h partage ftp
|
||||
# --- retour de projets ---
|
||||
** projects : 14h emploi du temps
|
||||
** ressources : 15h dessins
|
||||
** ressources : 16h partage de documents
|
||||
** ressources : 17h recherche et éducation
|
||||
# --- retour de ressources ---
|
||||
|
||||
* jeudi
|
||||
** 9 h revue journalière
|
||||
** 9h h appels tel
|
||||
** areas : 6 : 10h corvées
|
||||
** areas : 7 : 11h habitudes
|
||||
** projects : 12h rangement
|
||||
** projects : 13h migration Rise
|
||||
** projects : 14h dev
|
||||
** ressources : 15h social sorting
|
||||
** ressources : 16h PIM
|
||||
** ressources : 17h lecture
|
||||
|
||||
* vendredi
|
||||
** 9 h revue journalière
|
||||
** 9h h appels tel
|
||||
** areas : 8 : 10h santé
|
||||
** areas : 9 : 11h social
|
||||
** projects : 12h calendar maker
|
||||
** projects : 13h noeud garage
|
||||
** projects : 14h report orgmode
|
||||
** ressources : 15h architecture
|
||||
** ressources : 16h climat
|
||||
** ressources : 17h nucléaire
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/bash
|
||||
touch all_tasks.org
|
||||
echo "" > all_tasks.org
|
||||
cat /home/tykayn/Nextcloud/textes/orgmode/tasks.org >> all_tasks.org
|
||||
cat /home/tykayn/Nextcloud/textes/orgmode/tasks.org_archive >> all_tasks.org
|
||||
cp all_tasks.org /home/tykayn/Nextcloud/textes/orgmode/stats
|
||||
cat ~/Nextcloud/textes/orgmode/tasks.org >> all_tasks.org
|
||||
cat ~/Nextcloud/textes/orgmode/tasks.org_archive >> all_tasks.org
|
||||
cp all_tasks.org ~/Nextcloud/textes/orgmode/stats
|
||||
|
||||
|
||||
touch stats.org
|
||||
|
@ -36,7 +36,7 @@ echo " finis : $finis"
|
|||
counter=`grep -o '* CREATED' all_tasks.org | wc -l`
|
||||
echo " CREATED : $counter"
|
||||
echo " en tout : $tout"
|
||||
counter=`ls -l /home/tykayn/Nextcloud/textes/orgmode/org-roam/*.org | wc -l`
|
||||
counter=`ls -l ~/Nextcloud/textes/orgmode/org-roam/*.org | wc -l`
|
||||
echo " Roam files : $counter"
|
||||
|
||||
#pandoc -i all_tasks.org -o all_tasks.json
|
||||
|
|
Loading…
Reference in New Issue