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

Allowing to configure executables for filters (fixes #2615). #2638

Merged
merged 7 commits into from Jan 15, 2017

Conversation

@felixfontein
Copy link
Contributor

felixfontein commented Jan 15, 2017

As discussed in #2615.

@@ -562,6 +562,29 @@ GITHUB_COMMIT_SOURCE = True
# ".jpg": ["jpegoptim --strip-all -m75 -v %s"],
# }

# The executable for the filter "yui_compressor" from nikola.filters can

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jan 15, 2017

Member

I’d prefer something else (matches how we describe other settings):

# Executable for the "yui_compressor" filter (defaults to 'yui-compressor').

And perhaps name those settings *_EXECUTABLE. With YUI Compressor, we should be prepared to take this:

java -jar ~/yui-compressor.jar

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jan 15, 2017

Author Contributor

Since YUI_COMPRESSOR is simply inserted in the command line, it can also be java -jar ~/yui-compressor.jar.

About the naming: I'll adjust that.

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jan 15, 2017

Author Contributor

I also adjusted the comments in conf.py.in.


# The executable for the filter "jpegoptim" from nikola.filters can be
# configured here:
# JPEG_OPTIM = 'jpegoptim'

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jan 15, 2017

Member

JPEGOPTIM_EXECUTABLE

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jan 15, 2017

Author Contributor

Fixed.

@@ -45,6 +45,19 @@
from .utils import req_missing, LOGGER


class configurable_filter(object):

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jan 15, 2017

Member

A better name would be _ConfigurableFilter, because we don’t want this to be considered public.

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jan 15, 2017

Author Contributor

Done.

@@ -925,6 +926,17 @@ def __init__(self, **config):
utils.LOGGER.warn('The STORY_INDEX option is deprecated, use PAGE_INDEX instead.')
self.config['PAGE_INDEX'] = config['STORY_INDEX']

# Configure filters
for _, actions in self.config['FILTERS'].items():

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jan 15, 2017

Member
for actions in self.config['FILTERS'].values():

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jan 15, 2017

Author Contributor

Fixed.

@felixfontein felixfontein merged commit 741a5df into master Jan 15, 2017
2 of 5 checks passed
2 of 5 checks passed
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@felixfontein felixfontein deleted the configurable-filters branch Jan 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.