File: __init__.py

package info (click to toggle)
plotly 5.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 90,200 kB
  • sloc: python: 368,793; javascript: 213,159; sh: 49; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 591 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from plotly.io.json import to_json_plotly
import os
from templategen.definitions import builders

here = os.path.dirname(os.path.abspath(__file__))
package_dir = os.path.dirname(here)
if __name__ == "__main__":

    for template_name in builders:
        template = builders[template_name]()

        with open(
            os.path.join(
                package_dir,
                "plotly",
                "package_data",
                "templates",
                "%s.json" % template_name,
            ),
            "w",
        ) as f:
            f.write(to_json_plotly(template))