Skip to content

Commit 09a3114

Browse files
author
Bastien Guerry
committed
src/codegouvfr-output-data.clj: Enhance awesome-codegouvfr.md output
1 parent 183924b commit 09a3114

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/codegouvfr-output-data.clj

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,28 @@
443443
json/generate-string
444444
(spit "awesome.json")))
445445

446+
(defonce awesome-codegouvfr-md-format-string
447+
"# Awesome code.gouv.fr
448+
449+
A list of [awesome code.gouv.fr projects](https://code.gouv.fr/fr/awesome) funded by French public organizations.
450+
451+
%s
452+
453+
# License
454+
455+
DINUM, Bastien Guerry.
456+
457+
This list is published under Licence Ouverte 2.0 and CC BY.")
458+
446459
(defn- output-awesome-md []
447460
(->> (for [[_ {:strs [name url description ]}]
448461
(sort-by #(get (second %) "name") @awesome)]
449462
(let [desc (or (not-empty (get-in description ["fr" "shortDescription"]))
450463
(not-empty (get-in description ["en" "shortDescription"]))
451464
"N/A")]
452-
(format "- [%s](%s) - %s" name url desc)))
465+
(format "- [%s](%s) - %s" name url (str/trim desc))))
453466
(str/join "\n")
467+
(format awesome-codegouvfr-md-format-string)
454468
(spit "awesome-codegouvfr.md")))
455469

456470
(defn- output-owners-json [& [full?]]

0 commit comments

Comments
 (0)