summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-16 22:15:27 +0000
committerKarl Berry <karl@freefriends.org>2017-11-16 22:15:27 +0000
commit26bbe6fbf6f01b0ad3162a5d7c2cc0a6fbaafc13 (patch)
tree062a4755a4137f13acd90b525b6cc5415f2e328a /Master/texmf-dist/doc
parentbdb7ac9c2d3d7ef690d7499162aa15f0b8e51d21 (diff)
ctan-o-mat (16nov17)
git-svn-id: svn://tug.org/texlive/trunk@45834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/man/man1/ctan-o-mat.158
-rw-r--r--Master/texmf-dist/doc/man/man1/ctan-o-mat.man1.pdfbin18850 -> 21363 bytes
-rw-r--r--Master/texmf-dist/doc/support/ctan-o-mat/README.md113
-rwxr-xr-xMaster/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat2
-rw-r--r--Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat.pkg35
-rwxr-xr-xMaster/texmf-dist/doc/support/ctan-o-mat/lib/md2ltx.pl27
-rw-r--r--Master/texmf-dist/doc/support/ctan-o-mat/makefile34
7 files changed, 184 insertions, 85 deletions
diff --git a/Master/texmf-dist/doc/man/man1/ctan-o-mat.1 b/Master/texmf-dist/doc/man/man1/ctan-o-mat.1
index db9f74aa7a6..30dff2d7c45 100644
--- a/Master/texmf-dist/doc/man/man1/ctan-o-mat.1
+++ b/Master/texmf-dist/doc/man/man1/ctan-o-mat.1
@@ -129,22 +129,23 @@
.\" ========================================================================
.\"
.IX Title "CTAN-O-MAT 1"
-.TH CTAN-O-MAT 1 "2017-10-20" "ctan-o-mat" "Gerd Neugebauer"
+.TH CTAN-O-MAT 1 "2017-11-16" "ctan-o-mat" "Gerd Neugebauer"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
-ctan\-o\-mat \- Upload or validate a package for CTAN
+ctan\-o\-mat \- Validate and upload a package for CTAN
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
ctan-o-mat [options] [<package configuration>]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
-This program can be used to automate the upload of a package to \s-1CTAN\s0
-(https://www.ctan.org). The description of the package is contained in
-a configuration file. Thus it can be updated easily without the need
-to fill a Web form with the same old information.
+This program can be used to automate the upload of a package to the
+Comprehensive TeX Archive Network (https://www.ctan.org). The description
+of the package is taken from a configuration file. Thus it can be updated
+easily without the need to fill a Web form with the same old information
+again and again.
.PP
The provided information is validated in any case. If the validation
succeeds and not only the validation is requested then the provided
@@ -165,10 +166,11 @@ The default configuration is read from a file with the same name as
the current directory an the extension .pkg. This file name can be
overwritten on the command line.
.PP
-The configuration depends on the features supported by the \s-1CTAN\s0 server.
+The configuration depends on the features currently supported by the
+\&\s-1CTAN\s0 server.
Since these features can change over time the configuration is not
-hard-coded in \fBctan-o-mat\fR. You can request a template of the
-configuration via the command line parameter \f(CW\*(C`\-init\*(C'\fR.
+hard-coded in \fBctan-o-mat\fR. You can request an empty template of the
+configuration via the command line parameter \f(CW\*(C`\-\-init\*(C'\fR.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\-h" 4
@@ -178,16 +180,6 @@ configuration via the command line parameter \f(CW\*(C`\-init\*(C'\fR.
.IX Item "--help"
.PD
Print this short summary about the usage and exit the program.
-.IP "\-\-validate" 4
-.IX Item "--validate"
-.PD 0
-.IP "\-n" 4
-.IX Item "-n"
-.IP "\-\-noaction" 4
-.IX Item "--noaction"
-.PD
-Do not perform the final upload. The package is validated and the
-resulting messages are printed.
.IP "\-i" 4
.IX Item "-i"
.PD 0
@@ -195,6 +187,15 @@ resulting messages are printed.
.IX Item "--init"
.PD
Create an empty template for a configuration.
+.IP "\-\-config <package configuration>" 4
+.IX Item "--config <package configuration>"
+.PD 0
+.IP "\-\-pkg <package configuration>" 4
+.IX Item "--pkg <package configuration>"
+.IP "\-\-package <package configuration>" 4
+.IX Item "--package <package configuration>"
+.PD
+Set the package configuration file.
.IP "\-s" 4
.IX Item "-s"
.PD 0
@@ -215,11 +216,28 @@ Print some more information during the processing (verbose mode).
Print the version number of this program and exit.
.IP "\-\-validate" 4
.IX Item "--validate"
-Print some additional debugging information.
+.PD 0
+.IP "\-n" 4
+.IX Item "-n"
+.IP "\-\-noaction" 4
+.IX Item "--noaction"
+.PD
+Do not perform the final upload. The package is validated and the
+resulting messages are printed.
.IP "<package>" 4
.IX Item "<package>"
This parameter is the name of a package configuration
(see section \s-1CONFIGURATION\s0) contained in a file.
+If not set otherwise the package configuration defaults to the
+name of the current directory with \f(CW\*(C`.pkg\*(C'\fR appended.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+The following environment variables are recognized by \fBctan-o-mat\fR.
+.IP "\s-1CTAN_O_MAT_URL\s0" 4
+.IX Item "CTAN_O_MAT_URL"
+The value is the \s-1URL\s0 prefix for the \s-1CTAN\s0 server to be contacted. The default
+is \f(CW\*(C`https://ctan.org/submit\*(C'\fR. The complete \s-1URL\s0 is constructed by appending
+\&\f(CW\*(C`validate\*(C'\fR, \f(CW\*(C`upload\*(C'\fR, or \f(CW\*(C`fields\*(C'\fR to use the respective \s-1CTAN REST API.\s0
.SH "CONNECTING VIA PROXIES"
.IX Header "CONNECTING VIA PROXIES"
If you need to connect to the Internet via a proxy then this can be achieved
diff --git a/Master/texmf-dist/doc/man/man1/ctan-o-mat.man1.pdf b/Master/texmf-dist/doc/man/man1/ctan-o-mat.man1.pdf
index 44974f9e388..6efe50fd344 100644
--- a/Master/texmf-dist/doc/man/man1/ctan-o-mat.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/ctan-o-mat.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/ctan-o-mat/README.md b/Master/texmf-dist/doc/support/ctan-o-mat/README.md
index 964d1690ac2..08b44507d4d 100644
--- a/Master/texmf-dist/doc/support/ctan-o-mat/README.md
+++ b/Master/texmf-dist/doc/support/ctan-o-mat/README.md
@@ -1,4 +1,4 @@
-# ctan-o-mat - Upload or validate a package for CTAN
+# ctan-o-mat - Validate and upload a package for CTAN
## SYNOPSIS
@@ -8,10 +8,11 @@ ctan-o-mat [options] [<package configuration>]
## DESCRIPTION
-This program can be used to automate the upload of a package to CTAN
-(https://www.ctan.org). The description of the package is contained in
-a configuration file. Thus it can be updated easily without the need
-to fill a Web form with the same old information.
+This program can be used to automate the upload of a package to the
+Comprehensive TeX Archive Network (https://www.ctan.org). The
+description of the package is taken from a configuration file. Thus it
+can be updated easily without the need to fill a Web form with the
+same old information again and again.
The provided information is validated in any case. If the validation
succeeds and not only the validation is requested then the provided
@@ -23,9 +24,9 @@ of the processing. Note that the validation is the default and a
official submission has to be requested by the an appropriate command
line option.
-*ctan-o-mat* requires an Internet connection to the CTAN server. Even the
-validation retrieves the known attributes and the basic constraints
-from the server.
+*ctan-o-mat* requires an Internet connection to the CTAN server. Even
+the validation retrieves the known attributes and the basic
+constraints from the server.
## CONFIGURATION
@@ -34,10 +35,10 @@ The default configuration is read from a file with the same name as
the current directory an the extension `.pkg`. This file name can be
overwritten on the command line.
-The configuration depends on the features supported by the CTAN server.
-Since these features can change over time the configuration is not
-hard-coded in *ctan-o-mat*. You can request a template of the
-configuration via the command line parameter `-init`.
+The configuration depends on the features currently supported by the CTAN
+server. Since these features can change over time the configuration is
+not hard-coded in *ctan-o-mat*. You can request an empty template of the
+configuration via the command line parameter `--init`.
## OPTIONS
@@ -49,21 +50,11 @@ configuration via the command line parameter `-init`.
Print this short summary about the usage and exit the program.
</dd>
- <dt><code>--validate</code></dt>
- <dt><code>-n</code></dt>
- <dt><code>--noaction</code></dt>
- <dd>
- Do not perform the final upload. The package is validated and the
- resulting messages are printed.
- </dd>
-
- <dt><code>-i</code></dt>
<dt><code>--init</code></dt>
<dd>
Create an empty template for a configuration.
</dd>
- <dt><code>-s</code></dt>
<dt><code>--submit</code></dt>
<dd>
Upload the submission, validate it and officially submit it to
@@ -76,39 +67,62 @@ configuration via the command line parameter `-init`.
Print some more information during the processing (verbose mode).
</dd>
- <dt><code>--version</code></dt>
+ <dt><code>--validate</code></dt>
<dd>
- Print the version number of this program and exit.
- </dd>
+ Do not perform the final upload. The package is validated and the
+ resulting messages are printed. This is the default.
+ </dd>
- <dt><code>--validate</code></dt>
+ <dt><code>--verbose</code></dt>
<dd>
Print some additional debugging information.
</dd>
- <dt>&lt;package&gt;</dt>
+ <dt><code>--version</code></dt>
+ <dd>
+ Print the version number of this program and exit.
+ </dd>
+
+ <dt><code>&lt;package&gt;</code></dt>
<dd>
This parameter is the name of a package configuration
(see section CONFIGURATION) contained in a file.
+ If not set otherwise the package configuration defaults to the
+ name of the current directory with <code>.pkg</code> appended.
+ </dd>
+</dl>
+
+## ENVIRONMENT
+
+The following environment variables are recognized by B<ctan-o-mat>.
+
+<dl>
+ <dt>CTAN_O_MAT_URL</dt>
+ <dd>
+ The value is the URL prefix for the CTAN server to be contacted. The
+ default is `https://ctan.org/submit`. The complete URL is constructed
+ by appending `validate`, `upload`, or `fields` to use the respective
+ CTAN REST API.
</dd>
</dl>
## CONNECTING VIA PROXIES
-If you need to connect to the Internet via a proxy then this can be achieved
-by setting some environment variables before running *ctan-o-mat*.
-To redirect the request via the proxy simply define an environment variable
-`http_proxy` to point to the proxy host -- including protocol and port as
-required. Note that the name of the environment variable is supposed to be in *lower* case.
+If you need to connect to the Internet via a proxy then this can be
+achieved by setting some environment variables before running
+*ctan-o-mat*. To redirect the request via the proxy simply define an
+environment variable `http_proxy` to point to the proxy host --
+including protocol and port as required. Note that the name of the
+environment variable is supposed to be in *lower* case.
## INSTALLATION
### PREREQUISITE: PERL
-*ctan-o-mat* is written in Perl. Thus a Perl interpreter has to be installed,
-at least in version 5. It is assumed that the Perl interpreter is reachable
-under the name `perl` on the program path.
+*ctan-o-mat* is written in Perl. Thus a Perl interpreter has to be
+installed, at least in version 5. It is assumed that the Perl
+interpreter is reachable under the name `perl` on the program path.
### PREREQUISITE: LWP
@@ -121,14 +135,37 @@ the following command line:
perl -MCPAN -e 'install Bundle::LWP'
```
-You might want to check whether LWP can be installed with your package manager. In this case this is the preferred way.
+You might want to check whether LWP can be installed with your package
+manager. In this case this is the preferred way.
### INSTALLATION STEPS
-The installation is straight forward. Just put the file `ctan-o-mat.pl` and one of `ctan-o-mat` or `ctan-o-mat.bat` on your path.
+The installation is straight forward. Just put the file
+`ctan-o-mat.pl` and one of `ctan-o-mat` or `ctan-o-mat.bat` on your
+path.
+
+Make sure that these files are executable (if required). Now you are
+done.
+
+### CREATING THE DOCUMENTATION
+
+The PDF documentation is generated from the file `README.md`. This can
+be done with the following command:
+
+```
+make ctan-o-mat.pdf
+```
+
+It requires Perl and a TeX distribution to be installed and on the
+path.
+
+
+## REPOSITORY
-Make sure that these files are executable (if required). Now you are done.
+*ctan-o-mat* lives in a public repository at GitHub. It can be found under the
+URL https://github.com/ge-ne/ctan-o-mat.
+*ctan-o-mat* can be found on CTAN under the URL https://www.ctan.org/pkg/ctan-o-mat.
## AUTHOR
diff --git a/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat b/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat
index 664abc2d647..3041dc07ad3 100755
--- a/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat
+++ b/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat
@@ -16,6 +16,6 @@
##
##-----------------------------------------------------------------------------
-exec perl $0.pl $*
+exec perl "$0.pl" "$@"
# \ No newline at end of file
diff --git a/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat.pkg b/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat.pkg
index 16353d467e0..83d70a22c21 100644
--- a/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat.pkg
+++ b/Master/texmf-dist/doc/support/ctan-o-mat/ctan-o-mat.pkg
@@ -20,7 +20,7 @@
% This field contains the version of the package.
% The value is optional.
% The value is restricted to 32 characters.
-\version{1.0}
+\version{1.1}
% -------------------------------------------------------------------------
% This field contains the name of the author(s).
% The value is optional.
@@ -85,7 +85,7 @@
% This field contains the update indicator; true for update.
% The value is optional.
% The value is restricted to 8 characters.
-\update{false}
+\update{true}
% -------------------------------------------------------------------------
% This field contains the topics id.
% The value is optional.
@@ -100,6 +100,25 @@
This program can be used to automate the upload of a package to CTAN.
The description of the package is contained in a configuration file.
+Changes:
+
+- Handling of directories with spaces improved.
+- Error messages improved.
+- Wrong version on CTAN fixed
+\end{announcement}
+% -------------------------------------------------------------------------
+% This field contains the one-liner for the package.
+% The value is optional.
+% The value is restricted to 128 characters.
+\summary{Upload or validate a package for CTAN}
+% -------------------------------------------------------------------------
+% This field contains the descriptive abstract for the package.
+% The value is optional.
+% The value is restricted to 4096 characters.
+\begin{description}
+This program can be used to automate the upload of a package to CTAN.
+The description of the package is contained in a configuration file.
+
The provided information is validated in any case. If the validation
succeeds and not only the validation is requested then the provided
archive file is placed in the incoming area of the CTAN for further
@@ -113,17 +132,15 @@ line option.
ctan-o-mat requires an Internet connection to the CTAN server. Even the
validation retrieves the known attributes and the basic constraints
from the server.
-\end{announcement}
-% -------------------------------------------------------------------------
-% This field contains the one-liner for the package.
-% The value is optional.
-% The value is restricted to 4096 characters.
-\begin{description}Upload or validate a package for CTAN\end{description}
+\end{description}
% -------------------------------------------------------------------------
% This field contains the note to the CTAN upload managers.
% The value is optional.
% The value is restricted to 2048 characters.
-\begin{note}\end{note}
+\begin{note}
+Sorry, the wrong zip has made it to CTAN.
+This gives me the chance to publish a few minor problems too.
+\end{note}
% -------------------------------------------------------------------------
% This field contains the archive file.
% The value is the file name of the archive to be uploaded.
diff --git a/Master/texmf-dist/doc/support/ctan-o-mat/lib/md2ltx.pl b/Master/texmf-dist/doc/support/ctan-o-mat/lib/md2ltx.pl
index 53b4cffa17b..e3ca5666c8e 100755
--- a/Master/texmf-dist/doc/support/ctan-o-mat/lib/md2ltx.pl
+++ b/Master/texmf-dist/doc/support/ctan-o-mat/lib/md2ltx.pl
@@ -55,7 +55,6 @@ my $body = '';
my $author = '';
my $title = '';
-
while(<>) {
if (m/## AUTHOR/) {
$mode = MODE_AUTHOR;
@@ -81,6 +80,10 @@ while(<>) {
}
next
}
+ if ($mode == MODE_PRE) {
+ $body .= $_;
+ next;
+ }
$_ = "\\subsection*{".ucfirst(lc($1))."}\\label{$1}" if m/^### (.*)/;
$_ = "\\section*{".ucfirst(lc($1))."}\\label{$1}" if m/^## (.*)/;
if (m/^# (.*)/) {
@@ -98,13 +101,16 @@ while(<>) {
s/<dl>/\\begin{description}/;
s/<\/dl>/\\end{description}/;
s/<code>(.*)<\/code>/\\texttt{$1}/;
- s/<dt>(.*)<\/dt>/\\item[$1]/;
+ s/<dt>/\\item[/;
+ s/<\/dt>/]/;
s/<dd>/\\ \\\\/;
s/ - / -- /;
- s/&gt;/\\(>\\)/;
- s/&lt;/\\(<\\)/;
+ s/TeX /\\TeX{} /;
+ s/(&gt;|>)/\$>\$/;
+ s/(&lt;|<)/\$<\$/;
s/_/\\_/g;
- s|https?://[.a-z\/]*|\\url{$&}|;
+ s|https?://[.a-z\/-]*[a-z\/]|\\url{$&}|;
+ s|mailto:([\@a-z-]*)|\\href{$&}{$1}|;
$body .= $_;
}
@@ -114,14 +120,18 @@ if ($title =~ m/ +-+ +/) {
$title = $`;
$subject = $';
}
-if ($author =~ m/\[([a-z0-9.,:; ]*)\]\(([^()]*)\)/i) {
+if ($author =~ m/\[([a-z0-9.,:; ]*)\]\(mailto:([^()]*)\)/i) {
+ $author = $1;
+ $author_long = "$1 (\\href{mailto:$2}{$2})";
+} elsif ($author =~ m/\[([a-z0-9.,:; ]*)\]\(([^()]*)\)/i) {
$author = $1;
$author_long = "$1 ($2)";
}
+
print <<__EOF__;
\\documentclass[a4paper,12pt]{scrartcl}
-\\usepackage[urlcolor=blue,urlbordercolor={.85 .85 1}]{hyperref}
+\\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
\\date{}
\\hypersetup{
pdfinfo={
@@ -132,7 +142,8 @@ print <<__EOF__;
}
\\author{$author_long}
-\\title{$title\\thanks{This document describes \textbf{$title} version $version}\\\\$subject}
+\\title{$title\\thanks{This document describes \\textbf{$title} version $version}}
+\\subtitle{$subject}
\\begin{document}
\\maketitle
diff --git a/Master/texmf-dist/doc/support/ctan-o-mat/makefile b/Master/texmf-dist/doc/support/ctan-o-mat/makefile
index cabe9d8d145..eebb703f99c 100644
--- a/Master/texmf-dist/doc/support/ctan-o-mat/makefile
+++ b/Master/texmf-dist/doc/support/ctan-o-mat/makefile
@@ -1,6 +1,19 @@
-#******************************************************************************
-#* (c) 2017 Gerd Neugebauer
-#*=============================================================================
+##-----------------------------------------------------------------------------
+## This file is part of ctan-o-mat.
+## This program is distributed under BSD-like license. See file LICENSE
+##
+## (c) 2016-2017 Gerd Neugebauer
+##
+## Net: gene@gerd-neugebauer.de
+##
+## This program is free software; you can redistribute it and/or modify it
+## under the terms of a 3-clause BSD-like license as stated in the file
+## LICENSE contained in this distribution.
+##
+## You should have received a copy of the LICENSE along with this program; if
+## not, see the repository under https://github.com/ge-ne/ctan-o-mat.
+##
+##-----------------------------------------------------------------------------
FILES = ctan-o-mat \
ctan-o-mat.bat \
@@ -13,17 +26,20 @@ FILES = ctan-o-mat \
lib/md2ltx.pl
VERSION = `ctan-o-mat --version`
+LATEX = xelatex
+
+#------------------------------------------------------------------------------
all:
-clean:
+clean distclean:
$(RM) -f *~ *.out *.log *.aux ctan-o-mat.ltx
-ctan-o-mat.pdf: README.md makefile lib/md2ltx.pl
- @perl lib/md2ltx.pl --version "$(VERSION)" README.md > ctan-o-mat.ltx
- @xelatex -interaction=batchmode ctan-o-mat.ltx > /dev/null
- @xelatex -interaction=batchmode ctan-o-mat.ltx
- @$(RM) ctan-o-mat.out ctan-o-mat.aux ctan-o-mat.log
+pdf doc ctan-o-mat.pdf: README.md makefile lib/md2ltx.pl
+ @perl lib/md2ltx.pl --version "$(VERSION)" README.md > ctan-o-mat.latex
+ @$(LATEX) -interaction=batchmode ctan-o-mat.latex > /dev/null
+ @$(LATEX) -interaction=batchmode ctan-o-mat.latex
+ @$(RM) ctan-o-mat.out ctan-o-mat.aux ctan-o-mat.log ctan-o-mat.latex
dist ctan-o-mat.zip: $(FILES)
$(RM) ctan-o-mat.zip