Skip to content

Commit d13a0f4

Browse files
committed
Update docs
1 parent 823c42f commit d13a0f4

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![license](https://img.shields.io/pypi/l/table2ascii)](https://github.com/DenverCoder1/table2ascii/blob/main/LICENSE)
77
[![Discord](https://img.shields.io/discord/819650821314052106?color=5865F2&logo=discord&logoColor=white "Dev Pro Tips Discussion & Support Server")](https://discord.gg/fPrdqh3Zfu)
88

9-
Module for converting 2D Python lists to fancy ASCII/Unicode tables
9+
Library for converting 2D Python lists to fancy ASCII/Unicode tables
1010

1111
## 📥 Installation
1212

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ table2ascii
33

44
|build| |version| |downloads| |license| |Discord|
55

6-
Module for converting 2D Python lists to fancy ASCII/Unicode tables
6+
Library for converting 2D Python lists to fancy ASCII/Unicode tables
77

88
Check out the :doc:`usage` section for further information
99

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ requires = [
33
"setuptools>=42",
44
"wheel"
55
]
6-
build-backend = "setuptools.build_meta"
6+
build-backend = "setuptools.build_meta"
7+
8+
[project]
9+
name = "table2ascii"
10+
authors = [{name = "Jonah Lawrence", email = "jonah@freshidea.com"}]
11+
dynamic = ["version", "description"]

setup.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# /usr/bin/env python
22
import os
3+
import re
34
from setuptools import setup
4-
from setuptools.command.test import test as TestCommand, Command
5+
from setuptools.command.test import test as Command
56

67

78
class LintCommand(Command):
@@ -38,6 +39,17 @@ def run(self):
3839
raise SystemExit(report.total_errors > 0)
3940

4041

42+
def version():
43+
version = ""
44+
with open("table2ascii/__init__.py") as f:
45+
version = re.search(
46+
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE
47+
).group(1)
48+
if not version:
49+
raise RuntimeError("version is not set")
50+
return version
51+
52+
4153
def long_description():
4254
# check if README.md exists
4355
if not os.path.exists("README.md"):
@@ -56,7 +68,7 @@ def requirements():
5668

5769
setup(
5870
name="table2ascii",
59-
version="0.1.2",
71+
version=version(),
6072
author="Jonah Lawrence",
6173
author_email="jonah@freshidea.com",
6274
description="Convert 2D Python lists into Unicode/Ascii tables",

table2ascii/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
"""
2+
table2ascii - Library for converting 2D Python lists to fancy ASCII/Unicode tables
3+
"""
4+
15
from .alignment import Alignment
26
from .preset_style import PresetStyle
37
from .table_style import TableStyle
48
from .table_to_ascii import table2ascii
59

10+
__version__ = "0.1.2"
11+
612
__all__ = [
713
"table2ascii",
814
"Alignment",

0 commit comments

Comments
 (0)