Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Really enabled PDF support, Mohammed Arafat Kamaal.

  • Loading branch information...
commit f58eed6f9b4e7cc8ba1fb8b47930198fd28d238e 1 parent d04de6c
@chromatic authored
Showing with 11 additions and 7 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  CREDITS
  3. +7 −0 README
  4. +0 −7 build/tools/build_pdf.pl
View
1  .gitignore
@@ -1,3 +1,4 @@
build/chapters
build/html/*.html
+build/pdf/*.pdf
examples/
View
3  CREDITS
@@ -164,3 +164,6 @@ E: larry@wall.org
N: Gabrielle Roth
E: gorthx@gmail.com>
+
+N: Mohammed Arafat Kamaal
+E: makamaal.linux@gmail.com
View
7 README
@@ -83,6 +83,13 @@ To build an ePub eBook from the woven chapters:
This will produce an ePub eBook in the build/epub/ directory.
+To build PDFs from the chapters:
+
+ $ perl build/tools/build_pdf.pl
+
+This will build PDFs in the build/pdf directory. You must have App::pod2pdf
+installed from the CPAN.
+
Contributing to Modern Perl
---------------------------
View
7 build/tools/build_pdf.pl
@@ -3,7 +3,6 @@
use strict;
use warnings;
-use File::Path;
use File::Spec::Functions qw( catfile catdir splitpath );
# getting chapter list
@@ -15,12 +14,6 @@
my $outpath = catdir( qw( build pdf ) );
-# Make directory for copying PDFs
@melo
melo added a note

Why was this code removed?

My first build_pdf.pl run failed because the build/pdf/ dir was not there, and this code would have made it work.

I would revert this part...

@chromatic Owner

I checked in a .gitignore file under build/pdf/ so the directory should always be there. At least, I tried to check in a .gitignore file.

@melo
melo added a note

Wont work.

Git does not preserve empty directories.

If you want to keep the directory, you need a file inside.

Or revert the make_path stuff.

@chromatic Owner

I've just confirmed that the build/epub/ directory is in the tree on GH as of b205634, so I think it'll work. If you can reproduce with a fresh checkout, I'll replace the directory code.

@melo
melo added a note

Hi,

I can reproduce with a fresh checkout. See screencast here: http://www.simplicidade.org/share/modern_perl_pdf_problem.mov

I clone your repo, build chapters and when I try to build the pdf, I get the errors because the pdf/ directory is not present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
-unless (-d $outpath)
-{
- File::Path::make_path($outpath) or die "Can't build path: $!\n";
-}
-
for my $chapter ( @chapters ){
my @filename = split( /\./ , $chapter );
print "Converting $chapter to pdf\n";

0 comments on commit f58eed6

Please sign in to comment.
Something went wrong with that request. Please try again.