[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 3b5fe95 029/439: * admin/archive-contents.el: New fi
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 3b5fe95 029/439: * admin/archive-contents.el: New file. |
Date: |
Sun, 17 Oct 2021 15:47:28 -0400 (EDT) |
branch: elpa-admin
commit 3b5fe95c8c710df6e31f0bdb8a3200c7d55ad29d
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* admin/archive-contents.el: New file.
* packages/rainbow-mode-readme.txt:
* packages/js2-mode-readme.txt: Auto-update from the commentary.
* packages/js2-mode-20090814.el: Capitalize the description.
* packages/debbugs-0.1/debbugs.el: Require cl since it uses `case'.
(debbugs-get-bugs): Fix up typo.
* packages/company-0.5/company-gtags.el
(company-gtags-gnu-global-program-name): Pass the "when" argument.
* packages/auctex-11.86/auctex-pkg.el: Capitalize the description.
* packages/archive-contents: Almost auto-regenerate.
---
admin/archive-contents.el | 102 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
new file mode 100644
index 0000000..75c75e7
--- /dev/null
+++ b/admin/archive-contents.el
@@ -0,0 +1,102 @@
+;;; archive-contents.el --- Auto-generate the `archive-contents' file -*-
lexical-binding: t -*-
+
+;; Copyright (C) 2011 Free Software Foundation, Inc
+
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'lisp-mnt)
+
+(defun batch-make-archive-contents ()
+ (let ((packages '(1))) ;I think this is the format-version.
+ (dolist (file (directory-files default-directory))
+ (pcase file
+ ((or `"." `".." `"elpa.rss" `"archive-contents") nil)
+ ((pred file-directory-p)
+ (if (not (string-match "-[0-9.]+\\'" file))
+ (message "Unknown package directory name format %s" file)
+ (let* ((pkg (substring file 0 (match-beginning 0)))
+ (vers (substring file (1+ (match-beginning 0))))
+ (exp
+ (with-temp-buffer
+ (insert-file-contents
+ (expand-file-name (concat pkg "-pkg.el") file))
+ (goto-char (point-min))
+ (read (current-buffer)))))
+ (copy-file (expand-file-name "README" file)
+ (concat pkg "-readme.txt")
+ 'ok-if-already-exists)
+ (unless (equal (nth 1 exp) pkg)
+ (message "Package name %s doesn't match file name %s"
+ (nth 1 exp) file))
+ (unless (equal (nth 2 exp) vers)
+ (message "Package version %s doesn't match file name %s"
+ (nth 2 exp) file))
+ (push (cons (intern pkg)
+ (vector (version-to-list vers)
+ nil ;??
+ (nth 3 exp)
+ 'tar))
+ packages))))
+ ((pred (string-match "\\.el\\'"))
+ (if (not (string-match "-\\([0-9.]+\\)\\.el\\'" file))
+ (message "Unknown package file name format %s" file)
+ (let* ((pkg (substring file 0 (match-beginning 0)))
+ (vers (match-string 1 file))
+ (desc
+ (with-temp-buffer
+ (insert-file-contents file)
+ (goto-char (point-min))
+ (if (not (looking-at ";;;.*---[
\t]*\\(.*\\)\\(-\\*-.*-\\*-[ \t]*\\)?$"))
+ (message "Incorrectly formatted header in %s" file)
+ (prog1 (match-string 1)
+ (let ((commentary (lm-commentary)))
+ (with-current-buffer (find-file-noselect
+ (concat pkg "-readme.txt"))
+ (erase-buffer)
+ (emacs-lisp-mode)
+ (insert commentary)
+ (goto-char (point-min))
+ (while (looking-at ";*[ \t]*\\(commentary[:
\t]*\\)?\n")
+ (delete-region (match-beginning 0)
+ (match-end 0)))
+ (uncomment-region (point-min) (point-max))
+ (goto-char (point-max))
+ (while (progn (forward-line -1)
+ (looking-at "[ \t]*\n"))
+ (delete-region (match-beginning 0)
+ (match-end 0)))
+ (save-buffer))))))))
+ (push (cons (intern pkg)
+ (vector (version-to-list vers)
+ nil ;??
+ desc
+ 'single))
+ packages))))
+ ((pred (string-match "\\.elc\\'")) nil)
+ ((pred (string-match "-readme\\.txt\\'")) nil)
+ (t
+ (message "Unknown file %s" file))))
+ (with-current-buffer (find-file-noselect "archive-contents")
+ (erase-buffer)
+ (pp (nreverse packages) (current-buffer))
+ (save-buffer))))
+
+(provide 'archive-contents)
+;;; archive-contents.el ends here
- [nongnu] elpa-admin cff4ab8 045/439: Add a note for programmers about wcheck-marked-text-at, (continued)
- [nongnu] elpa-admin cff4ab8 045/439: Add a note for programmers about wcheck-marked-text-at, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1d4d089 094/439: Mark merge point of ack-el., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 170624f 106/439: Avoid lm-homepage which is not in Emacs-24.3, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e6d646f 117/439: tutorials, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a73fa6a 113/439: update link in README, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 674b934 123/439: mention `make check' in README, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5f38238 131/439: Merge branch 'master' of https://github.com/leoliu/easy-kill, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f645cb0 148/439: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 102fabb 013/439: Start the Grand Unified Debugger Rewrite., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 03e28d1 028/439: README: Document usage of this repository in detail., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 3b5fe95 029/439: * admin/archive-contents.el: New file.,
Philip Kaludercic <=
- [nongnu] elpa-admin b25e1bf 039/439: Rephrase documentation and comments, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5fefd44 048/439: Update archive-contents to add package versions from contents., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e148a06 052/439: Put quotes `...' around the example function add-word-to-dictionary, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 45792fe 051/439: Remove version numbers from filenames in packages/ dir., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5319f2f 062/439: * archive-contents.el: Make `site' more incrementally., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin becd7be 063/439: * archive-contents.el (archive--make-changelog): New fun., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 6c94727 068/439: archive-contents.el (archive--simple-package-p): Fix prop-line matching., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin dc8ca2b 072/439: Note availability of Melpa packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 518362a 073/439: Merge pull request #13 from dgutov/master, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 50b05c8 074/439: Add SML-mode., Philip Kaludercic, 2021/10/17