File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 2727(def awesome-releases (atom ()))
2828
2929(def urls {:hosts " https://data.code.gouv.fr/api/v1/hosts"
30+ :sill " https://code.gouv.fr/sill/api/sill.json"
3031 :annuaire_sup " https://code.gouv.fr/data/annuaire_sup.json"
3132 :annuaire_tops " https://code.gouv.fr/data/annuaire_tops.json"
3233 :comptes-organismes-publics " https://code.gouv.fr/data/comptes-organismes-publics.yml"
210211 json/generate-string
211212 (spit " owners.json" )))
212213
214+ (defn output-latest-sill-xml []
215+ (->> (fetch-json (:sill urls))
216+ (sort-by #(java.util.Date. (:referencedSinceTime %)))
217+ reverse
218+ (take 10 )
219+ (map #(let [link (str " https://code.gouv.fr/sill/detail?name=" (:name %))]
220+ {:title (str " Nouveau logiciel au SILL : " (:name %))
221+ :link link
222+ :guid link
223+ :description (:function %)
224+ :pubDate (.toInstant (java.util.Date. (:referencedSinceTime %)))}))
225+ (rss/channel-xml
226+ {:title " code.gouv.fr - Nouveaux logiciels libres au SILL - New SILL entries"
227+ :link " https://code.gouv.fr/data/latest-sill.xml"
228+ :description " code.gouv.fr - Nouveaux logiciels libres au SILL - New SILL entries" })
229+ (spit " latest-sill.xml" )))
230+
213231(defn output-latest-owners-xml []
214232 (->> @owners
215233 (filter #(:created_at (val %)))
393411 (set-awesome-releases! )
394412 (update-awesome! ))
395413 (output-owners-json )
396- (when-not only-owners
414+ (when-not only-owners
415+ (output-latest-sill-xml )
397416 (output-latest-owners-xml )
398417 (output-repositories-json )
399418 (output-latest-repositories-xml )
You can’t perform that action at this time.
0 commit comments