From 8b722a36625d3260da138281ba4522dabfb8086d Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sat, 2 Nov 2024 18:41:20 +0100 Subject: Vastly enhance documentation Mention the new availability of the package in my own package archive, and group custom variables at the top of the source file. --- README.org | 29 ++++++++++++++++++++++------- create-license.el | 40 +++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/README.org b/README.org index ce132b2..1d291e4 100644 --- a/README.org +++ b/README.org @@ -6,16 +6,31 @@ machine and allows you to quickly put them in your projects. * Usage -To interactively pull a stored license in the current directory, run -=M-x create-license=. To initialize your license storage with the default -license list, run =M-x create-license-download-common=. To customize the -installed licenses, see =create-license-common=. +First you have to initialize your license storage using =M-x +create-license-download-common=. To customize the downloaded licenses list, see +=create-license-common=. To interactively pull a license from the storage in +the current directory, run =M-x create-license=. The licenses are stored under +=create-license-directory=. * Installation -This packages in not available in any common repository yet. You have to get it -at https://tristanriehs.fr/git/create-license.git. If you use -[[https://github.com/radian-software/straight.el][straight]], you can use the following piece of configuration : +** My Package Archive + +I have my own package archive that you may use. + +#+begin_src emacs-lisp +(add-to-list 'package-archives '("tr" . "https://tristanriehs.fr/elisp-packages/")) +#+end_src + +** Manual + +Get the sources at https://tristanriehs.fr/git/create-license, and load =create-license.el=. + +#+begin_src emacs-lisp +(load "/path/to/create-license.el") +#+end_src + +** [[https://github.com/radian-software/straight.el][Straight]] #+begin_src emacs-lisp (straight-use-package 'create-license diff --git a/create-license.el b/create-license.el index 2f828c3..7e52f02 100644 --- a/create-license.el +++ b/create-license.el @@ -3,7 +3,10 @@ ;; Copyright (C) 2024 Tristan Riehs ;; Author: Tristan Riehs -;; Keywords: convenience +;; Keywords: convenience license +;; Version: 1.0.0 +;; Maintainer: Tristan Riehs +;; URL: https://tristanriehs.fr/git/create-license ;; 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 @@ -22,9 +25,13 @@ ;; This packages aims at providing a convenient way of creating license ;; files. The core command is `create-license', which you can invoke -;; interactively using M-x. +;; interactively using \\[create-license]. +;; Before using this package, you have to download the licenses listed +;; in `create-license-common' using \\[create-license-download-common]. ;; The licenses are stored in the directory `create-license-directory'. +;; When a license is copied, the new file is named according to the +;; content if `create-license-file-name'. ;;; Code: @@ -60,6 +67,20 @@ Functions in this hook are called with no arguments." :group 'create-license :type 'hook) +(defcustom create-license-common + '(("GPL3" . "https://www.gnu.org/licenses/gpl-3.0.txt") + ("GPL2" . "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt") + ("Apache2" . "https://www.apache.org/licenses/LICENSE-2.0.txt") + ("MPL2" . "https://www.mozilla.org/media/MPL/2.0/index.f75d2927d3c1.txt") + ("CC-BY" . "https://creativecommons.org/licenses/by/4.0/legalcode.txt") + ("CC-BY-SA" . "https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt") + ("FDL" . "https://www.gnu.org/licenses/fdl-1.3.txt")) + "Common known licenses. + +Each member of this list is of the form (NAME . URL)." + :group 'create-license + :type '(list (cons string string))) + (defvar create-license--hist nil "History for `create-license'.") @@ -87,21 +108,6 @@ The destination file name under DIR is given by `create-license-download-common'" create-license-directory))) -(defcustom create-license-common - '(("GPL3" . "https://www.gnu.org/licenses/gpl-3.0.txt") - ("GPL2" . "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt") - ("Apache2" . "https://www.apache.org/licenses/LICENSE-2.0.txt") - ("MPL2" . "https://www.mozilla.org/media/MPL/2.0/index.f75d2927d3c1.txt") - ("CC-BY" . "https://creativecommons.org/licenses/by/4.0/legalcode.txt") - ("CC-BY-SA" . - "https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt") - ("FDL" . "https://www.gnu.org/licenses/fdl-1.3.txt")) - "Common known licenses. - -Each member of this list is of the form (NAME . URL)." - :group 'create-license - :type '(list (cons string string))) - ;;;###autoload (defun create-license-download-common () "Download licenses listed in `create-license-common'." -- cgit v1.2.3