Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Hafsaoui committed Sep 7, 2024
1 parent b95a330 commit 917dd59
Show file tree
Hide file tree
Showing 19 changed files with 251 additions and 93 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Binaries for programs and plugins
anemon
*.exe
*.exe~
*.dll
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
run:
echo "Not yet complete"

build:
go build

lint:
golangci-lint run ./...

Expand Down
3 changes: 1 addition & 2 deletions assets/latex/template/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ \section{Projects}
%-----------PROGRAMMING SKILLS-----------
\section{Technical Skills}
\begin{itemize}[leftmargin=0.15in, label={}]
\small{\item{
}}
%SKILL_SECTIONS%
\end{itemize}

%-------------------------------------------
Expand Down
53 changes: 53 additions & 0 deletions cmd/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package cmd

import (
"anemon/internal/parser"
"anemon/internal/walker"
"errors"
"os"
"github.com/spf13/cobra"
)

var generateCmd = &cobra.Command{
Use: "generate",
Short: "Generate a CV",
Long: `Generate a CV using the CV at the current work directory`,
RunE: func(cmd *cobra.Command, args []string) error{
dir, err := os.Getwd()
if err != nil{
return err
}
cv_path := dir+"/cv"
_, err = os.Stat(cv_path)
if err != nil{
if os.IsNotExist(err) { return errors.New("No `cv` directory found at:"+cv_path) }
return err
}
result, err := walker.WalkCV(cv_path)
if err != nil{
return err
}
for lang := range result{
err := parser.Init_output(lang+"-CV",dir)
if err != nil{
return err
}
for sec_name := range result[lang]{
sec, err := parser.Parse(result[lang][sec_name])
if err != nil {
return err
}
_,err = parser.ApplyToSection(sec,sec_name,dir+"/assets/latex/output/"+lang+"-CV.tex")
if err != nil {
return err
}
//apply section to output file
}
}
return nil
},
}

func init() {
rootCmd.AddCommand(generateCmd)
}
19 changes: 19 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"os"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "anemon",
Short: "a CV genrator",
Long: `This CLI tool, written in Go, automates the generation of customized CVs from Markdown files based on a specified configuration. It parses CV sections in
multiple languages, prioritizes key skills or features as defined in an output.yml file, and outputs LaTeX files for each CV version, ready for compilation.`,
}

func Execute() {
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}
20 changes: 20 additions & 0 deletions cv/eng/Professional.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Back-End Intern
## February 2024 -- August 2024
### Qonto
#### End of studies internship

- Contributed within a Cross Functional Team (CFT) to the standardization and extension of the onboarding process for four new markets (Austria, Netherlands, Belgium, Portugal). From design to implementation, in coordination with stakeholders (Risk, AML, Product), to ensure a smooth and compliant integration, with deployment scheduled for August.
- Led the extraction of back-office logic from a Ruby monolith into a microservice, deploying in a trunk-based development environment. Collaborated closely with the Ops teams throughout the process. Monitored production using Grafana, Sentry, ArgoCD, and Kibana to ensure quality and reliability, enhancing system maintainability by decoupling microservices.
- Improved the reliability and observability of microservices by completing the tracing mechanisms and implementing Service Level Objectives (SLOs).

# Full Stack Developer
## June 2023 -- September 2023
### Coexel
#### Internship then Fixed-Term Contract

- Designed and developed a Python service for Named Entity Recognition (NER) using spaCy to efficiently identify named entities in 92M+ documents. Utilization of Elasticsearch for storage and optimized document search, enabling users to gain further insights into monitored themes.
- Rewrote an old website monitoring system created in Java to Python, enhancing maintainability and system performance.
- Implemented a RESTful API in Python using FastAPI, providing increased flexibility and scalability for data management and requests.
- Created a deployment pipeline with Docker and Github Actions, streamlining the deployment process and enabling faster and more robust updates.
- Significantly improved performance by reducing the number of GET requests from 5 to 1, resulting in an 85% faster display

12 changes: 8 additions & 4 deletions cv/eng/education.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
- [Master's in Computer Science, Software and Data Engineering](https://www.univ-tln.fr/Master-Informatique-parcours-Developpement-et-Ingenierie-des-Donnees.html)
- University of Toulon, 2024
# Master's in Computer Science, Software and Data Engineering
## https://www.univ-tln.fr/Master-Informatique-parcours-Developpement-et-Ingenierie-des-Donnees.html
### University of Toulon
#### 2024

- [Bachelor's in Computer Science](https://www.univ-tln.fr/Licence-Informatique-parcours-Informatique.html)
- University of Toulon, 2022
# Bachelor's in Computer Science
## https://www.univ-tln.fr/Licence-Informatique-parcours-Informatique.html
### University of Toulon
#### 2024
13 changes: 6 additions & 7 deletions cv/eng/project.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
**Agenda**
*Java, JavaFX, PostgreSQL, Github [GitHub Repository](https://github.com/MasterDID2022/sopra-project-LHD)*

# Agenda
## Java, JavaFX, PostgreSQL, Github
### https://github.com/MasterDID2022/sopra-project-LHD
- Developed in Java and JavaFX, using PostgreSQL for database management.
- Project executed in an agile environment, emphasizing GitHub Flow, Pull Requests, Kanban, and Continuous Integration for effective collaboration.


**Epigraphy Tools**
*Java, Hibernate, Docker, REST, JWT [GitHub Repository](https://github.com/MasterDID2022/epicTool)*

# Epigraphy Tools
## Java, Hibernate, Docker, REST, JWT
### https://github.com/MasterDID2022/epicTool
- Designed and developed an epigraphy annotation tool for deep learning using Java, Docker, REST, and JWT.
- Separated the front-end and back-end using Docker with container orchestration via Docker-Compose.
- Established secure communication between the front-end and back-end through a RESTful API with JWT tokens.
- Worked as a team in an agile context, utilizing the SCRUM method and applying DevOps practices for efficient and collaborative development.

20 changes: 0 additions & 20 deletions cv/eng/work.md

This file was deleted.

File renamed without changes.
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ module anemon

go 1.22.0

require github.com/google/go-cmp v0.6.0 // indirect
require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/text v0.18.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
51 changes: 39 additions & 12 deletions internal/parser/latex.go
Original file line number Diff line number Diff line change
@@ -1,51 +1,78 @@
package parser

import (
"errors"
"fmt"
"os"
"strings"
)

type SectionName string


//Read the template file in the assets directory
func read_template()(string,error) {
file, err := os.ReadFile("../../assets/latex/template/template.tex")
func read_template(path string)(string,error) {
file, err := os.ReadFile(path+"/assets/latex/template/template.tex")
if err != nil {
return "", err
}
return string(file), nil
}

//Write the template file in the assets directory
func writeTemplate(template string, name string)error{
err := os.WriteFile("../../assets/latex/output/"+name+".tex",
func writeTemplate(path string, template string, name string)error{
err := os.WriteFile(path+"/assets/latex/output/"+name,
[]byte(template), 0644)
return err
}

//Create a new empty template in the output dir
func Init_output(name string, root_path string)error{
template,err := read_template(root_path)
if err != nil {
return err
}
err = writeTemplate(root_path, template, name+".tex")
return err
}

//Apply a section to a section type on a latex template
func applyToSection(section Section, section_type string)(string,error){
func ApplyToSection(section Section, section_type string, output_path string)(string,error){
replacements := []string{section.first, section.second, section.third, section.fourth}
template := ""
b_template, err := os.ReadFile(output_path)
//nolint:all
section_type = strings.Title(section_type)
if err != nil {
return "", err
}
template := string(b_template)
switch{

case section_type == "Professional":
template = replace_param(prof_template,NB_P_PROF,replacements)
println("+--------"+section_type+"----------------+")
template = strings.Replace(template,"%EXPERIENCE_SECTIONS%", replace_param(prof_template,NB_P_PROF,replacements),1)
template = replace_items(template, section.description)

case section_type == "Project":
template = replace_param(proj_template,NB_P_PROJ,replacements)
template = strings.Replace(template,"%PROJECTS_SECTIONS%", replace_param(proj_template,NB_P_PROJ,replacements),1)
template = replace_items(template, section.description)

case section_type == "Education":
template = replace_param(edu_template,NB_P_EDU,replacements)
template = strings.Replace(template,"%EDUCATION_SECTIONS%", replace_param(edu_template,NB_P_EDU,replacements),1)

case section_type == "Skill"://TODO https://github.com/Theo-Hafsaoui/Anemon/issues/1
template = replace_param(sk_template,NB_P_SK,replacements)
template = strings.Replace(template,"%SKILL_SECTIONS%", replace_param(sk_template,NB_P_SK,replacements),1)
default:
return "",errors.New("Don't know type "+section_type)
}
path_name := strings.Split(output_path, "/assets/latex/output/")
if len(path_name) == 1 {
return template,errors.New("Trying to save outside of output file, at "+output_path)
}
return template,nil
println("=====")
fmt.Println(path_name)
println("=====")
err = writeTemplate(path_name[0],template,path_name[1])
return template,err
}

//Search and replace the number in range of `nb_params` by their replacement
Expand Down
Loading

0 comments on commit 917dd59

Please sign in to comment.