File: run.py

package info (click to toggle)
txt2tags 3.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,160 kB
  • sloc: python: 3,002; sh: 45; makefile: 35
file content (25 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os.path
import sys

DIR = os.path.dirname(os.path.abspath(__file__))
REPO = os.path.dirname(os.path.dirname(DIR))

sys.path.insert(0, "..")
import lib

del sys.path[0]

sys.path.insert(0, REPO)
import txt2tags

del sys.path[0]


def run():
    infile = os.path.join(REPO, "samples", "sample.t2t")
    for target in txt2tags.TARGETS:
        outfile = "sample." + target
        cmdline = ["-t", target, "-o", outfile, infile]
        okfile = os.path.join(REPO, "samples", outfile)
        print(" ", target, end=" ")
        lib.test(cmdline, outfile, okfile=okfile)