Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kpym/marianne
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.2
Choose a base ref
...
head repository: kpym/marianne
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Oct 25, 2020

  1. Copy the full SHA
    44a1ebe View commit details

Commits on Oct 27, 2020

  1. Copy the full SHA
    b07c768 View commit details
  2. correction de l'aide

    kpym committed Oct 27, 2020
    Copy the full SHA
    a28a7a0 View commit details
  3. Copy the full SHA
    72e7bd2 View commit details
  4. optimisation des SVG

    kpym committed Oct 27, 2020
    Copy the full SHA
    4ee90f7 View commit details
Showing with 206 additions and 143 deletions.
  1. +5 −4 README.md
  2. +2 −0 go.mod
  3. +2 −0 go.sum
  4. +183 −119 marianne.go
  5. +14 −20 translate.go
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -36,21 +36,22 @@ Paramètres disponibles:
-o, --nom-du-logo Le nom du logo = le début des noms des fichiers générés. (par défaut "logo")
-i, --institution Le nom du ministère, ambassade... (par défaut "RÉPUBLIQUE\\FRANÇAISE")
-d, --direction Intitulé de direction, service ou délégation interministérielles.
-f, --format Le(s) format(s) parmi SVG, PDF, EPS, PNG, GIF et JPG. (par défaut [SVG])
-t, --hauteur La (ou les) hauteur(s) pour les logos en PNG, GIF et JPG. (par défaut [100,300,700])
-f, --format Le(s) format(s) parmi SVG, PDF, EPS, PNG, GIF et JPG. (par défaut SVG, ou PNG pour signature)
-t, --hauteur La (ou les) hauteur(s) pour les logos en PNG, GIF et JPG. (par défaut 700, ou 100 pour signature)
-M, --avec-marges Avec zone de protection autour du logo. Ce paramètre est compatible avec -sans-marges.
-m, --sans-marges Sans zone de protection autour du logo ('_szp' est rajouté aux noms des fichiers).
-g, --pour-signature Le logo est destiné à une signature mail.
--eol Le passage à la ligne, en plus du EOL standard. (par défaut "\\")
--qualite-jpg La qualité [1-100] des jpeg. (par défaut 100)
--seize-couleurs Enregistre les PNG et les GIF en 16 couleurs, sinon c'est en 8.
-q, --silence N'imprime rien.
-h, --aide Imprime ce message d'aide.
```

### Exemple

```shell
$ ./marianne -i "L'institution" -d "Intitulé de la\\direction" -f svg -f png -o "logo_inst"
$ ./marianne -i "L'institution" -d "Intitulé de la\\direction" -f svg -f png -t 100,300,700 -o "logo_inst"
Création du logo ...fait.

Enregistrement avec marges :
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -4,7 +4,9 @@ go 1.15

require (
github.com/markbates/pkger v0.17.1
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c
github.com/tdewolff/canvas v0.0.0-20201021153214-d9228b138ea8
github.com/tdewolff/minify/v2 v2.9.5
golang.org/x/text v0.3.3 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/markbates/pkger v0.17.1 h1:/MKEtWqtc0mZvu9OinB9UzVN9iYCwLWuyUv4Bw+PCno=
github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/paulmach/orb v0.1.6/go.mod h1:pPwxxs3zoAyosNSbNKn1jiXV2+oovRDObDKfTvRegDI=
github.com/paulmach/osm v0.1.1/go.mod h1:/UEV7XqKKTG3/46W+MtSmIl81yjV7cGoLkpol3S094I=
github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
Loading