commit 16137dce123f466a817ba35967883787be5ee416 Author: Matthieu Bessat Date: Wed Sep 28 22:49:59 2022 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b62a71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +/.hugo_build.lock \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/assets/sass/gallery.scss b/assets/sass/gallery.scss new file mode 100644 index 0000000..f98fd7b --- /dev/null +++ b/assets/sass/gallery.scss @@ -0,0 +1,48 @@ +.gallery { + // display: flex; + // flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(12, 1fr); + grid-column-gap: 1rem; +} +.gallery__side { + grid-column-start: 1; + grid-column-end: 3; +} + +.gallery__items-container { + grid-column-start: 3; + grid-column-end: 13; +} + +.gallery__items { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); + + grid-gap: 1rem; +} +.gallery__item { + aspect-ratio: 1; + // $size: 25rem; + // width: $size; + // height: $size; + img { + width: 0; + height: 0; + min-height: 100%; + min-width: 100%; + display: block; + object-fit: cover; + } +} + +.gallery__nextprev { + display: flex; + justify-content: space-between; +} + +@media (max-width: $md-breakpoint) { + .gallery { + display: block; + } +} diff --git a/assets/sass/header.scss b/assets/sass/header.scss new file mode 100644 index 0000000..aeb6197 --- /dev/null +++ b/assets/sass/header.scss @@ -0,0 +1,4 @@ +header { + background: #d35400; + margin-bottom: 1rem; +} diff --git a/assets/sass/main.scss b/assets/sass/main.scss new file mode 100644 index 0000000..aa42e25 --- /dev/null +++ b/assets/sass/main.scss @@ -0,0 +1,19 @@ +$lg-breakpoint: 1500px; +$md-breakpoint: 1100px; +$sm-breakpoint: 900px; +$xs-breakpoint: 400px; + +$primary: #ff00ff; +$secondary: red; + +.pagination-nav { + margin-top: 1em; + display: flex; + justify-content: space-between; +} + +@import 'page_container.scss'; +@import 'header.scss'; +@import 'gallery.scss'; +@import 'single_image.scss'; + diff --git a/assets/sass/page_container.scss b/assets/sass/page_container.scss new file mode 100644 index 0000000..1d56355 --- /dev/null +++ b/assets/sass/page_container.scss @@ -0,0 +1,33 @@ +.page-container { + width: 80%; + margin: 0 auto; +} + +@media (min-width: $lg-breakpoint) { + .page-container { + width: 58%; + } +} + +@media (min-width: $md-breakpoint) { + .page-container { + width: 65%; + } +} + +@media (max-width: $md-breakpoint) { + .page-container { + width: 75%; + } +} + +@media (max-width: $sm-breakpoint) { + .page-container { + width: 90%; + } +} + +@media (max-width: $xs-breakpoint) { + +} + diff --git a/assets/sass/single_image.scss b/assets/sass/single_image.scss new file mode 100644 index 0000000..5730a58 --- /dev/null +++ b/assets/sass/single_image.scss @@ -0,0 +1,70 @@ +.single-image { + background: #ecf0f1; + display: grid; + grid-template-columns: 1fr 1fr; + grid-column-gap: 1rem; + .single-image__side { + padding: 2rem 1rem 2rem 2rem; + } + .single-image__image-container { + background: #95a5a6; + min-width: 70vh; + min-height: 50vh; + max-height: 80vh; + display: flex; + align-items: center; + justify-content: center; + } + + + .single-image__image { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + } + .single-image__property { + display: flex; + align-items: center; + div:first-of-type { + margin-right: 1rem; + } + .icon { + margin-right: .5rem; + } + pre { + margin: 0; + } + } + .single-image__tags { + ul { + margin: 0; + list-style-type: none; + display: flex; + padding: 0; + li { + border: 1px solid black; + border-radius: 3px; + margin-right: .3rem; + padding: .3rem; + font-size: .9rem; + } + li:last-of-type { + margin-right: 0; + } + } + } + +} + +@media (max-width: $md-breakpoint) { + .single-image { + display: block; + .single-image__image-container { + min-width: initial; + max-height: initial; + width: 100%; + } + } + +} diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..c5f0654 --- /dev/null +++ b/config.toml @@ -0,0 +1,12 @@ +baseURL = '/' +languageCode = 'fr' +defaultContentLanguage = 'fr' +title = "L'Étoile de Bethléem" + +# theme = "custom" + +# [markup] +# [markup.goldmark] +# [markup.goldmark.renderer] +# unsafe = true + diff --git a/content/a-propos-du-site/index.md b/content/a-propos-du-site/index.md new file mode 100644 index 0000000..5f3d3a8 --- /dev/null +++ b/content/a-propos-du-site/index.md @@ -0,0 +1,6 @@ +# A propos de ce site + +## Technologies + +Pour les curieux, ce site est réalisé avec [Hugo](https://gohugo.io/) + diff --git a/content/actualites/_index.md b/content/actualites/_index.md new file mode 100644 index 0000000..aa4e6e5 --- /dev/null +++ b/content/actualites/_index.md @@ -0,0 +1,4 @@ +# Les dernières nouvelles + +Ici vous trouverez des billets de blog rapportant les (bonnes !) dernières nouvelles de l'association et de son action autour de la chapelle de bethléem. + diff --git a/content/actualites/annonce-assemble-generale-consultative.md b/content/actualites/annonce-assemble-generale-consultative.md new file mode 100644 index 0000000..1bdc794 --- /dev/null +++ b/content/actualites/annonce-assemble-generale-consultative.md @@ -0,0 +1,40 @@ +--- +title: Annonce d'une assemblée générale constitutive d'une association autour de la Chapelle de Bethléem +date: 2022-09-10 +--- + +Depuis la création du groupe Facebook dédié à la Chapelle de Bethléem, vous n'avez cessé d'être de plus en plus nombreux à témoigner votre intérêt.🙏 + +Cet intérêt s'est traduit par le souhait croissant de constituer une association de sauvegarde et de valorisation du site. + +Nous avions à cet égard sondé vos intentions au printemps. + +## ⭐ Le moment est venu de prendre rendez-vous. + +Nous vous convions donc le samedi 24 septembre 2022 à 14 h 30, en la salle fête de Saint-Aubin sur Gaillon. + +Nous vous y présenterons le projet d'association, auquel vous pourrez vous joindre comme membres fondateurs. + + + +## Le Projet d'association + +Cette association culturelle et patrimoniale aura à cœur de préserver, promouvoir et valoriser sous tous ses aspects un patrimoine unique. +À cet égard, il sera notamment demandé aux membres fondateurs d'approuver les statuts de L’Etoile de Bethléem - Association des Amis de la Chapelle de Bethléem d’Aubevoye, dont le projet d'article 2 propose l'objet social comme suit : + +> L’Association a pour objet de : +> - Contribuer à la sauvegarde et à la restauration de la Chapelle de Bethléem sise à Aubevoye, dans la commune administrative du Val d’Hazey (Eure) en Normandie ; +> - Promouvoir ce monument, particulièrement sa crypte unique, en approfondissant sa connaissance, en défendant son image et en assurant sa communication ; +> - Valoriser le site par des actions concourant à l’entretien, à la promotion et à l'animation de ce patrimoine historique, culturel, religieux et naturel et de tout ce qui le constitue, qu'elle entend mieux faire connaître, apprécier et protéger. +> +> A cet égard, l’Association reconnaît et s’attache à préserver le caractère chrétien du monument, légué par son histoire, depuis sa fondation par le Cardinal Charles 1er de Bourbon. + +## 👉 L'ordre du jour + +- Présentation du projet, +- Adoption des statuts, +- Constitution des instances, +- Détermination du montant de la cotisation. + +La chapelle compte sur vous ⛪ + diff --git a/content/actualites/noel-2021.md b/content/actualites/noel-2021.md new file mode 100644 index 0000000..c71a2bf --- /dev/null +++ b/content/actualites/noel-2021.md @@ -0,0 +1,37 @@ +--- +title: Noël 2021 +date: 2021-12-24 +--- + +À la suite de notre article sur le rafraîchissement anonyme cet été de Notre Dame d'Aubevoye, nous espérions des réponses à différentes questions concernant la statue. + +[Le récent article de l'Impartial](https://actu.fr/normandie/le-val-d-hazey_27022/eure-mais-qui-a-maquille-la-vierge-noire-d-aubevoye_47325455.html) qui lui a été consacré relève, hélas, de la rubrique des faits divers. Ce n'était pas l'une des réponses attendues. + +Des actes regrettables y ont été commis, sans doute plus par désœuvrement et manque de repères que par réelle méchanceté. + +Mais dans ce cas, comme dans le cas, nettement plus grave, du saccage de la chapelle de Bethléem à l'orée des années 2000, que d'énergies inutilement dépensées. +Nous le déplorons. + +Nous pouvons rappeler que toute dégradation, tout acte de vandalisme est pénalement répréhensible. + +Mais à la veille de fêter Noël, nous préférons croire en la véracité : +- qui de la phrase d'Hölderlin : « Là où croît le péril croît aussi ce qui sauve », +- qui de la phrase de l'Evangile : « là où le pêché abonde, la grâce surabonde » + +Nous préférons espérer que les énergies se canalisent de façon plus constructives, pour œuvrer à faire le bien, magnifier le beau, poursuivre le vrai. + +Mieux même, nous souhaitons donner corps et vie à cette Esperance en appelant à contribuer, chacun avec nos talents, à relever la chapelle de Bethléem. + +Ces dernières années, une communauté virtuelle s'est créée autour de la Chapelle. Celle-ci peut prendre la réalité d'une magnifique équipe pour œuvrer en lien avec les propriétaires a ce que le souvenir ne soit pas une nostalgie, mais une inspiration. + +À l'heure des vœux, tel est le nôtre et il ne saurait que rester pieux s'il ne s'accompagne pas d'une volonté. + +Que pouvons nous faire pour la chapelle de Bethléem ? Quel talent pouvons nous mettre à son service ? + +Telle est la question à laquelle chacun se doit de répondre en son for interne. + +Telle est la question à laquelle nous vous invitons à nous répondre pour envisager ce projet... + +« Ce n'est pas parce les choses sont difficiles que nous n'osons pas, c'est parce que nous n'osons pas qu'elles sont difficiles. » + +Bonnes fêtes de Noël ! diff --git a/content/association.md b/content/association.md new file mode 100644 index 0000000..f4d70c9 --- /dev/null +++ b/content/association.md @@ -0,0 +1,109 @@ +--- +title: "L'association des amis de la chapelle de bethléem" +date: 2022-09-14T16:43:45+02:00 +--- + +Today allow analysis. Thus city *set* **center in our minds**. +After movie hotel imagine seem together. Any exactly seat suffer. Shoulder economic hair argue clear. Or day notice information. The roads are *cluttered*, this why we [laugh](https://en.wikipedia.org/wiki/Laughter) often we also see. + +## Which continue once report break + +![Civil camera are great](https://picsum.photos/seed/picsum/200/300) + +`time echo "how pathetic are we" >> my_way_of_life.txt` + +Action [scientists](https://en.wikipedia.org/wiki/Scientist) do force in their voice. Study young edge particularly number she. Great edge role organization civil camera. +Over ![apply shoulder environment](https://example.org). Issue learn ready with time article protect final. + +> What can we gain by sailing to the moon if we are not able to cross the abyss that separates us from ourselves? This is the most important of all... ‐ Thomas Merton + +### One issue + +Want fish whole spring play. Ready __wife moment__ manage social itself kid. Him not high identify front. +Seek let federal green represent according move. + +- Some day it was great +- Then after the sunset was gone +- Always the sun +- Our moon is hidden from use + +### How we see us + +Left white around too evidence. [Phone huge study address me possible line](https://en.wikipedia.org/wiki/Problematic_smartphone_use). Man win rest you. +Idea spring do country daughter high. None source fire national around. Hit politics law them early. + +## Economy want compare garden. + +![The situation leave behind trees](https://picsum.photos/200/300?grayscale) + +Station friend describe defense wide stay. Movie else international piece live imagine feeling leave. +Ago easy main rather today. Her cold civil art. May team executive among. + +Law present himself her full describe ago season. Itself though meeting case. Risk training all movement education couple everybody. +Improve form agreement. Skin should action series. + +```python +def is_palindrome(s): + low = 0 + high = len(s) - 1 + while low < high: + if not s[low].isalpha(): + low += 1 + elif not s[high].isalpha(): + high -= 1 + else: + if s[low].lower() != s[high].lower(): + return False + else: + low += 1 + high -= 1 + return True +``` + +## Company myself often ahead seek example. + +Alone minute across technology. Debate improve too travel whom. +Dark experience health even move push property government. Pressure reality travel country must spring sea really. + +Often herself become fill green. Pm foot thousand. + +Anything education first service piece support decade. Society couple beautiful machine conference many. + +Today allow analysis. Thus city set center. +After movie hotel imagine seem together. Any exactly seat suffer. +Shoulder economic hair argue clear. Or day notice information. + +## We seek to others + +### The very truth is here + +Action scientist force. Study young edge particularly number she. Great edge role organization civil camera. +Over apply shoulder environment. Issue learn ready with time article protect final. + +Want fish whole spring play. Ready wife moment manage social itself kid. Him not high identify front. +Seek let federal green represent according move. + +Left white around too evidence. Phone huge study address me possible line. Man win rest you. +Idea spring do country daughter high. None source fire national around. Hit politics law them early. + +### It's easy to see + +Economy want compare garden. Company myself often ahead seek example. + +Law present himself her full describe ago season. Itself though meeting case. Risk training all movement education couple everybody. + +Improve form agreement. Skin should action series. + +Station friend describe defense wide stay. Movie else international piece live imagine feeling leave. +Ago easy main rather today. Her cold civil art. May team executive among. + +## A Final word on our ego + +![Often, we think](https://picsum.photos/200/300?grayscale) + +**Alone minute across technology**. _Debate improve too travel whom_. +Dark experience health even move push property government. Pressure reality travel country must spring sea really. + +Often herself become fill green. Pm foot thousand. + +Anything education first service piece support decade. Society couple beautiful machine conference many. diff --git a/content/histoires/_index.md b/content/histoires/_index.md new file mode 100644 index 0000000..2d929ea --- /dev/null +++ b/content/histoires/_index.md @@ -0,0 +1,6 @@ +# Quelques histoires + +Raconte nous une histoire... + +Ici vous trouverez des billets/chroniques parlant de l'histoire de la chapelle et de son environnement. + diff --git a/content/histoires/bethleem-et-les-ordres-cenobitiques-et-eremitiques-les-chartreux.md b/content/histoires/bethleem-et-les-ordres-cenobitiques-et-eremitiques-les-chartreux.md new file mode 100644 index 0000000..dd03227 --- /dev/null +++ b/content/histoires/bethleem-et-les-ordres-cenobitiques-et-eremitiques-les-chartreux.md @@ -0,0 +1,35 @@ +--- +title: Bethleem et les ordres cënobitiques et érémitiques les Chartreux +date: 2021-10-24 +--- + +Si l'ordre fut fondé dans le massif de la Grande Chartreuse, au Nord de Grenoble, en 1084 par Saint Bruno de Cologne (Bruno le chartreux) qui était Ecolâtre de Reims (Ecolâtre= maître de l'école monastique ou de l'école cathédrale), c'est son successeur, Guigues 1°, qui, vers 1127, mis par écrit les coutumes des moines de la Grande Chartreuse ; les Chartreux ne disposent pas à proprement parler d'une Règle mais de statuts. l'ordre est contemplatif, semi eremitique ; il comprend une branche masculine et une branche féminine. + +L'évolution de cet ordre est très paradoxalement influencé par l'évolution socio-cuturelle de la société, dont pourtant il semble retranché ; il est interessant de s'y attarder. + +En 1140 eu lieu le premier chapitre général reunissant toutes les maisons sous le priorat de Saint Anthelme. + +Au cours du grand schisme d'Occident (1378-1417) qui vit 2 papautés s'affronter, un schisme s'opéra également en 1380 et dura jusq'en 1410. Les Chartreux Allemands et Italiens se rapprochent de la Papauté de Rome ; les Chartreux d'Espagne et de France se rapprochent du Pape d'Avignon. + +Les Guerres de Religion affaiblirent l'ordre qui fut obligé de fermer beaucoup de ses Maisons. + +Aux alentours de la Révolution, les Chartreux étaient perçus comme une famille riche. Les Maisons Françaises furent vendues en 1791 et 1792 puis l'ordre fut rétabi en 1816. + +De 1816 à 1830, les traditions Cartusiennes sont interdites ( 1° république- Empire) ; l'ordre est restauré par Jean Baptiste Mortaize aux environs de 1835. Les lois d'Emile Combes de1901 obligèrent les Chartreux de France à quitter le pays. Le concile Vatican II promulga et approuva les nouveaux statuts en 1971 et 1973. + +La vie quotidienne repose sur la solitude, l'essentiel de la vie des religieux se déroulant dans des maisonnettes composées de trois pièces et d'un jardinet, toutes disposées autour du cloitre, lequel entouré lui même le cimetière conventuel. Les prières sont mêlées de travail manuel et d'étude, de jeûne et de pauvreté. + +Les moments de vie commune sont : l'office divin, la messe, le réfectoire (dimanche seulement), les récréations et promenades (spaciement). + +Pour avoir un aperçu de ce qu'est la vie d'un père Chartreux, nous vous conseillons [ce petit reportage fort bien mené](https://youtu.be/90w_LQg0Kik). + +Des trois ordres semi-érémitiques, l'ordre cartusien est le seul dont la présence en France est encore manifeste. P'us présent en Normandie, il y fût pourtant florissant et bien implanté. Non seulement à Bourbon-Lez-Gaillon, mais aussi autour de Rouen avec la Chartreuse de la Rose puis la Chartreuse Saint Julien de Petit-Quevilly. + +Les illustrations ci-dessous sont : + +- Saint Bruno, statue en stuc de Étienne Pierre Adrien Gois 1776 église de Saint Georges d'Aubevoye. +- L' Emblème et la devise de l'ordre des Chartreux : Stat Crux dum volvitur orbis (« La Croix demeure tandis que le monde tourne »). + +À noter que dans la vague des nouveaux mouvements religieux s'est créée dans les années 50 une famille monastique s'inspirant des chartreux, qui prît son essor dans les années 1970/80. Il s'agit de la famille monastique de... Bethléem, de la Vierge et de St Bruno. + + diff --git a/content/histoires/embleme_chartreux.jpg b/content/histoires/embleme_chartreux.jpg new file mode 100644 index 0000000..9ea2044 Binary files /dev/null and b/content/histoires/embleme_chartreux.jpg differ diff --git a/content/histoires/saint_bruno.jpg b/content/histoires/saint_bruno.jpg new file mode 100644 index 0000000..932dcc9 Binary files /dev/null and b/content/histoires/saint_bruno.jpg differ diff --git a/content/images/00001/index.md b/content/images/00001/index.md new file mode 100644 index 0000000..41a4605 --- /dev/null +++ b/content/images/00001/index.md @@ -0,0 +1,16 @@ +--- +title: Autel principal +original_name: L'autel à l'intérieur.jpg +mime_type: image/jpeg +tags: + - crypte + - autel-principal +--- + +L'autel principal dans enfoncement en demi-lune photographié du temps de M. et Mme Villain. + +On apperçoit un mini-tabernacle sur l'autel avec une croix et deux chandeliers. + +Le Tabernacle est plus petit que celui disposé sur le même autel sur une [photo de l'ensemble de la crypte](/images/00006/). + +On remarque la précense de l'étoile encore intacte. diff --git a/content/images/00001/original.jpg b/content/images/00001/original.jpg new file mode 100755 index 0000000..9021678 Binary files /dev/null and b/content/images/00001/original.jpg differ diff --git a/content/images/00002/index.md b/content/images/00002/index.md new file mode 100644 index 0000000..f648460 --- /dev/null +++ b/content/images/00002/index.md @@ -0,0 +1,11 @@ +--- +title: Ensemble crypte +original_name: Aubevoye_-_Bethléem_-_la_crypte_en_1896.jpg +mime_type: image/jpeg +tags: + - crypte + - ensemble-crypte +inception: 1896 +--- + + diff --git a/content/images/00002/original.jpg b/content/images/00002/original.jpg new file mode 100755 index 0000000..1655a9c Binary files /dev/null and b/content/images/00002/original.jpg differ diff --git a/content/images/00003/index.md b/content/images/00003/index.md new file mode 100644 index 0000000..8592059 --- /dev/null +++ b/content/images/00003/index.md @@ -0,0 +1,9 @@ +--- +title: Dalle de la crypte cassée +original_name: dalle-crypte-bethleem1.jpg +mime_type: image/jpeg +tags: +- crypte +- etoile +--- + diff --git a/content/images/00003/original.jpg b/content/images/00003/original.jpg new file mode 100755 index 0000000..d54a5be Binary files /dev/null and b/content/images/00003/original.jpg differ diff --git a/content/images/00005/index.md b/content/images/00005/index.md new file mode 100644 index 0000000..be82984 --- /dev/null +++ b/content/images/00005/index.md @@ -0,0 +1,8 @@ +--- +title: Entrée de la crypte +original_name: entree-crypte-bethleem-11.jpg +mime_type: image/jpeg +tags: ['crypte', 'entrée-crypte'] +--- + + diff --git a/content/images/00005/original.jpg b/content/images/00005/original.jpg new file mode 100755 index 0000000..28a9215 Binary files /dev/null and b/content/images/00005/original.jpg differ diff --git a/content/images/00006/index.md b/content/images/00006/index.md new file mode 100644 index 0000000..f77bcc8 --- /dev/null +++ b/content/images/00006/index.md @@ -0,0 +1,12 @@ +--- +title: Ensemble crypte +original_name: WhatsApp Image 2022-01-14 at 14.03.06.jpeg +mime_type: image/jpeg +tags: ['crypte', 'ensemble-crypte'] +inception: + from: 1950 + to: 2000 +--- + +Photographie, ensemble de la crypte sous M. et Mme Villain montrant les différents meubliers présent pour le culte : bancs, croix sur le mur nord, lampes a huile au plafond, tables avec nappes... + diff --git a/content/images/00006/original.jpg b/content/images/00006/original.jpg new file mode 100755 index 0000000..5729297 Binary files /dev/null and b/content/images/00006/original.jpg differ diff --git a/content/images/00007/index.md b/content/images/00007/index.md new file mode 100644 index 0000000..33c3853 --- /dev/null +++ b/content/images/00007/index.md @@ -0,0 +1,9 @@ +--- +title: Mangeoir, étable +original_name: WhatsApp Image 2022-01-14 at 14.05.16.jpeg +mime_type: image/jpeg +tags: + - crypte + - mangeoir +--- + diff --git a/content/images/00007/original.jpg b/content/images/00007/original.jpg new file mode 100755 index 0000000..6cfd584 Binary files /dev/null and b/content/images/00007/original.jpg differ diff --git a/content/images/00008/index.md b/content/images/00008/index.md new file mode 100644 index 0000000..efaccf9 --- /dev/null +++ b/content/images/00008/index.md @@ -0,0 +1,7 @@ +--- +title: Mangeoir, étable +original_name: Reproduction de la grotte de la nativité.jpg +mime_type: image/jpeg +tags: ['crypte', 'mangeoir'] +--- + diff --git a/content/images/00008/original.jpg b/content/images/00008/original.jpg new file mode 100755 index 0000000..51eb4a2 Binary files /dev/null and b/content/images/00008/original.jpg differ diff --git a/content/images/00009/index.md b/content/images/00009/index.md new file mode 100644 index 0000000..0cb7765 --- /dev/null +++ b/content/images/00009/index.md @@ -0,0 +1,9 @@ +--- +title: Statue de la Vierge +original_name: La statue de la Vierge à l'intérieur de la grotte.jpg +mime_type: image/jpeg +tags: + - crypte + - loge-vierge +--- + diff --git a/content/images/00009/original.jpg b/content/images/00009/original.jpg new file mode 100755 index 0000000..65a0d7c Binary files /dev/null and b/content/images/00009/original.jpg differ diff --git a/content/images/00010/index.md b/content/images/00010/index.md new file mode 100644 index 0000000..bd29955 --- /dev/null +++ b/content/images/00010/index.md @@ -0,0 +1,10 @@ +--- +title: Avant de la crypte +original_name: crypte_carte_postale.jpg +mime_type: image/jpeg +tags: + - crypte +--- + +Ensemble rapproché à l'avant la crypte. + diff --git a/content/images/00010/original.jpg b/content/images/00010/original.jpg new file mode 100755 index 0000000..3363734 Binary files /dev/null and b/content/images/00010/original.jpg differ diff --git a/content/images/00011/index.md b/content/images/00011/index.md new file mode 100644 index 0000000..6d76b48 --- /dev/null +++ b/content/images/00011/index.md @@ -0,0 +1,10 @@ +--- +title: Ensemble mangeoir, étable +original_name: etable.jpg +mime_type: image/jpeg +tags: + - crypte + - mangeoir +# etable +--- + diff --git a/content/images/00011/original.jpg b/content/images/00011/original.jpg new file mode 100755 index 0000000..116bd7f Binary files /dev/null and b/content/images/00011/original.jpg differ diff --git a/content/images/00012/index.md b/content/images/00012/index.md new file mode 100644 index 0000000..a4dcc1f --- /dev/null +++ b/content/images/00012/index.md @@ -0,0 +1,10 @@ +--- +title: Entrée de la crypte en 1896 +original_name: Aubevoye_-_Bethléem_-_entrée_de_la_crypte_-_1896.jpg +mime_type: image/jpeg +tags: + - crypte + - entrée-crypte +inception: 1896 +--- + diff --git a/content/images/00012/original.jpg b/content/images/00012/original.jpg new file mode 100755 index 0000000..5c602e5 Binary files /dev/null and b/content/images/00012/original.jpg differ diff --git a/content/images/00013/index.md b/content/images/00013/index.md new file mode 100644 index 0000000..01479ad --- /dev/null +++ b/content/images/00013/index.md @@ -0,0 +1,7 @@ +--- +title: La vierge éclairée +original_name: 935_001.jpg +mime_type: image/jpeg +tags: ['crypte', 'loge-vierge'] +--- + diff --git a/content/images/00013/original.jpg b/content/images/00013/original.jpg new file mode 100755 index 0000000..b5a67de Binary files /dev/null and b/content/images/00013/original.jpg differ diff --git a/content/images/00014/index.md b/content/images/00014/index.md new file mode 100644 index 0000000..15345f6 --- /dev/null +++ b/content/images/00014/index.md @@ -0,0 +1,7 @@ +--- +title: Ensemble crypte +original_name: 47FI3.jpg +mime_type: image/jpeg +tags: ['crypte', 'ensemble-crypte'] +--- + diff --git a/content/images/00014/original.jpg b/content/images/00014/original.jpg new file mode 100755 index 0000000..6bbb1e9 Binary files /dev/null and b/content/images/00014/original.jpg differ diff --git a/content/images/00016/index.md b/content/images/00016/index.md new file mode 100644 index 0000000..e8a4838 --- /dev/null +++ b/content/images/00016/index.md @@ -0,0 +1,7 @@ +--- +title: Mangeoir, Étable +original_name: 629_001.jpg +mime_type: image/jpeg +tags: ['crypte', 'mangeoir'] +--- + diff --git a/content/images/00016/original.jpg b/content/images/00016/original.jpg new file mode 100755 index 0000000..bf86c16 Binary files /dev/null and b/content/images/00016/original.jpg differ diff --git a/content/images/00017/index.md b/content/images/00017/index.md new file mode 100644 index 0000000..6b5aa00 --- /dev/null +++ b/content/images/00017/index.md @@ -0,0 +1,7 @@ +--- +title: Mangeoir, étable +original_name: 865_001.jpg +mime_type: image/jpeg +tags: ['crypte', 'mangeoir'] +--- + diff --git a/content/images/00017/original.jpg b/content/images/00017/original.jpg new file mode 100755 index 0000000..2e60a57 Binary files /dev/null and b/content/images/00017/original.jpg differ diff --git a/content/images/00018/index.md b/content/images/00018/index.md new file mode 100644 index 0000000..2ea9318 --- /dev/null +++ b/content/images/00018/index.md @@ -0,0 +1,9 @@ +--- +title: Dessin de l'entrée de la crypte +original_name: Bethleem-pot-crypte.jpg +mime_type: image/jpeg +tags: + - crypte + - entrée-crypte +--- + diff --git a/content/images/00018/original.jpg b/content/images/00018/original.jpg new file mode 100755 index 0000000..f679f44 Binary files /dev/null and b/content/images/00018/original.jpg differ diff --git a/content/images/00019/index.md b/content/images/00019/index.md new file mode 100644 index 0000000..3735d59 --- /dev/null +++ b/content/images/00019/index.md @@ -0,0 +1,10 @@ +--- +title: Le plafond de la grotte avec ses lampes +original_name: Le plafond de la grotte avec ses lampes.jpg +mime_type: image/jpeg +tags: + - crypte + - lampes + - ensemble-crypte +--- + diff --git a/content/images/00019/original.jpg b/content/images/00019/original.jpg new file mode 100755 index 0000000..9372910 Binary files /dev/null and b/content/images/00019/original.jpg differ diff --git a/content/images/00020/index.md b/content/images/00020/index.md new file mode 100644 index 0000000..5d11b86 --- /dev/null +++ b/content/images/00020/index.md @@ -0,0 +1,7 @@ +--- +title: Entrée de la crypte aujourd'hui +original_name: entree-crypte-bethleem-2.jpg +mime_type: image/jpeg +tags: ['crypte', 'entrée-crypte'] +--- + diff --git a/content/images/00020/original.jpg b/content/images/00020/original.jpg new file mode 100755 index 0000000..a099966 Binary files /dev/null and b/content/images/00020/original.jpg differ diff --git a/content/images/00021/index.md b/content/images/00021/index.md new file mode 100644 index 0000000..633e5b5 --- /dev/null +++ b/content/images/00021/index.md @@ -0,0 +1,9 @@ +--- +title: Autel des rois mages +original_name: Une petite statue de la Vierge à l'intérieur de la grotte.jpg +mime_type: image/jpeg +tags: + - crypte + - autel-rois-mages +--- + diff --git a/content/images/00021/original.jpg b/content/images/00021/original.jpg new file mode 100755 index 0000000..82bd2be Binary files /dev/null and b/content/images/00021/original.jpg differ diff --git a/content/images/00022/index.md b/content/images/00022/index.md new file mode 100644 index 0000000..bed5d67 --- /dev/null +++ b/content/images/00022/index.md @@ -0,0 +1,7 @@ +--- +title: Statue de la Vierge +original_name: WhatsApp Image 2022-01-14 at 14.04.04.jpeg +mime_type: image/jpeg +tags: ['crypte', 'loge-vierge'] +--- + diff --git a/content/images/00022/original.jpg b/content/images/00022/original.jpg new file mode 100755 index 0000000..c456a16 Binary files /dev/null and b/content/images/00022/original.jpg differ diff --git a/content/images/_index.md b/content/images/_index.md new file mode 100644 index 0000000..407f3f1 --- /dev/null +++ b/content/images/_index.md @@ -0,0 +1,4 @@ +# Images + +Vous trouverez ici une liste d'images. + diff --git a/content/topics/my-topic.md b/content/topics/my-topic.md new file mode 100644 index 0000000..3d8a947 --- /dev/null +++ b/content/topics/my-topic.md @@ -0,0 +1,14 @@ +--- +title: "My Topic" +date: 2022-09-14T16:43:45+02:00 +draft: true +--- + +## some example text + +hello world + +## lelelele + +dalaldalsd + diff --git a/data/images.yml b/data/images.yml new file mode 100644 index 0000000..963b5e5 --- /dev/null +++ b/data/images.yml @@ -0,0 +1,242 @@ +images: + - id: 5 + mime_type: image/jpeg + original_name: L'autel à l'intérieur.jpg + tags: + - crypte + - id: 6 + mime_type: image/jpeg + original_name: Aubevoye_-_Bethléem_-_la_crypte_en_1896.jpg + tags: + - crypte + - id: 7 + mime_type: image/jpeg + original_name: dalle-crypte-bethleem1.jpg + tags: + - crypte + - id: 8 + mime_type: image/jpeg + original_name: 271904954_245896294360669_963697394648238803_n.jpg + tags: + - crypte + - id: 9 + mime_type: image/jpeg + original_name: entree-crypte-bethleem-11.jpg + tags: + - crypte + - id: 10 + mime_type: image/jpeg + original_name: WhatsApp Image 2022-01-14 at 14.03.06.jpeg + tags: + - crypte + - id: 11 + mime_type: image/jpeg + original_name: WhatsApp Image 2022-01-14 at 14.05.16.jpeg + tags: + - crypte + - id: 12 + mime_type: image/jpeg + original_name: Reproduction de la grotte de la nativité.jpg + tags: + - crypte + - id: 13 + mime_type: image/jpeg + original_name: La statue de la Vierge à l'intérieur de la grotte.jpg + tags: + - crypte + - id: 14 + mime_type: image/jpeg + original_name: crypte_carte_postale.jpg + tags: + - crypte + - id: 15 + mime_type: image/jpeg + original_name: etable.jpg + tags: + - crypte + - id: 16 + mime_type: image/jpeg + original_name: Aubevoye_-_Bethléem_-_entrée_de_la_crypte_-_1896.jpg + tags: + - crypte + - id: 17 + mime_type: image/jpeg + original_name: 935_001.jpg + tags: + - crypte + - id: 18 + mime_type: image/jpeg + original_name: 47FI3.jpg + tags: + - crypte + - id: 19 + mime_type: image/jpeg + original_name: 271697526_616947712731542_8311055355049271148_n.jpg + tags: + - crypte + - id: 20 + mime_type: image/jpeg + original_name: 629_001.jpg + tags: + - crypte + - id: 21 + mime_type: image/jpeg + original_name: 865_001.jpg + tags: + - crypte + - id: 22 + mime_type: image/jpeg + original_name: Bethleem-pot-crypte.jpg + tags: + - crypte + - id: 23 + mime_type: image/jpeg + original_name: Le plafond de la grotte avec ses lampes.jpg + tags: + - crypte + - id: 24 + mime_type: image/jpeg + original_name: entree-crypte-bethleem-2.jpg + tags: + - crypte + - id: 25 + mime_type: image/jpeg + original_name: Une petite statue de la Vierge à l'intérieur de la grotte.jpg + tags: + - crypte + - id: 26 + mime_type: image/jpeg + original_name: WhatsApp Image 2022-01-14 at 14.04.04.jpeg + tags: + - crypte + - id: 1000 + mime_type: image/jpeg + original_name: CP_vieille_eglise_de_Bethleem_monique_poree.jpg + tags: + - facade + - id: 1001 + mime_type: image/jpeg + original_name: IMG_2561.JPG + tags: + - facade + - id: 1002 + mime_type: image/jpeg + original_name: 474_001.jpg + tags: + - facade + - id: 1003 + mime_type: image/jpeg + original_name: 174_001.jpg + tags: + - facade + - id: 1004 + mime_type: image/jpeg + original_name: SFI290.jpg + tags: + - facade + - id: 1005 + mime_type: image/jpeg + original_name: WhatsApp Image 2022-01-14 at 14.05.16.jpeg + tags: + - facade + - id: 1006 + mime_type: image/jpeg + original_name: 47FI2.jpg + tags: + - facade + - id: 1007 + mime_type: image/jpeg + original_name: Bethleem1959.jpg + tags: + - facade + - id: 1008 + mime_type: image/jpeg + original_name: WhatsApp Image 2022-01-14 at 14.02.33.jpeg + tags: + - facade + - id: 1009 + mime_type: image/jpeg + original_name: Extérieur de derrière la Vierge.jpg + tags: + - facade + - id: 1010 + mime_type: image/jpeg + original_name: 791_001.jpg + tags: + - facade + - id: 1011 + mime_type: image/jpeg + original_name: Bethleem1950.jpg + tags: + - facade + - id: 1012 + mime_type: image/jpeg + original_name: 057_001.jpg + tags: + - facade + - id: 1013 + mime_type: image/jpeg + original_name: 294_001.jpg + tags: + - facade + - id: 1014 + mime_type: image/jpeg + original_name: 260_001.jpg + tags: + - facade + - id: 1015 + mime_type: image/jpeg + original_name: 760_001.jpg + tags: + - facade + - id: 1016 + mime_type: image/jpeg + original_name: SFI289.jpg + tags: + - facade + - id: 1017 + mime_type: image/jpeg + original_name: 498_001.jpg + tags: + - facade + - id: 1018 + mime_type: image/jpeg + original_name: bethleemcouleur.jpg + tags: + - facade + - id: 1019 + mime_type: image/jpeg + original_name: 642_001.jpg + tags: + - facade + - id: 1020 + mime_type: image/jpeg + original_name: c5c7b7e1072fb95616855f2803341202.jpg + tags: + - facade + - id: 1021 + mime_type: image/jpeg + original_name: 741_001.jpg + tags: + - facade + - id: 1022 + mime_type: image/jpeg + original_name: SFI287_Bethleem_sept_1903.jpg + tags: + - facade + - id: 1023 + mime_type: image/jpeg + original_name: 378_001.jpg + tags: + - facade + - id: 1024 + mime_type: image/jpeg + original_name: carte-postale-ancienne-27-aubevoye-chapelle-de-bethleem-animation-1912.jpg + tags: + - facade + - id: 1025 + mime_type: image/jpeg + original_name: carte_postale.jpg + tags: + - facade + diff --git a/import_mess/.gitignore b/import_mess/.gitignore new file mode 100644 index 0000000..bd4e4bc --- /dev/null +++ b/import_mess/.gitignore @@ -0,0 +1,4 @@ +to_import_* +output.* +new_output.* + diff --git a/import_mess/create_markdown.py b/import_mess/create_markdown.py new file mode 100644 index 0000000..f90dd9f --- /dev/null +++ b/import_mess/create_markdown.py @@ -0,0 +1,42 @@ +#!/bin/python3 + +""" +Will create markdown files for all the images +""" + +import json +import pathlib +import os +import shutil + +inp_file = open('./images_list.json') +images = json.loads(inp_file.read()) + +CONTENT_BASE = '../content/images/' +FILES_BASE = '../static/files/images/' + +dirs = os.listdir(FILES_BASE) +print(sorted(dirs)) + +for dir in dirs: + if os.path.exists(CONTENT_BASE + dir): + continue + os.mkdir(CONTENT_BASE + dir) + + id = int(dir) + print(id - 1) + img = images[int(dir)-1] + print(img) + + shutil.copy(FILES_BASE + dir + '/original.jpg', CONTENT_BASE + dir + '/original.jpg') + image_md = open(CONTENT_BASE + dir + "/index.md", "a") + image_md.write("---\n") + image_md.write("title: Image\n") + image_md.write(f"original_name: {img['original_name']}\n") + image_md.write(f"mime_type: {img['mime_type']}\n") + image_md.write(f"tags: {img['tags']}\n") + image_md.write("---\n") + image_md.write("\n") + # description about the image goes after (like the legend) + image_md.close() + diff --git a/import_mess/images_list.json b/import_mess/images_list.json new file mode 100644 index 0000000..9d93a85 --- /dev/null +++ b/import_mess/images_list.json @@ -0,0 +1,387 @@ +[ + { + "id": 5, + "mime_type": "image/jpeg", + "original_name": "L'autel à l'intérieur.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 6, + "mime_type": "image/jpeg", + "original_name": "Aubevoye_-_Bethléem_-_la_crypte_en_1896.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 7, + "mime_type": "image/jpeg", + "original_name": "dalle-crypte-bethleem1.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 8, + "mime_type": "image/jpeg", + "original_name": "271904954_245896294360669_963697394648238803_n.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 9, + "mime_type": "image/jpeg", + "original_name": "entree-crypte-bethleem-11.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 10, + "mime_type": "image/jpeg", + "original_name": "WhatsApp Image 2022-01-14 at 14.03.06.jpeg", + "tags": [ + "crypte" + ] + }, + { + "id": 11, + "mime_type": "image/jpeg", + "original_name": "WhatsApp Image 2022-01-14 at 14.05.16.jpeg", + "tags": [ + "crypte" + ] + }, + { + "id": 12, + "mime_type": "image/jpeg", + "original_name": "Reproduction de la grotte de la nativité.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 13, + "mime_type": "image/jpeg", + "original_name": "La statue de la Vierge à l'intérieur de la grotte.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 14, + "mime_type": "image/jpeg", + "original_name": "crypte_carte_postale.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 15, + "mime_type": "image/jpeg", + "original_name": "etable.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 16, + "mime_type": "image/jpeg", + "original_name": "Aubevoye_-_Bethléem_-_entrée_de_la_crypte_-_1896.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 17, + "mime_type": "image/jpeg", + "original_name": "935_001.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 18, + "mime_type": "image/jpeg", + "original_name": "47FI3.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 19, + "mime_type": "image/jpeg", + "original_name": "271697526_616947712731542_8311055355049271148_n.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 20, + "mime_type": "image/jpeg", + "original_name": "629_001.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 21, + "mime_type": "image/jpeg", + "original_name": "865_001.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 22, + "mime_type": "image/jpeg", + "original_name": "Bethleem-pot-crypte.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 23, + "mime_type": "image/jpeg", + "original_name": "Le plafond de la grotte avec ses lampes.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 24, + "mime_type": "image/jpeg", + "original_name": "entree-crypte-bethleem-2.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 25, + "mime_type": "image/jpeg", + "original_name": "Une petite statue de la Vierge à l'intérieur de la grotte.jpg", + "tags": [ + "crypte" + ] + }, + { + "id": 26, + "mime_type": "image/jpeg", + "original_name": "WhatsApp Image 2022-01-14 at 14.04.04.jpeg", + "tags": [ + "crypte" + ] + }, + { + "id": 1000, + "mime_type": "image/jpeg", + "original_name": "CP_vieille_eglise_de_Bethleem_monique_poree.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1001, + "mime_type": "image/jpeg", + "original_name": "IMG_2561.JPG", + "tags": [ + "facade" + ] + }, + { + "id": 1002, + "mime_type": "image/jpeg", + "original_name": "474_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1003, + "mime_type": "image/jpeg", + "original_name": "174_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1004, + "mime_type": "image/jpeg", + "original_name": "SFI290.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1005, + "mime_type": "image/jpeg", + "original_name": "WhatsApp Image 2022-01-14 at 14.05.16.jpeg", + "tags": [ + "facade" + ] + }, + { + "id": 1006, + "mime_type": "image/jpeg", + "original_name": "47FI2.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1007, + "mime_type": "image/jpeg", + "original_name": "Bethleem1959.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1008, + "mime_type": "image/jpeg", + "original_name": "WhatsApp Image 2022-01-14 at 14.02.33.jpeg", + "tags": [ + "facade" + ] + }, + { + "id": 1009, + "mime_type": "image/jpeg", + "original_name": "Extérieur de derrière la Vierge.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1010, + "mime_type": "image/jpeg", + "original_name": "791_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1011, + "mime_type": "image/jpeg", + "original_name": "Bethleem1950.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1012, + "mime_type": "image/jpeg", + "original_name": "057_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1013, + "mime_type": "image/jpeg", + "original_name": "294_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1014, + "mime_type": "image/jpeg", + "original_name": "260_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1015, + "mime_type": "image/jpeg", + "original_name": "760_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1016, + "mime_type": "image/jpeg", + "original_name": "SFI289.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1017, + "mime_type": "image/jpeg", + "original_name": "498_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1018, + "mime_type": "image/jpeg", + "original_name": "bethleemcouleur.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1019, + "mime_type": "image/jpeg", + "original_name": "642_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1020, + "mime_type": "image/jpeg", + "original_name": "c5c7b7e1072fb95616855f2803341202.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1021, + "mime_type": "image/jpeg", + "original_name": "741_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1022, + "mime_type": "image/jpeg", + "original_name": "SFI287_Bethleem_sept_1903.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1023, + "mime_type": "image/jpeg", + "original_name": "378_001.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1024, + "mime_type": "image/jpeg", + "original_name": "carte-postale-ancienne-27-aubevoye-chapelle-de-bethleem-animation-1912.jpg", + "tags": [ + "facade" + ] + }, + { + "id": 1025, + "mime_type": "image/jpeg", + "original_name": "carte_postale.jpg", + "tags": [ + "facade" + ] + } +] + diff --git a/import_mess/import_1.py b/import_mess/import_1.py new file mode 100644 index 0000000..6bbca64 --- /dev/null +++ b/import_mess/import_1.py @@ -0,0 +1,44 @@ +import os +import json +import sys +import shutil + +import magic +import mimetypes + +HUGO_IMAGES = '../static/files/images/' +TO_IMPORT = './to_import_interieur_nef/' +INITIAL_TAGS = ['interieur_nef'] + +current_index = 51 + +res = os.listdir(TO_IMPORT) + +processed_images = [] + +for original_file_name in res: + print(f'{current_index} loading {original_file_name}') + folder_name = str(current_index).zfill(5) + os.mkdir(HUGO_IMAGES + folder_name) + old_path = TO_IMPORT + original_file_name + mime_type = magic.from_file(old_path, mime=True) + print(f'found mime {mime_type}') + + new_ext = list(filter(lambda x: x[1] == mime_type, mimetypes.types_map.items()))[0][0] + + new_path = HUGO_IMAGES + folder_name + '/original' + new_ext + + shutil.copyfile(old_path, new_path) + + processed_images.append({ + 'id': current_index, + 'original_name': original_file_name, + 'mime_type': mime_type, + 'tags': INITIAL_TAGS + # name, description + }) + current_index += 1 + +of = open('./output.json', 'w') +of.write(json.dumps(processed_images)) +of.close() diff --git a/import_mess/import_into_category.py b/import_mess/import_into_category.py new file mode 100644 index 0000000..b1949bd --- /dev/null +++ b/import_mess/import_into_category.py @@ -0,0 +1,102 @@ +#!/bin/python3 +""" +For a particular category +Will create markdown files and copy the image +""" +import os +import shutil +import magic +import mimetypes + +DEFAULT_TAGS = ['crypte'] +SOURCE_DIR = './to_import_crypte/' +CONTENT_DIR = '../content/images/' + +# get the current index for the outputdir +content_dir_files = os.listdir(CONTENT_DIR) +current_index = 1 +if len(content_dir_files) > 0: + current_index = max(sorted([int(r) for r in content_dir_files]))+1 + +print(f"current index is {current_index}") + +processed_images = [] + +to_import_files = os.listdir(SOURCE_DIR) + +for original_file_name in to_import_files: + print(f'> {current_index} loading {original_file_name}') + + new_dir_name = str(current_index).zfill(5) + '/' + + if os.path.exists(CONTENT_DIR + new_dir_name): + continue + + os.mkdir(CONTENT_DIR + new_dir_name) + + image_old_path = SOURCE_DIR + original_file_name + mime_type = magic.from_file(image_old_path, mime=True) + print(f' found mime {mime_type}') + new_ext = list(filter(lambda x: x[1] == mime_type, mimetypes.types_map.items()))[0][0] + image_new_path = CONTENT_DIR + new_dir_name + 'original' + new_ext + + # processed_images.append({ + # 'id': current_index, + # 'original_name': original_file_name, + # 'mime_type': mime_type, + # 'tags': INITIAL_TAGS + # # name, description + # }) + + # copy the image to the final place + shutil.copy(image_old_path, image_new_path) + + img = { + 'id': current_index, + 'original_name': original_file_name, + 'mime_type': mime_type, + 'tags': DEFAULT_TAGS + # name, description + } + + # create the markdown file along + image_md = open(CONTENT_DIR + new_dir_name + "index.md", "a") + image_md.write("---\n") + image_md.write("title: Image\n") + image_md.write(f"original_name: {img['original_name']}\n") + image_md.write(f"mime_type: {img['mime_type']}\n") + image_md.write(f"tags: {img['tags']}\n") + image_md.write("---\n") + image_md.write("\n") + # description about the image goes after (like the legend) + image_md.close() + + current_index += 1 + + +# import json +# import pathlib +# import os +# import shutil + +# inp_file = open('./images_list.json') +# images = json.loads(inp_file.read()) + +# CONTENT_BASE = '../content/images/' +# FILES_BASE = '../static/files/images/' + +# dirs = os.listdir(FILES_BASE) +# print(sorted(dirs)) + +# for dir in dirs: +# if os.path.exists(CONTENT_BASE + dir): +# continue +# os.mkdir(CONTENT_BASE + dir) + +# id = int(dir) +# print(id - 1) +# img = images[int(dir)-1] +# print(img) + + + diff --git a/import_mess/reorder_index.py b/import_mess/reorder_index.py new file mode 100644 index 0000000..33c9b62 --- /dev/null +++ b/import_mess/reorder_index.py @@ -0,0 +1,16 @@ +#!/bin/python3 + +# reorder Index des images +import os + +BASE = '../static/files/images/' +l = os.listdir(BASE) +print(l) + +for e in l: + if int(e) >= 1000: + os.rename(BASE + e, BASE + str(27+int(e)-1000)) + if e.zfill(5) != e: + os.rename(BASE + e, BASE + e.zfill(5)) + + diff --git a/import_mess/resize_batch.py b/import_mess/resize_batch.py new file mode 100644 index 0000000..50b3030 --- /dev/null +++ b/import_mess/resize_batch.py @@ -0,0 +1,16 @@ +#!/bin/python3 +import subprocess +import glob + +""" +check recursively every directory +for each image, create resize + +""" +for f in glob.iglob('../static/files/images/**/*.jpg', recursive=True): + parent_dir = '/'.join(f.split('/')[:-1]) + print(parent_dir) + subprocess.call(['convert', f, '-resize', '350x', parent_dir + '/' + 'thumb-250.jpg']) + + + diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..41008ca --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,11 @@ +{{ if .Title }} +
+ {{ .Text }} +
{{ .Title }}
+
+{{ else }} +
+ {{ .Text }} +
+{{ end }} + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..5cbbb14 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,28 @@ + + + + + + + {{ .Title }} + {{ with .Site.Params.description }}{{ end }} + {{ with .Site.Params.author }}{{ end }} + {{/* + {{ range .Site.Params.customCSS -}} + + {{- end }} + */}} + {{ with .OutputFormats.Get "RSS" -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} + + + {{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Fingerprint }} + + + + {{ partial "header" . }} + {{ block "main" . }}{{ end }} + {{ partial "footer" . }} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..1a1abce --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+ {{ $listtitle := .Title }} + {{ if or .Title .Content }} +
+ {{ with .Title }}

{{ . }}

{{ end }} + {{ with .Content }}
{{ . }}
{{ end }} +
+ {{ end }} + + + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..83d814c --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
Publié le
+ {{ range .Params.tags }} + {{ . }} + {{ end }} + +
+ {{ .Content }} +
+
+
+{{ partial "sidebar.html" . }} +{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..a347932 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,13 @@ +
+

{{ .Title }}

+ + {{ range .Params.tags }} + {{ . }} + {{ end }} +
+ {{ .Summary }} + {{ if .Truncated }} + Read more... + {{ end }} +
+
diff --git a/layouts/image-tags/term.html b/layouts/image-tags/term.html new file mode 100644 index 0000000..a3177d3 --- /dev/null +++ b/layouts/image-tags/term.html @@ -0,0 +1 @@ +Term page for image tag diff --git a/layouts/images/list.html b/layouts/images/list.html new file mode 100644 index 0000000..5b89967 --- /dev/null +++ b/layouts/images/list.html @@ -0,0 +1,55 @@ +{{ define "main" }} +
+ + +
+{{ end }} diff --git a/layouts/images/single.html b/layouts/images/single.html new file mode 100644 index 0000000..37a5200 --- /dev/null +++ b/layouts/images/single.html @@ -0,0 +1,51 @@ +{{ define "main" }} +
+
+ +
+

{{ .Title }}

+
+
Étiquettes associées à l'image :
+ + + + + + +
    + {{ range .Params.tags }} +
  • {{ . }}
  • + {{ end }} +
+
+
+
Nom original :
{{ .Params.original_name }}
+
+
+ {{ .Content }} +
+
+
+ {{ $image := .Resources.GetMatch "original.jpg" }} + {{ with $image }} + + {{ end }} +
+ +
+ {{ if or .Next .Prev -}} + + {{ end -}} + +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..09b3ee5 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+

Main page title

+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} + {{ range $paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..c4475df --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..a2ddbd7 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,15 @@ +
+ {{ strings.Repeat ( .Site.Title | len | add 5 ) "=" }}
+ == {{ .Site.Title }} ==
+ {{ strings.Repeat ( .Site.Title | len | add 5 ) "=" }} +
{{ .Site.Params.subtitle }}

+ +
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..902d4e3 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,19 @@ +
+
+ {{ if .Paginator.HasPrev }} + + Page précédente + + {{ end }} +
+
+ {{ .Paginator.PageNumber }} de {{ .Paginator.TotalPages }} +
+
+ {{ if .Paginator.HasNext }} + + Page suivante + + {{ end }} +
+
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..92bbd80 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,14 @@ +