Giter VIP home page Giter VIP logo

ctan-o-mat's Introduction

ctan-o-mat - Validate and upload a package for CTAN

SYNOPSIS

ctan-o-mat [options] [<package configuration>]

DESCRIPTION

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 archive file is placed in the incoming area of the CTAN for further processing by the CTAN team.

In any case any finding during the validation is reported at the end 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.

CONFIGURATION

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 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

-h
--help
Print this short summary about the usage and exit the program.
--init
Create an empty template for a configuration on stdout.
--list licenses
List the known licenses of CTAN to the standard output stream. Each license is represented as one line. The line contains the fields key, name, free indicator. Those fields are separated by tab characters. Afterwards the program terminates without processing any further arguments.
--submit
Upload the submission, validate it and officially submit it to CTAN it the validation succeeds.
-v
--verbose
Print some more information during the processing (verbose mode).
--validate
Do not perform the final upload. The package is validated and the resulting messages are printed. This is the default.
--verbose
Print some additional debugging information.
--version
Print the version number of this program and exit.
<package>
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 .pkg appended.

ENVIRONMENT

The following environment variables are recognized by B.

CTAN_O_MAT_URL
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.

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.

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.

PREREQUISITE: LWP

ctan-o-mat uses the LWP bundle to connect to the remote server and such. Thus it has to be installed. With the help of Perl you can install it with 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.

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.

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

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

Gerd Neugebauer

ctan-o-mat's People

Contributors

ge-ne avatar rpspringuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rpspringuel

ctan-o-mat's Issues

PERL Version Used

When I attempt to run ctan-o-mat, even with the -i option, I get the following error:

Can't verify SSL peers without knowing which Certificate Authorities to trust

This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE
envirionment variable or by installing the Mozilla::CA module.

To disable verification of SSL peers set the PERL_LWP_SSL_VERIFY_HOSTNAME
envirionment variable to 0.  If you do this you can't be sure that you
communicate with the expected peer.

Do you have any suggestions for the appropriate setting of that environment variable, or do I need to figure out how to install PERL modules on my system (I have PERL installed via MacPorts and thus don't normally deal with that aspect of it)?

Enhanced Initialization for Existing packages

It would be useful if the initialization option could accept a package name. The script would then take that name, query CTAN for information about the package, and use it to autopopulate the fields in the initialized output.

--list licenses not working

On my system (macOS 10.13.3) the --list licenses option is not working. The program starts, but hangs without really doing anything. Even after several hours nothing has happened and I have to interrupt the process. Here's the output with the verbose option:

$ ctan-o-mat -v --list licenses
--- Retrieving licenses from CTAN...done
done

Description file displayed but not created

Context

  • Linux Mageia 8
  • TeX Live 2021
  • ctan-o-mat 1.2
  • zsh

Issue

If I understand correctly, when run in a ⟨package⟩ directory, ctan-o-mat -i should create a ⟨package⟩.pkg description file for ctan-o-mat. But it only displays the content of such a file in the terminal (OK, it is just a matter of ctan-o-mat -i > ⟨package⟩.pkg but I wanted to let you know).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.