|
455 | 455 | (map #(str (get (val %) "releases_url") "?per_page=3")) |
456 | 456 | (filter #(re-matches #"^https://.*" %)) |
457 | 457 | get-urls-json |
458 | | - (map #(select-keys % [:url :html_url :tag_name :body :published_at])) |
| 458 | + (map #(select-keys % [:url :uuid :name :html_url :tag_name :body :published_at])) |
| 459 | + (map #(assoc % :repo_name |
| 460 | + (last (re-matches #"https://[^/]+/([^/]+/[^/]+).*" (:html_url %))))) |
459 | 461 | (map #(update-in % [:body] (fn [s] (shorten-string s)))))] |
460 | 462 | (doseq [[k v] @awesome] |
461 | 463 | (let [rels (filter #(str/includes? (str/lower-case (:html_url %)) k) data)] |
|
509 | 511 | :description "code.gouv.fr - Nouveaux logiciels libres au SILL - New SILL entries"}) |
510 | 512 | (spit "latest-sill.xml"))) |
511 | 513 |
|
512 | | -;; (defn output-latest-owners-xml [] |
513 | | -;; (->> @owners |
514 | | -;; (filter #(:created_at (val %))) |
515 | | -;; (sort-by #(clojure.instant/read-instant-date (:created_at (val %)))) |
516 | | -;; reverse |
517 | | -;; (take 10) |
518 | | -;; (map (fn [[o o-data]] |
519 | | -;; {:title (str "Nouveau compte dans code.gouv.fr : " (:name o-data)) |
520 | | -;; :link (:html_url o-data) |
521 | | -;; :guid o |
522 | | -;; :description (:description o-data) |
523 | | -;; :pubDate (toInst (:created_at o-data))})) |
524 | | -;; (rss/channel-xml |
525 | | -;; {:title "code.gouv.fr/sources - Nouveaux comptes d'organisation" |
526 | | -;; :link "https://code.gouv.fr/data/latest-repositories.xml" |
527 | | -;; :description "code.gouv.fr/sources - Nouveaux comptes d'organisation"}) |
528 | | -;; (spit "latest-owners.xml"))) |
529 | | - |
530 | | -;; FIXME |
531 | 514 | (defn output-latest-releases-xml [] |
532 | | - (->> @awesome-releases |
| 515 | + (->> @awesome |
| 516 | + vals |
| 517 | + (map #(get % "releases")) |
| 518 | + flatten |
533 | 519 | (sort-by #(clojure.instant/read-instant-date (:published_at %))) |
534 | 520 | reverse |
535 | 521 | (take 10) |
|
696 | 682 | (output-owners-csv) |
697 | 683 | (output-annuaire-sup) |
698 | 684 | (output-latest-sill-xml) |
699 | | - ;; (output-latest-owners-xml) |
700 | 685 | (output-repositories-json) |
701 | 686 | (output-repositories-json :full) |
702 | 687 | (output-repositories-csv) |
|
0 commit comments