semvec/pypi-packages huggingface dataset:
convert-html-to-dash 0.1.2
A conversion tool to turn html/bootstrap into Python code for use with Dash and Plotly.
License: MIT
Requires Python: >=3.6.0

# convert-html-to-dash

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

I find the interactive mode most useful, but exiting the program from interactive mode is unreliable.

This conversion only does so much. There are plenty of things that aren't converted fully such as dropdowns. This just creates a base framework. There is no intention of pushing the conversion process further at this time.

[convert-html-to-dash on pypi](https://pypi.org/project/convert-html-to-dash/0.1/)

```pip install convert-html-to-dash```

```
$ python -m convert-html-to-dash -h
usage: __main__.py [-h] [-f FIL] [-o OUTFILE] [-i] [-p PRIORITY_LIST]

Convert HTML into Python Code for Dash with bootstrap

optional arguments:
  -h, --help        show this help message and exit
  -f FIL            input file
  -o OUTFILE        output file
  -i                Interactive mode. (ctrl-c, ctrl-v, then add a terminating character. windows: ctrl-z, linux: ctrl-d.
  -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

```

`python -m convert-html-to-dash -f infile.html -o outfile.py`
```
  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 -f infile.html -o outfile.py -p html`
```
html.Div(
    className="container",
    children=[
        html.H1(children=["Some Test Information"]),
        html.Div(
            className="row",
            children=[
                html.Div(className="col", children=[]),
                ...
```
drawio2pdf 0.0.0
Scrpit to convert your beautiful draw.io drawings into pdfs.
License: MIT
Requires Python: >=3.6.2
Keywords: automation graphics inkscape drawio pdf

# DrawIO2PDF

## Intro
Always wondered how to make beautiful mathematical figures with latex inside
them? You can use [tikz](https://texample.net/tikz/examples/) but it's learning
curve is steep and many only ascended people can use it fluently. How about
[draw.io](https://app.diagrams.net/)? It allows you to make beautiful figures.
What's better, you can latex-type there. But what is that? Have you tried to
export it into PDF? No? I don't recommend that if you have a figure full of
maths and you still want to have your eyes unharmed.

This is why I created this tool. You can export your figures from draw.io
without worrying that it will break any math font. The output is essentially
unrecognizable from a standard tikz figure. It will look beautiful in your PDF
document and since it's a vector graphic, everyone can zoom in to take a deeper
look into your diagram.

## Requirements

- [inkscape](https://inkscape.org/) >= 1.0
- pdflatex (I use `sudo apt-get install texlive-full` for that)
- python  >= 3.6


## Installation

From the pip repository:
```
pip install drawio2pdf
```

or from git:
```
pip install git+https://github.com/kacperkan/drawio2pdf/
```


## Usage
1. Create your beautiful diagram, using latex formulas and so on.
2. Disable `Extras > Mathematical Typesetting`.
3. Export your diagram with SVG.
4. `drawio2pdf <path-where-you-saved-your-svg>.`

![process](example/awesome-diagram.gif)

The script will a PDF in the same folder and the same file name.

The result:

![result](example/awesome-diagram.jpg)

## FAQ
**Q: I get `AssertionError: Incorrect PDF latex generation` while running you script!**

A: I met these issue personally in one of the following cases:
- I didn't have `pdflatex` or `inkscape` that was runnable from the console
- I accidentally put a new line in the math formula. When using `Mathematical
  Typesetting`, draw.io will render it correctly. However, the SVG file content
  will be completely broken and it's not that obvious how to parse it with the
  `ETree` in python. **Solution:** Remove any newline in mathematical formulas
  so they're one liners
- I totally forgot to turn `Mathematical Typesetting` off.
<br/>
<br/>

## Licence
This project is licensed under the terms of the MIT license.