Skip to content

Commit

Permalink
feat: extract markdown_struct to it's own libs
Browse files Browse the repository at this point in the history
  • Loading branch information
batleforc committed Aug 4, 2024
1 parent 7e4900f commit 6209556
Show file tree
Hide file tree
Showing 17 changed files with 223 additions and 20 deletions.
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

[workspace]
resolver = '2'
members = ['apps/back', 'libs/markdown_header', 'libs/tool_tracing']
members = [
'apps/back',
'libs/markdown_header',
'libs/tool_tracing',
'libs/markdown_struct',
]

[profile.release]
lto = true

[patch.crates-io]
tokio-macros = { git = "https://github.com/tokio-rs/tokio", branch = "master" }
tokio-macros = { git = 'https://github.com/tokio-rs/tokio', branch = 'master' }
13 changes: 7 additions & 6 deletions apps/back/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ default-run = "server"


[dependencies]
chrono = { version = "0.4.38", features = ["serde"] }
chrono-tz = { version = "0.9.0", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
markdown_header = { path = "../../libs/markdown_header" }
serde = "1.0.204"
serde_json = "1.0.120"
serde_yaml = "0.9.34"
url = "2.5.2"
markdown_struct = { path = "../../libs/markdown_struct" }
tool_tracing = { path = "../../libs/tool_tracing" }
serde = "1.0"
serde_json = "1.0"
serde_yaml = "0.9"
tokio = "1.39"

# Code that handle the CLI
[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion apps/back/src/bin/sandbox.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use back::markdown::{folder_struct::process_folder_struct, page_database::DbFolder};
use markdown_struct::{folder_struct::process_folder_struct, page_database::DbFolder};
extern crate back;

pub fn main() {
Expand Down
35 changes: 35 additions & 0 deletions apps/back/src/homeprofil/home.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct HomeContent {
pub name: String,
pub presentation: String,
pub cover_title: Vec<String>,
pub cv_url: String,
pub url: Vec<HomeUrl>,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct HomeUrl {
pub url: String,
pub name: String,
pub primaire: bool,
pub img_url: String,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct HomeHistory {
pub title: String,
pub lieux: String,
pub date: String,
pub weight: i32,
pub img_url: String,
pub description: String,
pub url: Option<Vec<HomeHistoryUrl>>,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct HomeHistoryUrl {
pub url: String,
pub name: String,
}
3 changes: 3 additions & 0 deletions apps/back/src/homeprofil/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod home;

pub use home::*;
2 changes: 1 addition & 1 deletion apps/back/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub mod markdown;
pub mod homeprofil;
109 changes: 109 additions & 0 deletions content/home.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Maxime Leriche
presentation: |
Hello, Moi c'est Maxime, je suis un développeur passionné autant par les nouvelles technologies qu'un nouveau projet.
J'aime apprendre en permanence et construire ce que j'estime étre ma base de connaissance.
Et vous êtes ici sur mon site qui est un savant mélange de mes passions et de mes projets.
Alors, bienvenue et bonne visite !
coverTitle:
- Développeur
- Passionné
- Ops
- Back
- Front
- Kube and Co
- Architecture
- Too much coffee
- And lot's more
cvUrl: /media/cv.pdf
url:
- name: LinkedIn
url: https://www.linkedin.com/in/maxime-leriche/
primaire: true
imgUrl: /media/linkedin.png
- name: GitHub
url: https://github.com/batleforc
primaire: true
imgUrl: /media/github.png
- name: Git Weebo
url: https://git.weebo.fr/batleforc
primaire: true
imgUrl: /media/gitea.png
history:
- title: Bac STI2D
lieux: Lycée Marie Curie, Nogent sur Oise
date: 2015 - 2018
weight: 1
imgUrl: /media/lycee_marie_curie.jpg
description: |
Bac STI2D option ITEC (Innovation Technologique et Eco-Conception)
Obtenu avec mention Bien
Découverte de la la conception de piéce en 3D et de l'annalyse des contraintes mécaniques
Base importante pour ma passion pour l'impression 3D et la conception de piéce
- title: DUT INFO
lieux: IUT Amiens, Amiens
date: 2018 - 2020
weight: 2
imgUrl: /media/iut_amiens.jpg
description: |
DUT Informatique
Découverte de la programmation et des bases nécessaires pour devenir développeur (Java, C, SQL, C#, JS, Python, PHP, etc)
- title: Codeur
lieux: Museomix, Amiens
date: 2019
weight: 3
imgUrl: /media/museomix.jpg
url:
- name: Objectif CIAP
url: https://www.youtube.com/watch?v=fZ8DYxclVvQ
- name: Mix Ta brique
url: https://www.instagram.com/mixtabrique/?hl=en
description: |
Museomix est un événement qui a pour but de réinventer l'interaction entre les visiteurs et les musées.
J'ai participé à l'édition 2019 à Amiens et j'ai pu travailler en tant que codeur sur le projet Mix Ta Brique.
Ce fut une expérience enrichissante qui m'a permis de découvrir le travail dans une équipe d'horizons différents et de travailler sur un projet concret.
- title: LP Dev Cloud
lieux: IUT La Rochelle, Niort
date: 2020 - 2021
weight: 4
imgUrl: /media/iut_la_rochelle.jpg
description: |
Licence Professionnelle Développement Cloud et Mobile
Découverte des technologies du cloud et de la mobilité
Apprentissage des bases de l'administration système (Docker) et de la programmation (React, Redux, NodeJS, Ruby, etc)
- title: Alternant dev natif et PWA
lieux: Nexi Conseils, Aigrefeuille d'Aunis
date: 2020 - 2021
weight: 5
imgUrl: /media/nexi_conseils.jpg
description: |
Alternance en tant que développeur natif et PWA
Découverte du développement mobile natif (Android et iOS) et des PWA
Participation au projet PIROUETTE (application de gestion de centre de loisirs)
- title: Master Architecte Logiciel
lieux: Université de La Rochelle, Niort
date: 2021 - 2023
weight: 6
imgUrl: /media/universite_la_rochelle.jpg
description: |
Master Architecte Logiciel
Découverte de l'architectures logicielles et des bonnes pratiques de développement ainsi que des concepte de recherche universitaire
Approfondissement des connaissances en développement, en recherche et en administration système
- title: Alternant DevOps/Couche d'échange
lieux: Macif, Niort
date: 2021 - 2023
weight: 7
imgUrl: /media/macif.jpg
description: |
Alternance en tant que DevOps et développeur couche d'échange
Mise en situation réelle des concepts appris en cours et découverte de concepts plus avancés
Découverte de développement incluant des couche d'asyncronisme et de la gestion de flux de données via Kafka
Application des concepts de DevOps et de CI/CD appris sur des projets personnels dans des cas réel
- title: CDI Ingénieur Couche d'échange / Socle de fabrication
lieux: Macif, Niort
date: 2023 - Now
weight: 8
imgUrl: /media/macif.jpg
description: |
A la suite de mon alternance, la Macif et plus précisément mon manager m'a fait confiance en me proposant de continuer l'aventure avec eux.
J'ai donc accepté et je suis maintenant Ingénieur participant a l'évolution de la couche d'échange (principalement) et du socle de fabrication.
Mes taches sont variées et voué a être transverses entre la couche d'échange et le socle de fabrication.
14 changes: 7 additions & 7 deletions libs/markdown_header/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version = "0.1.0"
edition = "2021"

[dependencies]
enum-iterator = "2.1.0"
getset = "0.1.2"
quick-error = "2.0.1"
regex = "1.10.5"
enum-iterator = "2.1"
getset = "0.1"
quick-error = "2.0"
regex = "1.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0.120"
serde_yaml = "0.9.34"
toml = "0.8.16"
serde_json = "1.0"
serde_yaml = "0.9"
toml = "0.8"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
13 changes: 13 additions & 0 deletions libs/markdown_struct/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "markdown_struct"
version = "0.1.0"
edition = "2021"

[dependencies]
serde = "1.0"
chrono = { version = "0.4", features = ["serde"] }
serde_json = "1.0"
serde_yaml = "0.9"
markdown_header = { path = "../markdown_header" }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
37 changes: 37 additions & 0 deletions libs/markdown_struct/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "markdown_struct",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/markdown_struct/src",
"targets": {
"build": {
"executor": "@monodon/rust:check",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/markdown_struct"
}
},
"test": {
"cache": true,
"executor": "@monodon/rust:test",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/markdown_struct"
},
"configurations": {
"production": {
"release": true
}
}
},
"lint": {
"cache": true,
"executor": "@monodon/rust:lint",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/markdown_struct"
}
}
},
"tags": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl BlogTimeline {
#[cfg(test)]
mod tests {
use super::*;
use crate::markdown::{content_struct::Page, doc_header::DocHeader};
use crate::{content_struct::Page, doc_header::DocHeader};
use chrono::DateTime;

pub fn get_test_doc_header() -> DocHeader {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl DocCategory {
mod tests {

use super::*;
use crate::markdown::{content_struct::Page, doc_header::DocHeader};
use crate::{content_struct::Page, doc_header::DocHeader};
use chrono::DateTime;

pub fn get_test_doc_header() -> DocHeader {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl DbFolder {

#[cfg(test)]
mod tests {
use crate::markdown::{doc_header::DocHeader, folder_struct::File};
use crate::{doc_header::DocHeader, folder_struct::File};

use super::*;
use chrono::DateTime;
Expand Down

0 comments on commit 6209556

Please sign in to comment.