Skip to content

Latest commit

 

History

History
62 lines (62 loc) · 1.86 KB

misc.org

File metadata and controls

62 lines (62 loc) · 1.86 KB

Epkgs: Misc

(require 'emir)
(epkg-add-org-header rows header)

up

Highest version

(let ((zero 0)
      (one  0)
      (more 0)
      (odd  0)
      (none 0)
      (all  0))
  (dolist (pkg (epkgs nil [mirrored*]))
    (cl-incf all)
    (with-epkg-repository pkg
      (if-let ((tag (magit-git-string "tag" "--sort=-v:refname")))
          (if-let ((major (ignore-errors
                            (car (version-to-list
                                  (if (string-match "\\`[^0-9]*" tag)
                                      (substring tag (match-end 0))
                                    tag))))))
              (pcase major
                (0 (cl-incf zero))
                (1 (cl-incf one))
                (_ (cl-incf more)))
            (message "%-20s %s" (oref pkg name) tag)
            (cl-incf odd))
        (cl-incf none))))
  (list (list 'zero  zero (/ (* 100 zero) all))
        (list 'one   one  (/ (* 100 one)  all))
        (list 'more  more (/ (* 100 more) all))
        'hline
        (list 'none  none (/ (* 100 none) all))
        (list 'odd   odd  (/ (* 100 odd)  all))
        'hline
        (list 'total all  (/ (* 100 all)  all))))
(6)#%
zero177025
one104714
more5547
none364751
odd300
total7048100