source: main/trunk/greenstone2/perllib/cpan/Mojolicious/Command/generate/makefile.pm@ 32205

Last change on this file since 32205 was 32205, checked in by ak19, 6 years ago

First set of commits to do with implementing the new 'paged_html' output option of PDFPlugin that uses using xpdftools' new pdftohtml. So far tested only on Linux (64 bit), but things work there so I'm optimistically committing the changes since they work. 2. Committing the pre-built Linux binaries of XPDFtools for both 32 and 64 bit built by the XPDF group. 2. To use the correct bitness variant of xpdftools, setup.bash now exports the BITNESS env var, consulted by gsConvert.pl. 3. All the perl code changes to do with using xpdf tools' pdftohtml to generate paged_html and feed it in the desired form into GS(3): gsConvert.pl, PDFPlugin.pm and its parent ConvertBinaryPFile.pm have been modified to make it all work. xpdftools' pdftohtml generates a folder containing an html file and a screenshot for each page in a PDF (as well as an index.html linking to each page's html). However, we want a single html file that contains each individual 'page' html's content in a div, and need to do some further HTML style, attribute and structure modifications to massage the xpdftool output to what we want for GS. In order to parse and manipulate the HTML 'DOM' to do this, we're using the Mojo::DOM package that Dr Bainbridge found and which he's compiled up. Mojo::DOM is therefore also committed in this revision. Some further changes and some display fixes are required, but need to check with the others about that.

File size: 1.8 KB
Line 
1package Mojolicious::Command::generate::makefile;
2use Mojo::Base 'Mojolicious::Command';
3
4use Mojolicious;
5
6has description => 'Generate "Makefile.PL"';
7has usage => sub { shift->extract_usage };
8
9sub run { shift->render_to_rel_file('makefile', 'Makefile.PL') }
10
111;
12
13=encoding utf8
14
15=head1 NAME
16
17Mojolicious::Command::generate::makefile - Makefile generator command
18
19=head1 SYNOPSIS
20
21 Usage: APPLICATION generate makefile [OPTIONS]
22
23 mojo generate makefile
24
25 Options:
26 -h, --help Show this summary of available options
27
28=head1 DESCRIPTION
29
30L<Mojolicious::Command::generate::makefile> generates C<Makefile.PL> files for
31applications.
32
33This is a core command, that means it is always enabled and its code a good
34example for learning to build new commands, you're welcome to fork it.
35
36See L<Mojolicious::Commands/"COMMANDS"> for a list of commands that are
37available by default.
38
39=head1 ATTRIBUTES
40
41L<Mojolicious::Command::generate::makefile> inherits all attributes from
42L<Mojolicious::Command> and implements the following new ones.
43
44=head2 description
45
46 my $description = $makefile->description;
47 $makefile = $makefile->description('Foo');
48
49Short description of this command, used for the command list.
50
51=head2 usage
52
53 my $usage = $makefile->usage;
54 $makefile = $makefile->usage('Foo');
55
56Usage information for this command, used for the help screen.
57
58=head1 METHODS
59
60L<Mojolicious::Command::generate::makefile> inherits all methods from
61L<Mojolicious::Command> and implements the following new ones.
62
63=head2 run
64
65 $makefile->run(@ARGV);
66
67Run this command.
68
69=head1 SEE ALSO
70
71L<Mojolicious>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
72
73=cut
74
75__DATA__
76
77@@ makefile
78use strict;
79use warnings;
80
81use ExtUtils::MakeMaker;
82
83WriteMakefile(
84 VERSION => '0.01',
85 PREREQ_PM => {'Mojolicious' => '<%= $Mojolicious::VERSION %>'},
86 test => {TESTS => 't/*.t'}
87);
Note: See TracBrowser for help on using the repository browser.