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

preprocessing slides using figlet and boxes does not work #78

Closed
marcotrosi opened this issue Jul 8, 2021 · 4 comments
Closed

preprocessing slides using figlet and boxes does not work #78

marcotrosi opened this issue Jul 8, 2021 · 4 comments

Comments

@marcotrosi
Copy link

Not sure if it's a bug or if I'm doing something wrong.

Describe the bug
The slides README shows an example of pre-processing slides with graph-easy. According to the description the text is send to the given command as stdin and then replaced in the slide. For figlet and boxes I was not able to get this to work. I don't know if there are more tools where it doesn't work.

To Reproduce
create a slide with the following code block

~~~figlet
foobar
~~~

or use boxes instead of figlet.

Expected behavior
I would expect that the text gets replaced with the figlet or boxes output,
like this ...
image

but the text stays as it is ... (left side the slide in presentation mode)
figlet fail

Desktop (please complete the following information):

  • OS: macOS 10.14
@maaslalani
Copy link
Owner

Hey, this definitely looks correct! What version of slides are you on? This feature was introduced in v0.4.0

Also, does all pre-processing not work? Can you do a simple:

~~~echo hello
should be erased
~~~~

Also, does your file have execution permissions? chmod +x file.md. This is needed for security reasons since this executes code on your system so the file must be executable to ensure you've opted-in to pre-processing.

@maaslalani
Copy link
Owner

This is a great use-case of pre-processing though! Thanks for using slides! 😄

I suspect you are just missing the chmod +x slides.md

@maaslalani
Copy link
Owner

It works for me! (with the file being executable)

image

@marcotrosi
Copy link
Author

Thanks again for the fast reaction time and for sharing slides with the world.

Okay, it works now. Thank you so much.

Of course it was my fault. I had used chmod 754 slides.md instead of chmod +x slides.md. I thought it should be enough when I (the owner) or my group have execution rights, but it's the "others" that need it.

One more side note...
The example in the README.md or preprocess.md shows only the 3 tilde before and after. But according to the example above and also when looking at your markdown examples in RAW format, I can that also the 3 backticks before and after are required, otherwise slides prints a bunch of dashes right before the replaced text.
I assume that GitHub is removing the 3 backticks when rendering these markdown files here. Maybe you can add a sentence that mentions that the 3 backticks before and after are required but GitHub doesn't show them properly.

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

2 participants