drawlib 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of drawlib might be problematic. Click here for more details.
- drawlib-0.1.2/PKG-INFO +65 -0
- drawlib-0.1.2/README.md +46 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/__init__.py +1 -1
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/download.py +5 -5
- {drawlib-0.1.1 → drawlib-0.1.2}/pyproject.toml +12 -9
- drawlib-0.1.1/PKG-INFO +0 -36
- drawlib-0.1.1/README.md +0 -19
- {drawlib-0.1.1 → drawlib-0.1.2}/LICENSE.txt +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/.pylintrc +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/__main__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/apis.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/assets/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/assets/v0_1/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/assets/v0_1/fonticons/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/assets/v0_1/fonts/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/__main__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/apis.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/arg_validator.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/command.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/colors.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/dimage.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/fonts.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/model.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/model_validator.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/theme.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core/util.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/base.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/canvas.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/image.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/line.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/original_arrow.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/original_polygon.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/patches.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/core_canvas/text.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/dutil.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/icons/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/icons/phosphor.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/icons/util.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/logging.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/settings.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/__init__.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/cycle.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/dsart.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/groups.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/pyramid.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/sourcecode.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/table.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/smartarts/tree.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/tools.py +0 -0
- {drawlib-0.1.1 → drawlib-0.1.2}/drawlib/v0_1/private/util.py +0 -0
drawlib-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: drawlib
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python drawing library. Illustration as Code.
|
|
5
|
+
Home-page: https://www.drawlib.com
|
|
6
|
+
Author: Yuichi Ito
|
|
7
|
+
Author-email: yuichi@yuichi.com
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Dist: matplotlib (>=3.8.3,<4.0.0)
|
|
15
|
+
Requires-Dist: pygments (>=2.17.2,<3.0.0)
|
|
16
|
+
Project-URL: Repository, https://github.com/yuichi110/drawlib
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
## About
|
|
20
|
+
|
|
21
|
+
Drawlib is a Python drawing library designed to achieve *Illustration as Code*.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
In this example, we import drawlib APIs and call the `circle()` function. We provide XY coordinates, radius, and optional style. If a style is not provided, the default style (which you can manage) is applied.
|
|
26
|
+
|
|
27
|
+
Drawlib offers a range of basic drawing features, including:
|
|
28
|
+
|
|
29
|
+
- Icon
|
|
30
|
+
- Image
|
|
31
|
+
- Line and Arrow-line
|
|
32
|
+
- Shape
|
|
33
|
+
- Text
|
|
34
|
+
- Others
|
|
35
|
+
|
|
36
|
+
All with a consistent syntax.
|
|
37
|
+
|
|
38
|
+
It's important to note that drawlib is a pure Python library. This means you can leverage the entire Python ecosystem, including:
|
|
39
|
+
|
|
40
|
+
- Accessing library help and code completion via IDEs.
|
|
41
|
+
- Using programming constructs such as creating functions for grouping drawing tasks and using loops.
|
|
42
|
+
|
|
43
|
+
## Why Illustration as Code
|
|
44
|
+
|
|
45
|
+
In today's world, many technical documents are managed using version control systems such as Git.
|
|
46
|
+
However, managing illustrations poses a challenge as they are typically binary files rather than text-based.
|
|
47
|
+
Drawlib offers a solution by generating illustrations from pure Python code.
|
|
48
|
+
This means that if you create your illustrations using Python and drawlib, you can manage them using version control systems too.
|
|
49
|
+
|
|
50
|
+
Drawlib is optimized for drawing a large number of illustrations with a consistent style.
|
|
51
|
+
You can easily achieve this by creating a theme file (which is simply Python code) and importing it into your illustration codes (also Python code).
|
|
52
|
+
Here is a typical use case of drawlib.
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please check out our documentation.
|
|
57
|
+
|
|
58
|
+
## Links
|
|
59
|
+
|
|
60
|
+
- [Documentation](https://www.drawlib.com)
|
|
61
|
+
- [PyPI](https://pypi.org/project/drawlib/)
|
|
62
|
+
- [Code repository](https://github.com/yuichi110/drawlib)
|
|
63
|
+
- [Docs repository](https://github.com/yuichi110/drawlib_docs)
|
|
64
|
+
- [Assets repository](https://github.com/yuichi110/drawlib_assets)
|
|
65
|
+
|
drawlib-0.1.2/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## About
|
|
2
|
+
|
|
3
|
+
Drawlib is a Python drawing library designed to achieve *Illustration as Code*.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
In this example, we import drawlib APIs and call the `circle()` function. We provide XY coordinates, radius, and optional style. If a style is not provided, the default style (which you can manage) is applied.
|
|
8
|
+
|
|
9
|
+
Drawlib offers a range of basic drawing features, including:
|
|
10
|
+
|
|
11
|
+
- Icon
|
|
12
|
+
- Image
|
|
13
|
+
- Line and Arrow-line
|
|
14
|
+
- Shape
|
|
15
|
+
- Text
|
|
16
|
+
- Others
|
|
17
|
+
|
|
18
|
+
All with a consistent syntax.
|
|
19
|
+
|
|
20
|
+
It's important to note that drawlib is a pure Python library. This means you can leverage the entire Python ecosystem, including:
|
|
21
|
+
|
|
22
|
+
- Accessing library help and code completion via IDEs.
|
|
23
|
+
- Using programming constructs such as creating functions for grouping drawing tasks and using loops.
|
|
24
|
+
|
|
25
|
+
## Why Illustration as Code
|
|
26
|
+
|
|
27
|
+
In today's world, many technical documents are managed using version control systems such as Git.
|
|
28
|
+
However, managing illustrations poses a challenge as they are typically binary files rather than text-based.
|
|
29
|
+
Drawlib offers a solution by generating illustrations from pure Python code.
|
|
30
|
+
This means that if you create your illustrations using Python and drawlib, you can manage them using version control systems too.
|
|
31
|
+
|
|
32
|
+
Drawlib is optimized for drawing a large number of illustrations with a consistent style.
|
|
33
|
+
You can easily achieve this by creating a theme file (which is simply Python code) and importing it into your illustration codes (also Python code).
|
|
34
|
+
Here is a typical use case of drawlib.
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please check out our documentation.
|
|
39
|
+
|
|
40
|
+
## Links
|
|
41
|
+
|
|
42
|
+
- [Documentation](https://www.drawlib.com)
|
|
43
|
+
- [PyPI](https://pypi.org/project/drawlib/)
|
|
44
|
+
- [Code repository](https://github.com/yuichi110/drawlib)
|
|
45
|
+
- [Docs repository](https://github.com/yuichi110/drawlib_docs)
|
|
46
|
+
- [Assets repository](https://github.com/yuichi110/drawlib_assets)
|
|
@@ -39,7 +39,7 @@ def download_if_not_exist(file_path: str, download_url: str, md5_hash: str):
|
|
|
39
39
|
fout.write(data)
|
|
40
40
|
|
|
41
41
|
except Exception as e:
|
|
42
|
-
raise RuntimeError(e)
|
|
42
|
+
raise RuntimeError(f"File download error happens. {str(e)}")
|
|
43
43
|
|
|
44
44
|
# if file exist and checksum ok, do nothing
|
|
45
45
|
if is_file_exist():
|
|
@@ -47,12 +47,12 @@ def download_if_not_exist(file_path: str, download_url: str, md5_hash: str):
|
|
|
47
47
|
return
|
|
48
48
|
|
|
49
49
|
# if file not exist or checksum has problem, try download
|
|
50
|
-
logger.info(f'No font
|
|
50
|
+
logger.info(f'No font on local machine. Downloading from "{download_url}".')
|
|
51
51
|
download()
|
|
52
52
|
|
|
53
53
|
# after download, check file exist and checksum
|
|
54
54
|
if not is_file_exist():
|
|
55
|
-
raise RuntimeError()
|
|
55
|
+
raise RuntimeError("File download completed. But not saved. Abort.")
|
|
56
56
|
if not is_checksum_correct():
|
|
57
|
-
raise RuntimeError()
|
|
58
|
-
logger.info("Download completed.")
|
|
57
|
+
raise RuntimeError("File download completed. But checksum has problem. Abort.")
|
|
58
|
+
logger.info("Download completed without troubles.")
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [ "poetry-core",]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
1
5
|
[tool.poetry]
|
|
2
6
|
name = "drawlib"
|
|
3
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
4
8
|
description = "Python drawing library. Illustration as Code."
|
|
5
|
-
|
|
9
|
+
homepage = "https://www.drawlib.com"
|
|
10
|
+
repository = "https://github.com/yuichi110/drawlib"
|
|
11
|
+
authors = [ "Yuichi Ito <yuichi@yuichi.com>",]
|
|
6
12
|
readme = "README.md"
|
|
7
13
|
|
|
14
|
+
[tool.black]
|
|
15
|
+
line-length = 120
|
|
16
|
+
|
|
8
17
|
[tool.poetry.dependencies]
|
|
9
18
|
python = "^3.9"
|
|
10
19
|
matplotlib = "^3.8.3"
|
|
@@ -22,10 +31,4 @@ pytest-cov = "^5.0.0"
|
|
|
22
31
|
pydocstyle = "^6.3.0"
|
|
23
32
|
sphinx = "^7.2.6"
|
|
24
33
|
sphinx-rtd-theme = "^2.0.0"
|
|
25
|
-
|
|
26
|
-
[tool.black]
|
|
27
|
-
line-length = 120
|
|
28
|
-
|
|
29
|
-
[build-system]
|
|
30
|
-
requires = ["poetry-core"]
|
|
31
|
-
build-backend = "poetry.core.masonry.api"
|
|
34
|
+
toml = "^0.10.2"
|
drawlib-0.1.1/PKG-INFO
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: drawlib
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Python drawing library. Illustration as Code.
|
|
5
|
-
Author: Yuichi Ito
|
|
6
|
-
Author-email: yuichi@yuichi.com
|
|
7
|
-
Requires-Python: >=3.9,<4.0
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Requires-Dist: matplotlib (>=3.8.3,<4.0.0)
|
|
14
|
-
Requires-Dist: pygments (>=2.17.2,<3.0.0)
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
|
-
# drawlib
|
|
18
|
-
|
|
19
|
-
## About
|
|
20
|
-
|
|
21
|
-
drawlib is a Python drawing library designed to achieve *Illustration as Code*.
|
|
22
|
-
|
|
23
|
-
In today's world, many technical documents are managed using version control systems such as Git.
|
|
24
|
-
However, managing illustrations poses a challenge as they are typically binary files rather than text-based. drawlib offers a solution by generating illustrations from pure Python code.
|
|
25
|
-
This means that if you create your illustrations using Python and drawlib, you can manage them using version control systems too.
|
|
26
|
-
|
|
27
|
-
drawlib is optimized for drawing a large number of illustrations with a consistent style.
|
|
28
|
-
You can easily achieve this by creating a theme file (which is simply a Python code) and importing it into your illustration codes (also Python code).
|
|
29
|
-
Additionally, you can leverage the Python ecosystem, including:
|
|
30
|
-
- accessing library help and code completion via IDEs,
|
|
31
|
-
- using programming constructs such as creating functions for grouping drawing tasks and using loops.
|
|
32
|
-
|
|
33
|
-
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please give it a try.
|
|
34
|
-
|
|
35
|
-
Enjoy!
|
|
36
|
-
|
drawlib-0.1.1/README.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# drawlib
|
|
2
|
-
|
|
3
|
-
## About
|
|
4
|
-
|
|
5
|
-
drawlib is a Python drawing library designed to achieve *Illustration as Code*.
|
|
6
|
-
|
|
7
|
-
In today's world, many technical documents are managed using version control systems such as Git.
|
|
8
|
-
However, managing illustrations poses a challenge as they are typically binary files rather than text-based. drawlib offers a solution by generating illustrations from pure Python code.
|
|
9
|
-
This means that if you create your illustrations using Python and drawlib, you can manage them using version control systems too.
|
|
10
|
-
|
|
11
|
-
drawlib is optimized for drawing a large number of illustrations with a consistent style.
|
|
12
|
-
You can easily achieve this by creating a theme file (which is simply a Python code) and importing it into your illustration codes (also Python code).
|
|
13
|
-
Additionally, you can leverage the Python ecosystem, including:
|
|
14
|
-
- accessing library help and code completion via IDEs,
|
|
15
|
-
- using programming constructs such as creating functions for grouping drawing tasks and using loops.
|
|
16
|
-
|
|
17
|
-
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please give it a try.
|
|
18
|
-
|
|
19
|
-
Enjoy!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|