Compare commits
3 Commits
8d2fc13cc8
...
173573b790
| Author | SHA1 | Date | |
|---|---|---|---|
| 173573b790 | |||
| b3fa52c8cb | |||
| 8f8dd74c14 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
.idea/
|
.idea/
|
||||||
venv/
|
venv/
|
||||||
result/
|
result/
|
||||||
|
build/
|
||||||
|
*.egg-info
|
||||||
|
__pycache__
|
||||||
|
|||||||
19
pyproject.toml
Normal file
19
pyproject.toml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "tvms"
|
||||||
|
version = "1.0.0"
|
||||||
|
authors = [{name="Ilya Bezrukov", email="bezrukoff888@gmail.com" }]
|
||||||
|
description = "Script collection for TVMS"
|
||||||
|
readme = "README.md"
|
||||||
|
dependencies = ["python-docx", "click"]
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
tvms = "tvms:cli"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
"Homepage" = "https://git.ilbz.ru/brinza/tvms"
|
||||||
|
"Bug Tracker" = "https://git.ilbz.ru/brinza/tvms/issues"
|
||||||
@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -31,6 +29,9 @@ def cli():
|
|||||||
default="./result/table.py")
|
default="./result/table.py")
|
||||||
@click.option("--count", type=int, default=200)
|
@click.option("--count", type=int, default=200)
|
||||||
def random_table(rtype, seed, prec, min, max, cols, docx, py, count):
|
def random_table(rtype, seed, prec, min, max, cols, docx, py, count):
|
||||||
|
os.makedirs(os.path.split(docx)[0], exist_ok=True)
|
||||||
|
os.makedirs(os.path.split(py)[0], exist_ok=True)
|
||||||
|
|
||||||
random.seed(seed)
|
random.seed(seed)
|
||||||
|
|
||||||
rows = count // cols
|
rows = count // cols
|
||||||
@ -54,7 +55,3 @@ def random_table(rtype, seed, prec, min, max, cols, docx, py, count):
|
|||||||
n += 1
|
n += 1
|
||||||
|
|
||||||
document.save(docx)
|
document.save(docx)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
cli()
|
|
||||||
6
tvms/__main__.py
Normal file
6
tvms/__main__.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from tvms import cli
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
cli()
|
||||||
Reference in New Issue
Block a user