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

ENH: filter for postprocessing function #27

Closed
wants to merge 1 commit into from

Conversation

msurkovsky
Copy link
Contributor

As there is a postprocess function, it is desireable to have a posibility to skip some slides from posprocessing. This commit adds such a functionality.

@spirali
Copy link
Owner

spirali commented Jan 14, 2020

Thank you, but I am not going to merge this as it is an ad-hoc solution and not a systematic change. What if you want to do some post-processing for all slides but do not include some slides to page numbering?

Generally, this problem will be solved by tagging and naming, which is in my roadmap, but for now you can just directly use Python capabilities:

@elsie.slide()
def slide1(slide):
    slide.my_skip = True
    ...


def postprocessing(slides):
    slides = [s for s in slides if hasattr(s, "my_skip")]
    ....

elsie.render(slides_postprocessing=postprocessing)

@spirali spirali closed this Jan 17, 2020
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.

None yet

2 participants