Skip to content

Commit

Permalink
WIP formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Hafsaoui committed Nov 24, 2024
1 parent a2008bb commit 3efe9bd
Show file tree
Hide file tree
Showing 16 changed files with 1,105 additions and 1,024 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ build:
lint:
golangci-lint run ./...

fmt:
gofmt -s -w .

tidy:
go mod tidy

Expand Down
59 changes: 29 additions & 30 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
package cmd

import (
"os"
"github.com/spf13/cobra"
"anemon/internal/adapters/input"
"github.com/spf13/cobra"
"os"
)

var rootCmd = &cobra.Command{
Use: "anemon",
Short: "A CV generator",
Long: `This CLI tool, automates the generation of customized CVs from Markdown files based on a specified configuration.`,
RunE: func(cmd *cobra.Command, args []string) error {
threshold, err := cmd.Flags().GetInt("threshold")
if err != nil {
return err
}
input.ChangeOverflowThreshold(threshold)
Use: "anemon",
Short: "A CV generator",
Long: `This CLI tool, automates the generation of customized CVs from Markdown files based on a specified configuration.`,
RunE: func(cmd *cobra.Command, args []string) error {
threshold, err := cmd.Flags().GetInt("threshold")
if err != nil {
return err
}
input.ChangeOverflowThreshold(threshold)

generate, err := cmd.Flags().GetBool("generate")
if err != nil {
return err
}
if generate {
root, err := os.Getwd()
if err != nil {
return err
}
return input.GenerateCVFromMarkDownToLatex(root)
}
generate, err := cmd.Flags().GetBool("generate")
if err != nil {
return err
}
if generate {
root, err := os.Getwd()
if err != nil {
return err
}
return input.GenerateCVFromMarkDownToLatex(root)
}

return nil
},
return nil
},
}

func Execute() {
rootCmd.Flags().IntP("threshold", "t", 1, "Set the page overflow threshold (default 1)")
rootCmd.Flags().BoolP("generate", "g", false, "Generate a CV")
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
rootCmd.Flags().IntP("threshold", "t", 1, "Set the page overflow threshold (default 1)")
rootCmd.Flags().BoolP("generate", "g", false, "Generate a CV")
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}

21 changes: 21 additions & 0 deletions cv/eng/professional.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,24 @@
- Set up a deployment pipeline, automating and improving the efficiency of software updates.
- Optimized system performance, significantly reducing response times and improving user experience.

# Gigerrish
## June 2023 -- September 2023
### DevSolutions
#### Internship
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4 changes: 1 addition & 3 deletions cv/eng/project.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Project A
# Project A
## Language A, Framework A, Database A, Version Control A
### [Link to Repository](https://github.com/ExampleUser/projectA)
- Developed using Language A and Framework A, with Database A for data management.
Expand All @@ -11,5 +11,3 @@
- Separated front-end and back-end using Containerization Tool B, with orchestration handled by Container Orchestration B.
- Ensured secure communication between components via a RESTful API with API Security B tokens.
- Collaborated within a team using agile methodologies, specifically SCRUM, and applied DevOps practices for streamlined development.


28 changes: 14 additions & 14 deletions internal/adapters/input/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import (
"anemon/internal/core"
)

//Use the implementation for markdown and latex to generate latex CV from a tree dir of mardown document
func GenerateCVFromMarkDownToLatex(root string)error{
var builder core.BuilderService = core.BuilderService{}
builder.SetRoot(root)
builder.SetSource(&MarkdownSource{})
builder.SetParamsSource(&YamlSource{})
builder.SetTemplateReader(&output.LatexReader{})
builder.SetTemplateProcessor(&output.LatexProccesor{})
builder.SetCompiler(&output.LatexCompiler{})
service := builder.GetService()
return service.GenerateTemplates()
// Use the implementation for markdown and latex to generate latex CV from a tree dir of mardown document
func GenerateCVFromMarkDownToLatex(root string) error {
var builder core.BuilderService = core.BuilderService{}
builder.SetRoot(root)
builder.SetSource(&MarkdownSource{})
builder.SetParamsSource(&YamlSource{})
builder.SetTemplateReader(&output.LatexReader{})
builder.SetTemplateProcessor(&output.LatexProccesor{})
builder.SetCompiler(&output.LatexCompiler{})
service := builder.GetService()
return service.GenerateTemplates()
}

//Change the threshold for the regeration of the PDF
func ChangeOverflowThreshold(newThreshold int){
core.SetOverflowThreshold(newThreshold)
// Change the threshold for the regeration of the PDF
func ChangeOverflowThreshold(newThreshold int) {
core.SetOverflowThreshold(newThreshold)
}
Loading

0 comments on commit 3efe9bd

Please sign in to comment.