mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-11-19 23:00:35 +01:00
462 lines
24 KiB
Django/Jinja
462 lines
24 KiB
Django/Jinja
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Statistiques combinées - {{page_title}}</title>
|
|
<link rel="stylesheet" href="{{css_path}}">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>📊 Statistiques combinées - {{page_title}}</h1>
|
|
<p><strong>Blogs analysés:</strong> {{blogs_list}}</p>
|
|
|
|
<h2>Vue d'ensemble globale</h2>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Articles publiés</h3>
|
|
<div class="value">{{nb_articles_total|int|format_number}}</div>
|
|
<div style="font-size: 0.9em; color: #666; margin-top: 5px;">
|
|
{{articles_par_jour_moyen|round(2)}}/j,
|
|
{{articles_par_mois_moyen|round(1)}} /mois,
|
|
{{articles_par_annee_moyen|round(1)}} /an
|
|
</div>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Mots totaux</h3>
|
|
<div class="value">{{mots_total|int|format_number}}</div>
|
|
<div style="font-size: 0.9em; color: #666; margin-top: 5px;">
|
|
{{mots_par_jour_moyen|int|format_number}} /j,
|
|
{{mots_par_mois_moyen|int|format_number}} /mois,
|
|
{{mots_par_annee_moyen|int|format_number}} /an
|
|
</div>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Signes (espaces inclus)</h3>
|
|
<div class="value">{{signes_total|int|format_number}}</div>
|
|
<div style="font-size: 0.9em; color: #666; margin-top: 5px;">
|
|
{{signes_par_jour_moyen|int|format_number}} /j,
|
|
{{signes_par_mois_moyen|int|format_number}} /mois,
|
|
{{signes_par_annee_moyen|int|format_number}} /an
|
|
</div>
|
|
</div>
|
|
<div class="stat-card orange">
|
|
<h3>Temps de lecture total</h3>
|
|
<div class="value">{{temps_lecture_total|format_duree}}</div>
|
|
<div style="font-size: 0.9em; color: #666; margin-top: 5px;">
|
|
{{temps_lecture_par_jour_moyen|format_duree}} /j,
|
|
{{temps_lecture_par_mois_moyen|format_duree}} /mois,
|
|
{{temps_lecture_par_annee_moyen|format_duree}} /an
|
|
</div>
|
|
</div>
|
|
<div class="stat-card purple">
|
|
<h3>Liens totaux</h3>
|
|
<div class="value">{{liens_total|int|format_number}}</div>
|
|
<div style="font-size: 0.9em; color: #666; margin-top: 5px;">
|
|
{{liens_par_jour_moyen|round(1)}} /j,
|
|
{{liens_par_mois_moyen|round(1)}} /mois,
|
|
{{liens_par_annee_moyen|round(1)}} /an
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Décomptes par période</h3>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Jours avec articles</h3>
|
|
<div class="value">{{nb_jours_avec_articles|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Mois avec articles</h3>
|
|
<div class="value">{{nb_mois_avec_articles|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Années avec articles</h3>
|
|
<div class="value">{{nb_annees_avec_articles|int|format_number}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Moyennes globales par article</h2>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Mots par article</h3>
|
|
<div class="value">{{mots_moyen|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Liens par article</h3>
|
|
<div class="value">{{liens_moyen|round(1)}}</div>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Signes par article</h3>
|
|
<div class="value">{{signes_moyen|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card orange">
|
|
<h3>Temps de lecture par article</h3>
|
|
<div class="value">{{temps_lecture_par_article|format_duree}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if graphiques_combines %}
|
|
<h2>Graphiques combinés</h2>
|
|
{% for graph_file, graph_title in graphiques_combines %}
|
|
<div class="graph-container">
|
|
<div class="graph-title">{{graph_title}}</div>
|
|
<img src="{{graph_path_combines}}/{{graph_file}}" alt="{{graph_title}}">
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if stats_nanowrimo_combines %}
|
|
<h2>Statistiques NaNoWriMo combinées - 12 derniers mois</h2>
|
|
<div class="nanowrimo-section">
|
|
{% if objectif_mensuel_custom %}
|
|
<p><strong>Objectif mensuel:</strong> {{objectif_mensuel_custom|int|format_number}} signes par mois</p>
|
|
{% elif objectif_quotidien_custom %}
|
|
<p><strong>Objectif quotidien:</strong> {{objectif_quotidien_custom|int|format_number}} signes par jour</p>
|
|
{% else %}
|
|
<p><strong>Objectif quotidien:</strong> 1667 signes (espaces compris) par jour (NaNoWriMo)</p>
|
|
{% endif %}
|
|
{% for mois_stats in stats_nanowrimo_combines %}
|
|
<div class="nanowrimo-month">
|
|
<h3>
|
|
{{mois_stats.mois_formate}}
|
|
{% if mois_stats.depassement > 0 %}
|
|
⭐ <span style="color: #FFC107; font-size: 0.9em;">+{{mois_stats.depassement|int|format_number}} signes</span>
|
|
{% endif %}
|
|
</h3>
|
|
|
|
<div class="progress-info">
|
|
<strong>Signes réalisés (tous blogs):</strong> {{mois_stats.signes_realises|int|format_number}}
|
|
/ {{mois_stats.objectif_total|int|format_number}}
|
|
({{mois_stats.objectif_quotidien|int|format_number}} par jour)
|
|
{% if mois_stats.est_mois_courant %}
|
|
| <strong>Aujourd'hui:</strong> {{mois_stats.signes_aujourdhui|int|format_number}} signes
|
|
{% endif %}
|
|
{% if mois_stats.reste_a_faire > 0 and not mois_stats.est_mois_futur %}
|
|
| <strong>Reste à faire:</strong> {{mois_stats.reste_a_faire|int|format_number}} signes
|
|
{% endif %}
|
|
{% if mois_stats.signes_par_jour_moyen > 0 %}
|
|
| <strong>Moyenne par jour:</strong> {{mois_stats.signes_par_jour_moyen|int|format_number}} signes/jour
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="progress-container">
|
|
<div class="progress-bar">
|
|
{% set signes_sans_aujourdhui = mois_stats.signes_realises - mois_stats.signes_aujourdhui %}
|
|
{% set objectif_jusqu_aujourdhui = mois_stats.objectif_jusqu_aujourdhui if mois_stats.est_mois_courant else mois_stats.objectif_total %}
|
|
{% set reste_a_faire_calc = objectif_jusqu_aujourdhui - mois_stats.signes_realises %}
|
|
{% set reste_a_faire = reste_a_faire_calc if reste_a_faire_calc > 0 else 0 %}
|
|
|
|
{% set total_pour_barre = mois_stats.objectif_total %}
|
|
{% if mois_stats.depassement > 0 %}
|
|
{% set total_pour_barre = mois_stats.signes_realises %}
|
|
{% endif %}
|
|
|
|
{% set pourcentage_aujourdhui = (mois_stats.signes_aujourdhui / total_pour_barre * 100) if total_pour_barre > 0 and mois_stats.est_mois_courant else 0 %}
|
|
{% set pourcentage_restant = (signes_sans_aujourdhui / total_pour_barre * 100) if total_pour_barre > 0 else 0 %}
|
|
{% set pourcentage_depassement = (mois_stats.depassement / total_pour_barre * 100) if total_pour_barre > 0 and mois_stats.depassement > 0 else 0 %}
|
|
{% set pourcentage_reste = (reste_a_faire / total_pour_barre * 100) if total_pour_barre > 0 and reste_a_faire > 0 else 0 %}
|
|
|
|
{% if mois_stats.signes_aujourdhui > 0 and mois_stats.est_mois_courant %}
|
|
<div class="progress-segment blue" style="width: {{pourcentage_aujourdhui}}%">
|
|
{% if pourcentage_aujourdhui > 3 %}
|
|
Aujourd'hui
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if signes_sans_aujourdhui > 0 %}
|
|
<div class="progress-segment blue-light" style="width: {{pourcentage_restant}}%">
|
|
{% if pourcentage_restant > 3 %}
|
|
{{signes_sans_aujourdhui|int|format_number}}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reste_a_faire > 0 and not mois_stats.est_mois_futur %}
|
|
<div class="progress-segment gray" style="width: {{pourcentage_reste}}%">
|
|
{% if pourcentage_reste > 3 %}
|
|
Reste
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if mois_stats.depassement > 0 %}
|
|
<div class="progress-segment yellow" style="width: {{pourcentage_depassement}}%">
|
|
{% if pourcentage_depassement > 3 %}
|
|
+{{mois_stats.depassement|int|format_number}}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if mois_stats.est_mois_courant %}
|
|
<div class="progress-info">
|
|
<strong>Progression:</strong> {{mois_stats.pourcentage_realise|round(1)}}%
|
|
(objectif jusqu'à aujourd'hui: {{mois_stats.objectif_jusqu_aujourdhui|int|format_number}} signes)
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if mois_stats.articles_du_mois %}
|
|
<div style="margin-top: 15px;">
|
|
<strong>Articles du mois (tous blogs, {{mois_stats.articles_du_mois|length}}):</strong>
|
|
<ul style="margin-top: 5px; padding-left: 20px;">
|
|
{% for article in mois_stats.articles_du_mois %}
|
|
<li>
|
|
<strong>{{article.date.strftime('%d/%m/%Y')}}</strong> - {{article.fichier}}
|
|
<span style="color: #666; font-size: 0.9em;">
|
|
({{article.mots|int|format_number}} mots, {{article.signes|int|format_number}} signes)
|
|
</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% else %}
|
|
<div style="margin-top: 15px; color: #999; font-style: italic;">
|
|
Aucun article ce mois
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for blog_data in blogs_data %}
|
|
<div class="blog-section">
|
|
<h2>{{blog_data.blog_title}}</h2>
|
|
{% if blog_data.author %}
|
|
<p><strong>Auteur:</strong> {{blog_data.author}}</p>
|
|
{% endif %}
|
|
|
|
<h3>Vue d'ensemble</h3>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Articles publiés</h3>
|
|
<div class="value">{{blog_data.nb_articles_total|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Mots totaux</h3>
|
|
<div class="value">{{blog_data.mots_total|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Signes (espaces inclus)</h3>
|
|
<div class="value">{{blog_data.signes_total|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card orange">
|
|
<h3>Temps de lecture total</h3>
|
|
<div class="value">{{blog_data.temps_lecture_total|format_duree}}</div>
|
|
</div>
|
|
<div class="stat-card purple">
|
|
<h3>Liens totaux</h3>
|
|
<div class="value">{{blog_data.liens_total|int|format_number}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Moyennes par article</h3>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Mots par article</h3>
|
|
<div class="value">{{blog_data.mots_moyen|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Liens par article</h3>
|
|
<div class="value">{{blog_data.liens_moyen|round(1)}}</div>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Signes par article</h3>
|
|
<div class="value">{{blog_data.signes_moyen|int|format_number}}</div>
|
|
</div>
|
|
<div class="stat-card orange">
|
|
<h3>Temps de lecture par article</h3>
|
|
<div class="value">{{blog_data.temps_lecture_par_article|format_duree}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Vitesse et fréquence de rédaction</h3>
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<h3>Fréquence moyenne</h3>
|
|
<div class="value">{{blog_data.frequence|round(2)}}</div>
|
|
<p>articles par mois</p>
|
|
</div>
|
|
<div class="stat-card blue">
|
|
<h3>Vitesse d'écriture</h3>
|
|
<div class="value">{{blog_data.mots_par_mois_moyen|int|format_number}}</div>
|
|
<p>mots par mois</p>
|
|
</div>
|
|
<div class="stat-card green">
|
|
<h3>Premier article</h3>
|
|
<div class="value" style="font-size: 18px;">{{blog_data.premiere_date_str}}</div>
|
|
</div>
|
|
<div class="stat-card orange">
|
|
<h3>Dernier article</h3>
|
|
<div class="value" style="font-size: 18px;">{{blog_data.derniere_date_str}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if blog_data.graphiques %}
|
|
<h3>Graphiques</h3>
|
|
{% for graph_file, graph_title in blog_data.graphiques %}
|
|
<div class="graph-container">
|
|
<div class="graph-title">{{graph_title}}</div>
|
|
<img src="{{blog_data.graph_path}}/{{graph_file}}" alt="{{graph_title}}">
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if blog_data.stats_nanowrimo %}
|
|
<h3>Statistiques NaNoWriMo - 12 derniers mois</h3>
|
|
<div class="nanowrimo-section">
|
|
<p><strong>Objectif quotidien:</strong> 1667 signes (espaces compris) par jour</p>
|
|
{% for mois_stats in blog_data.stats_nanowrimo %}
|
|
<div class="nanowrimo-month">
|
|
<h3>
|
|
{{mois_stats.mois_formate}}
|
|
{% if mois_stats.depassement > 0 %}
|
|
⭐ <span style="color: #FFC107; font-size: 0.9em;">+{{mois_stats.depassement|int|format_number}} signes</span>
|
|
{% endif %}
|
|
</h3>
|
|
|
|
{% if mois_stats.objectif_articles is not none %}
|
|
<div class="progress-info">
|
|
<strong>Objectif d'articles ce mois:</strong> {{mois_stats.objectif_articles}}
|
|
| <strong>Réalisés:</strong> {{mois_stats.articles_realises}}
|
|
{% set pourcentage_articles = (mois_stats.articles_realises / mois_stats.objectif_articles * 100) if mois_stats.objectif_articles > 0 else 0 %}
|
|
| <strong>Progression:</strong> {{pourcentage_articles|round(1)}}%
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="progress-info">
|
|
<strong>Signes réalisés:</strong> {{mois_stats.signes_realises|int|format_number}}
|
|
/ {{mois_stats.objectif_total|int|format_number}}
|
|
({{mois_stats.objectif_quotidien|int|format_number}} par jour)
|
|
{% if mois_stats.est_mois_courant %}
|
|
| <strong>Aujourd'hui:</strong> {{mois_stats.signes_aujourdhui|int|format_number}} signes
|
|
{% endif %}
|
|
{% if mois_stats.reste_a_faire > 0 and not mois_stats.est_mois_futur %}
|
|
| <strong>Reste à faire:</strong> {{mois_stats.reste_a_faire|int|format_number}} signes
|
|
{% endif %}
|
|
{% if mois_stats.signes_par_jour_moyen > 0 %}
|
|
| <strong>Moyenne par jour:</strong> {{mois_stats.signes_par_jour_moyen|int|format_number}} signes/jour
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="progress-container">
|
|
<div class="progress-bar">
|
|
{% set signes_sans_aujourdhui = mois_stats.signes_realises - mois_stats.signes_aujourdhui %}
|
|
{% set objectif_jusqu_aujourdhui = mois_stats.objectif_jusqu_aujourdhui if mois_stats.est_mois_courant else mois_stats.objectif_total %}
|
|
{% set reste_a_faire_calc = objectif_jusqu_aujourdhui - mois_stats.signes_realises %}
|
|
{% set reste_a_faire = reste_a_faire_calc if reste_a_faire_calc > 0 else 0 %}
|
|
|
|
{% set total_pour_barre = mois_stats.objectif_total %}
|
|
{% if mois_stats.depassement > 0 %}
|
|
{% set total_pour_barre = mois_stats.signes_realises %}
|
|
{% endif %}
|
|
|
|
{% set pourcentage_aujourdhui = (mois_stats.signes_aujourdhui / total_pour_barre * 100) if total_pour_barre > 0 and mois_stats.est_mois_courant else 0 %}
|
|
{% set pourcentage_restant = (signes_sans_aujourdhui / total_pour_barre * 100) if total_pour_barre > 0 else 0 %}
|
|
{% set pourcentage_depassement = (mois_stats.depassement / total_pour_barre * 100) if total_pour_barre > 0 and mois_stats.depassement > 0 else 0 %}
|
|
{% set pourcentage_reste = (reste_a_faire / total_pour_barre * 100) if total_pour_barre > 0 and reste_a_faire > 0 else 0 %}
|
|
|
|
{% if mois_stats.signes_aujourdhui > 0 and mois_stats.est_mois_courant %}
|
|
<div class="progress-segment blue" style="width: {{pourcentage_aujourdhui}}%">
|
|
{% if pourcentage_aujourdhui > 3 %}
|
|
Aujourd'hui
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if signes_sans_aujourdhui > 0 %}
|
|
<div class="progress-segment blue-light" style="width: {{pourcentage_restant}}%">
|
|
{% if pourcentage_restant > 3 %}
|
|
{{signes_sans_aujourdhui|int|format_number}}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reste_a_faire > 0 and not mois_stats.est_mois_futur %}
|
|
<div class="progress-segment gray" style="width: {{pourcentage_reste}}%">
|
|
{% if pourcentage_reste > 3 %}
|
|
Reste
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if mois_stats.depassement > 0 %}
|
|
<div class="progress-segment yellow" style="width: {{pourcentage_depassement}}%">
|
|
{% if pourcentage_depassement > 3 %}
|
|
+{{mois_stats.depassement|int|format_number}}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if mois_stats.est_mois_courant %}
|
|
<div class="progress-info">
|
|
<strong>Progression:</strong> {{mois_stats.pourcentage_realise|round(1)}}%
|
|
(objectif jusqu'à aujourd'hui: {{mois_stats.objectif_jusqu_aujourdhui|int|format_number}} signes)
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if mois_stats.articles_du_mois %}
|
|
<div style="margin-top: 15px;">
|
|
<strong>Articles du mois ({{mois_stats.articles_du_mois|length}}):</strong>
|
|
<ul style="margin-top: 5px; padding-left: 20px;">
|
|
{% for article in mois_stats.articles_du_mois %}
|
|
<li>
|
|
<strong>{{article.date.strftime('%d/%m/%Y')}}</strong> - {{article.fichier}}
|
|
<span style="color: #666; font-size: 0.9em;">
|
|
({{article.mots|int|format_number}} mots, {{article.signes|int|format_number}} signes)
|
|
</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% else %}
|
|
<div style="margin-top: 15px; color: #999; font-style: italic;">
|
|
Aucun article ce mois
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h3>Statistiques détaillées par mois</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Mois</th>
|
|
<th>Articles</th>
|
|
<th>Mots</th>
|
|
<th>Signes</th>
|
|
<th>Liens</th>
|
|
<th>Temps de lecture</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for mois_cle, stats in blog_data.stats_par_mois.items() %}
|
|
<tr>
|
|
<td>{{stats.mois_formate}}</td>
|
|
<td>{{stats.articles|length}}</td>
|
|
<td>{{stats.mots_total|int|format_number}}</td>
|
|
<td>{{stats.signes_total|int|format_number}}</td>
|
|
<td>{{stats.liens_total}}</td>
|
|
<td>{{stats.temps_lecture_total|format_duree}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Statistiques générées le {{date_gen}}</p>
|
|
<p>Vitesse de lecture estimée: {{lecture_mots_par_minute}} mots/minute</p>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|