File: tempita.py

package info (click to toggle)
python-siphash24 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 192 kB
  • sloc: python: 108; makefile: 5
file content (10 lines) | stat: -rw-r--r-- 307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# SPDX-FileCopyrightText: Daniele Nicolodi <daniele@grinta.net>
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

import sys
from pathlib import Path
from Cython.Tempita import sub

template = Path(sys.argv[1]).read_text('utf8')
output = sub(template)
Path(sys.argv[2]).write_text(output, 'utf8')