Skip to content

[SVCS-528] Let WB know a request is coming from MFR #292

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mfr/server/handlers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ async def prepare(self):

try:
self.url = self.request.query_arguments['url'][0].decode('utf-8')
# TODO should probably use furl here, but maybe wait till after furl is upgraded
self.url += '&mfr=true'
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine since self.url is a literal string instead of an object as long as the URL does not contain fragment parameters.

except KeyError:
raise exceptions.ProviderError(
'"url" is a required argument.',
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def parse_requirements(requirements):
'mfr.exporters': [
# google docs
'.gdraw = mfr.extensions.image:ImageExporter',
'.gdoc = mfr.extensions.unoconv:UnoconvExporter',
'.gsheet = mfr.extensions.unoconv:UnoconvExporter',
'.gslides = mfr.extensions.unoconv:UnoconvExporter',

Expand Down Expand Up @@ -658,7 +657,6 @@ def parse_requirements(requirements):

# google docs
'.gdraw = mfr.extensions.image:ImageRenderer',
'.gdoc = mfr.extensions.unoconv:UnoconvRenderer',
'.gsheet = mfr.extensions.tabular:TabularRenderer',
'.gslides = mfr.extensions.unoconv:UnoconvRenderer',

Expand Down Expand Up @@ -690,6 +688,7 @@ def parse_requirements(requirements):

# pdf
'.pdf = mfr.extensions.pdf:PdfRenderer',
'.gdoc = mfr.extensions.pdf:PdfRenderer',

# rst
'.rst = mfr.extensions.rst:RstRenderer',
Expand Down