Unprocessed Links in Mobi Format #20

Closed
mgatto opened this Issue Jun 18, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@mgatto

mgatto commented Jun 18, 2012

In the CHI Mobi ebook I got from perlybook, there are many strings which seem like they ought to be links but are probably still in pod format, as such (I'm no expert on POD):

CHI::Driver::File|File

This pattern occurs in many places.

@borisdaeppen

This comment has been minimized.

Show comment
Hide comment
@borisdaeppen

borisdaeppen Jun 18, 2012

Collaborator

Thanks for reporting.

An example found in the book:

Keys over this size will be digested|key_digester. The default is driver-specific; CHI::Driver::File|File, for example, defaults this to 240 due to file system limits. For most drivers there is no maximum.

I will have a look on that.

Collaborator

borisdaeppen commented Jun 18, 2012

Thanks for reporting.

An example found in the book:

Keys over this size will be digested|key_digester. The default is driver-specific; CHI::Driver::File|File, for example, defaults this to 240 due to file system limits. For most drivers there is no maximum.

I will have a look on that.

@borisdaeppen

This comment has been minimized.

Show comment
Hide comment
@borisdaeppen

borisdaeppen Jun 20, 2012

Collaborator

Does not appear in EPUB, so it is probably an issue of EBook::MOBI

Collaborator

borisdaeppen commented Jun 20, 2012

Does not appear in EPUB, so it is probably an issue of EBook::MOBI

@borisdaeppen

This comment has been minimized.

Show comment
Hide comment
@borisdaeppen

borisdaeppen Jun 20, 2012

Collaborator

Tanks @mgatto for telling us this issue.
EBook::MOBI did not handle "enhanced" use of the L<> tag in POD - so this was the cause.

I added some support for it in commit 6a776af1d1ac920f796ae9c44f1eec7a8471cfe0.
See borisdaeppen/EBook--MOBI@6a776af for details.

The testcases show how it behaves now:

$pod_input{inline_links} = <<'HEREDOC';
=head1 Inline Links

Link 1 L<Module>

Link 2 L<Module/Chapter>

Link 3 L<Name|Module>

Link 4 L<Name|Module/Chapter>

Link 5 L<Name|/Chapter>

Link 6 L</Chapter>

Link 7 L<http://perl.org>

Link 8 L<perl.org>

Link 9 L<Perl|http://perl.org>

Link 10 L<Perl|perl.org>

=cut
HEREDOC

$html_out{inline_links} = <<'HEREDOC';
<body>
<h1>Inline Links</h1>
<p>Link 1 <a href='https://metacpan.org/module/Module'>Module</a></p>
<p>Link 2 <a href='https://metacpan.org/module/Module#Chapter'>Module/Chapter</a></p>
<p>Link 3 <a href='https://metacpan.org/module/Module'>Name</a></p>
<p>Link 4 <a href='https://metacpan.org/module/Module#Chapter'>Name</a></p>
<p>Link 5 Name (Chapter)</p>
<p>Link 6 "Chapter"</p>
<p>Link 7 <a href='http://perl.org'>http://perl.org</a></p>
<p>Link 8 <a href='perl.org'>perl.org</a></p>
<p>Link 9 <a href='http://perl.org'>Perl</a></p>
<p>Link 10 <a href='perl.org'>Perl</a></p>
</body>
HEREDOC

I'm sure this is not yet perfect but it is much better as before...

As soon as EBook-MOBI-0.45 is spread on CPAN I'll install it on perlybook.org

Collaborator

borisdaeppen commented Jun 20, 2012

Tanks @mgatto for telling us this issue.
EBook::MOBI did not handle "enhanced" use of the L<> tag in POD - so this was the cause.

I added some support for it in commit 6a776af1d1ac920f796ae9c44f1eec7a8471cfe0.
See borisdaeppen/EBook--MOBI@6a776af for details.

The testcases show how it behaves now:

$pod_input{inline_links} = <<'HEREDOC';
=head1 Inline Links

Link 1 L<Module>

Link 2 L<Module/Chapter>

Link 3 L<Name|Module>

Link 4 L<Name|Module/Chapter>

Link 5 L<Name|/Chapter>

Link 6 L</Chapter>

Link 7 L<http://perl.org>

Link 8 L<perl.org>

Link 9 L<Perl|http://perl.org>

Link 10 L<Perl|perl.org>

=cut
HEREDOC

$html_out{inline_links} = <<'HEREDOC';
<body>
<h1>Inline Links</h1>
<p>Link 1 <a href='https://metacpan.org/module/Module'>Module</a></p>
<p>Link 2 <a href='https://metacpan.org/module/Module#Chapter'>Module/Chapter</a></p>
<p>Link 3 <a href='https://metacpan.org/module/Module'>Name</a></p>
<p>Link 4 <a href='https://metacpan.org/module/Module#Chapter'>Name</a></p>
<p>Link 5 Name (Chapter)</p>
<p>Link 6 "Chapter"</p>
<p>Link 7 <a href='http://perl.org'>http://perl.org</a></p>
<p>Link 8 <a href='perl.org'>perl.org</a></p>
<p>Link 9 <a href='http://perl.org'>Perl</a></p>
<p>Link 10 <a href='perl.org'>Perl</a></p>
</body>
HEREDOC

I'm sure this is not yet perfect but it is much better as before...

As soon as EBook-MOBI-0.45 is spread on CPAN I'll install it on perlybook.org

borisdaeppen added a commit that referenced this issue Jun 20, 2012

@borisdaeppen

This comment has been minimized.

Show comment
Hide comment
Collaborator

borisdaeppen commented Jun 20, 2012

@mgatto

This comment has been minimized.

Show comment
Hide comment
@mgatto

mgatto Jun 25, 2012

That's great! Thanks.

mgatto commented Jun 25, 2012

That's great! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment