Skip to main content

build html file from jsfiddle files

Project description

Installation

$ [sudo] pip install jsfiddle-build

How it works

required: demo.html. optional: demo.css, demo.js, demo.details

demo.details (optional)

---
 name: Name of the Demo
 description: Some description, please keep it in one line
 resources:
   - http://some.url.com/some/file.js
   - http://other.url.com/other_filename.css

build.html:

<html>
<head>
<title>Name of the Demo</title>
<script type="text/javascript" src="http://some.url.com/some/file.js"></script>
<link rel="stylesheet" type="text/css" href="http://other.url.com/other_filename.css">
<style type="text/css">
    demo.css ...
</style>
<script type="text/javascript">
window.onload=function(){
    demo.js ...
}
</script>
</head>
<body>
    demo.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 "demo.html" | xargs python -m jsfiddle_build

paths with spaces:

OS speed command
Linux fast `find . -name "demo.html" -print0
macOS fast `find . -name "demo.html" -print0
any slow find . -name "demo.html" -exec 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.

Source Distribution

jsfiddle-build-2019.4.8.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

jsfiddle_build-2019.4.8-py2.py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page