Skip to main content

A conversion tool to turn html/bootstrap into Python code for use with Dash and Plotly.

Project description

convert-html-to-dash

A conversion tool to turn html/bootstrap into Python code for use with Dash and Plotly

convert-html-to-dash on pypi

pip install convert-html-to-dash==0.1

python -m convert-html-to-dash -h

usage: convert.py [-h] [-i INFILE] [-o OUTFILE] [-p PRIORITY_LIST]

Convert HTML into Python Code for Dash with bootstrap


optional arguments:
  -h, --help        show this help message and exit
  -i INFILE         input file
  -o OUTFILE        output file
  -p PRIORITY_LIST  priority list for replacing tags.
                    Options: dcc = dash_core_components, dbc = dash_bootstrap_components, html = dash_html_components
                    Exanple: -p dbc -p html -p dcc
                    Default Order: dcc, dbc, html
                    Note: You can omit a modules too ie. -p html would only use html components

python -m convert-html-to-dash -i infile.html -o outfile.html

  dbc.Container(
      className="container",
      children=[
          html.H1(children=["Some Test Information"]),
          dbc.Row(
              className="row",
              children=[
                dbc.Col(className="col", children=[]),
                ...

python -m convert-html-to-dash -i infile.html -o outfile.html -p html

html.Div(
    className="container",
    children=[
        html.H1(children=["Some Test Information"]),
        html.Div(
            className="row",
            children=[
                html.Div(className="col", children=[]),
                ...

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

convert-html-to-dash-0.1.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

convert_html_to_dash-0.1.1-py2.py3-none-any.whl (4.8 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