Skip to content

kmjungersen/modular-file-renderer

 
 

Repository files navigation

mfr

https://travis-ci.org/CenterForOpenScience/modular-file-renderer.svg?branch=dev

WARNING: mfr is in a very alpha stage of development. As such, it's API is in constant flux. Expect many breaking changes.

mfr (short for "modular file renderer") is a Python package for rendering files to HTML.

import mfr
import mfr_image

# Enable the mfr_image module
mfr.register_filehandler(mfr_image.Handler)

with open('hello.jpg') as filepointer:
   mfr.render(filepointer, alt="Hello world")
   # => '<img src="hello.jpg" alt="Hello world" />'

Requirements

  • Python >= 2.6 or >= 3.3

Available modules

There are a number of 3rd-party modules available.

Make your own, then submit a pull request to add it to this list!

Create your own module

Interested in adding support for a new file format? Check out the CONTRIBUTING.rst docs.

License

Copyright 2014 Center for Open Science

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.4%
  • Python 23.0%
  • CSS 22.9%
  • Shell 1.7%