Sha256: 5b960b20103024ffd62ef5f257634f875e3ae24cc066ffc86b7fa5ec80d3c23e

Contents?: true

Size: 436 Bytes

Versions: 7

Compression:

Stored size: 436 Bytes

Contents

#!/usr/bin/env python2

import sys

with open("../src/fontMetrics.js", "r") as metrics:
    old_lines = file.readlines(metrics)

replace = sys.stdin.read()

with open("../src/fontMetrics.js", "w") as output:
    for line in old_lines:
        if line.startswith("var metricMap"):
            output.write("var metricMap = ")
            output.write(replace)
            output.write(";\n")
        else:
            output.write(line)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyhyhy-1.0.0 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.9 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.8 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.7 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.6 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.5 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py
hyhyhy-0.0.4 lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py