Skip to content

Conversation

@daipom
Copy link
Contributor

@daipom daipom commented Nov 17, 2025

Support original PDF

:pdf markup language already exists, but we couldn't use it to use original PDF.
This fix allows us to use :pdf markup language to use original PDF.

Points:

  • Add --readme-markup-language to manage README format.
    • Use :markdown for :pdf.
    • Otherwise, use the same as --markup-language by default.
    • Backward compatible.
  • The source file is pdf/{id}-{base-name}.pdf.
    • Copy the PDF file specified by the --pdf option at initialization.
  • Skip pdf task to avoid unexpected PDF rebuild.

How to use:

  1. rabbit-slide new --id=foo --base_name=bar --markup-language=pdf --pdf=/path/to/pdf_file ...
  2. Write README.md.
  3. Edit config.yaml if necessary.
  4. You can run rake to show it or rake publish to publish it now.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we should move markup_language to SlideConfiguration from AuthorConfiguraiton before this.

We may use different markup languages over slides.

@daipom
Copy link
Contributor Author

daipom commented Dec 14, 2025

It seems that we should move markup_language to SlideConfiguration from AuthorConfiguraiton before this.

I’ve fixed everything else related to this. I’ll make a separate PR for this.

Comment on lines +168 to +202
"Specify the PDF file to copy when using the pdf markup language.",
"(must only when --markup-language=pdf)") do |file|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: I18n. I don't know how to do it.
I guess we need to update files under po/.

end

def copy_file(from, to)
Rabbit.logger.info("Copying file: #{from} to #{to}")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@daipom
Copy link
Contributor Author

daipom commented Dec 14, 2025

It seems that we should move markup_language to SlideConfiguration from AuthorConfiguraiton before this.

I’ve fixed everything else related to this. I’ll make a separate PR for this.

@daipom
Copy link
Contributor Author

daipom commented Dec 14, 2025

Add GUI support for --pdf.
Without this, the PDF settings can’t be fully handled from the GUI alone (unless --pdf is specified on the command line). Ideally, this widget would only be shown or enabled when PDF is selected in the ComboBox, but adding that level of control seems a bit heavy...
I think it’s fine that it can't be configured from the GUI for now. In that case, let’s drop this commit.

Screenshot from 2025-12-15 00-41-37

@daipom
Copy link
Contributor Author

daipom commented Dec 17, 2025

Applied #183.

TODO

  • Add --readme-markup-language.
  • I18n.

daipom and others added 2 commits December 30, 2025 20:20
`:pdf` markup language already exists, but we couldn't use it to
use original PDF.
This fix allows us to use `:pdf` markup language to use original
PDF.

Points:

* Add `--readme-markup-language` to manage README format.
  * Use `:markdown` for `:pdf`.
  * Otherwise, use the same as `--markup-language` by default.
  * Backward compatible.
* The source file is `pdf/{id}-{base-name}.pdf`.
  * Copy the PDF file specified by the `--pdf` option at initialization.
* Skip `pdf` task to avoid unexpected PDF rebuild.

How to use:

1. `rabbit-slide new --id=foo --base_name=bar --markup-language=pdf --pdf=/path/to/pdf_file ...`
2. Write `README.md`.
3. Edit `config.yaml` if necessary.
4. You can run `rake` to show it or `rake publish` to publish it now.

Co-authored-by: Sutou Kouhei <[email protected]>
@daipom
Copy link
Contributor Author

daipom commented Dec 30, 2025

  • Add --readme-markup-language.

DONE.

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

Successfully merging this pull request may close these issues.

2 participants