Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

build html file from jsfiddle files

Project description

Installation

$ [sudo] pip install jsfiddle-build

How it works

jsfiddle github repo:

.
├── build.html          generated
├── demo.html           required
├── demo.css            optional
├── demo.js             optional
├── demo.details        optional

jsfiddle github gist:

.
├── build.html          generated
├── fiddle.html         required
├── fiddle.css          optional
├── fiddle.js           optional
├── fiddle.manifest     optional

build.html:

<html>
<head>
<title>{title}</title>
{resources}
<style type="text/css">
    {css}
</style>
<script type="text/javascript">
window.onload=function(){
    {js}
}
</script>
</head>
<body>
    {html}
</body>
</html>

Classes

class __doc__
jsfiddle_build.Build methods: render(), save(path)

Executable modules

usage __doc__
python -m jsfiddle_build path ... build build.html from jsfiddle files (demo.css, demo.details,demo.js,demo.html)

Examples

$ find . -name "*.html" ! -name "build.*" | xargs python -m jsfiddle_build

paths with spaces:

OS speed command
any slow find . -name "*.html" ! -name "build.*" -exec python -m jsfiddle_build {} \;
Linux fast find . -name "*.html" ! -name "build.*" -print0 | xargs -d '\n' python -m jsfiddle_build
macOS fast find . -name "*.html" ! -name "build.*" -print0 | xargs -0 python -m jsfiddle_build

Related projects

Links

python-readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jsfiddle-build, version 2019.4.13
Filename, size File type Python version Upload date Hashes
Filename, size jsfiddle-build-2019.4.13.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page