File: gen_example_title.py

package info (click to toggle)
python-pylatex 1.4.2%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,044 kB
  • sloc: python: 3,810; sh: 209; makefile: 169; xml: 12
file content (12 lines) | stat: -rw-r--r-- 193 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import sys

title = sys.argv[1]

if title.endswith("_ex"):
    title = title[:-3]

title = title.replace("_", " ")
title = title.capitalize() + " example"

print(title)
print(len(title) * "=")