App::DocKnot::Update(3pm)

App::DocKnot::Update3pm

Update docknot input or package configuration

Usage

    use App::DocKnot::Update;
    my $update = App::DocKnot::Update->new(
        {
            metadata => 'docs/metadata',
            output   => 'docs/docknot.yaml',
        }
    );
    $update->update();
    $update->update_spin('/path/to/spin/input');

Requirements

Perl 5.24 or later and the modules Git::Repository, File::BaseDir, File::ShareDir, JSON::MaybeXS, Path::Iterator::Rule, Path::Tiny, Perl6::Slurp, and YAML::XS, all of which are available from CPAN.

Overview

This component of DocKnot updates package configuration from older versions. Currently, its main purpose is to convert from the JSON format used prior to DocKnot 4.0 to the current YAML syntax.

Class methods

new(ARGS)

Create a new App::DocKnot::Update object. This should be used for all subsequent actions. ARGS should be a hash reference with one or more of the following keys:

metadata

The path to the directory containing the legacy JSON metadata for a package. Default: docs/metadata relative to the current directory.

output

The path to which to write the new YAML configuration. Default: docs/docknot.yaml relative to the current directory.

Instance methods

update()

Load the legacy JSON metadata and write out the YAML equivalent.

update_spin([PATH])

Update the input tree for App::DocKnot::Spin to follow current expectations. PATH is the path to the input tree, which defaults to the current directory if not given. If the input tree is the working tree for a Git repository, any changes are also registered with Git (but not committed).

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

Author

Russ Allbery <[email protected]>

From docknot 8.0.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.