Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

奥付ありでverify_target_images: trueのときエラー発生 #1927

Open
Yuki-book opened this issue Nov 2, 2024 · 2 comments
Open

奥付ありでverify_target_images: trueのときエラー発生 #1927

Yuki-book opened this issue Nov 2, 2024 · 2 comments

Comments

@Yuki-book
Copy link

次のような条件で奥付 colophon.xhtml でエラー(Errno::ENOENT)が発生します。
よろしくお願いいたします。

エラー発生条件

config.ymlで次のパラメータを有効にする。

【1】奥付を作成する
  colophon: true

【2】画像取り込みの解析をする
  epubmakerセクションのverify_target_images : true

エラーの内容

$ rake epub
review-epubmaker  config.yml
/var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:205:in `initialize': No such file or directory @ rb_sysopen - /tmp/book-epub-20241102-5020-69x84w/colophon.xhtml (Errno::ENOENT)
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:205:in `open'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:205:in `block in verify_target_images'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:202:in `each'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:202:in `verify_target_images'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:166:in `produce'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:92:in `execute'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/lib/review/epubmaker.rb:50:in `execute'
        from /var/lib/gems/3.2.0/gems/review-5.10.0/bin/review-epubmaker:15:in `<top (required)>'
        from /usr/local/bin/review-epubmaker:25:in `load'
        from /usr/local/bin/review-epubmaker:25:in `<main>'
rake aborted!
Command failed with status (1): [review-epubmaker  config.yml...]
lib/tasks/review.rake:117:in `block in <top (required)>'
Tasks: TOP => epub => book.epub
(See full trace by running task with --trace)

Re:VIEWバージョンなど

$ review version
5.10.0
@kdmsnr
Copy link
Collaborator

kdmsnr commented Nov 2, 2024

コンテンツには追加されているけれどファイルがない感じなんですかね。
epubmaker.rb に build_titlepage と同じように build_colophonpage があればよい?

@kmuto
Copy link
Owner

kmuto commented Nov 17, 2024

遅くなりました。colophon:trueで自動生成の場合producerの最後のほうで生成される、verify_target_imagesは画像コピーのタイミング上もっと前なのでそのときにはcolophonファイルはない、と。

全体まで直すのはしんどめなので、verify_target_imagesでcontent.fileがなかったら単にスキップするようにするのがいいのかなと思っています。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants