textinimage-canvas 0.1.0__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.
- textinimage_canvas-0.1.0/LICENSE +21 -0
- textinimage_canvas-0.1.0/PKG-INFO +96 -0
- textinimage_canvas-0.1.0/README.md +80 -0
- textinimage_canvas-0.1.0/pyproject.toml +22 -0
- textinimage_canvas-0.1.0/python/tests/test_pkg.py +13 -0
- textinimage_canvas-0.1.0/python/textinimage_canvas/__init__.py +30 -0
- textinimage_canvas-0.1.0/python/textinimage_canvas.egg-info/PKG-INFO +96 -0
- textinimage_canvas-0.1.0/python/textinimage_canvas.egg-info/SOURCES.txt +9 -0
- textinimage_canvas-0.1.0/python/textinimage_canvas.egg-info/dependency_links.txt +1 -0
- textinimage_canvas-0.1.0/python/textinimage_canvas.egg-info/top_level.txt +2 -0
- textinimage_canvas-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ethan Brooks
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: textinimage-canvas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
|
|
5
|
+
Author-email: Ethan Brooks <ethanbrooks5827@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://textinimage.com/
|
|
8
|
+
Project-URL: Documentation, https://textinimage.com/
|
|
9
|
+
Project-URL: Repository, https://github.com/ethanbrooks5827/textinimage-canvas
|
|
10
|
+
Project-URL: Issues, https://github.com/ethanbrooks5827/textinimage-canvas/issues
|
|
11
|
+
Keywords: html5-canvas,typography,caption-generator,speech-bubble,circle-text
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# textinimage-canvas
|
|
18
|
+
|
|
19
|
+
Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
|
|
20
|
+
|
|
21
|
+
Built as a lightweight, zero-dependency reference toolkit for [Text in Image](https://textinimage.com/).
|
|
22
|
+
|
|
23
|
+
## Supported Presets
|
|
24
|
+
|
|
25
|
+
| Preset ID | Ratio / Scale | Guidance |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `caption-top-strip` | `4:5` | add white header strip above photo with centered bold sans-serif caption |
|
|
28
|
+
| `speech-bubble` | `1:1` | rounded comic dialogue bubble with dynamic tail anchor toward subject |
|
|
29
|
+
| `dseg7-datestamp` | `3:2` | retro 90s digital camera orange 7-segment date stamp in bottom-right safe zone |
|
|
30
|
+
| `circle-badge` | `1:1` | polar arc glyph placement around outer radius with balanced kerning |
|
|
31
|
+
| `quote-overlay` | `4:5` | high-contrast quote typography with round-join outline and soft drop shadow |
|
|
32
|
+
|
|
33
|
+
## Quick Usage
|
|
34
|
+
|
|
35
|
+
### JavaScript / TypeScript (NPM & JSR)
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import { listPresets, getPreset, buildWorkflowUrl } from 'textinimage-canvas';
|
|
39
|
+
|
|
40
|
+
console.log(listPresets().map((p) => p.id));
|
|
41
|
+
console.log(getPreset('caption-top-strip'));
|
|
42
|
+
console.log(buildWorkflowUrl());
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Python (PyPI)
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from textinimage_canvas import list_presets, get_preset, build_workflow_url
|
|
49
|
+
|
|
50
|
+
print([p["id"] for p in list_presets()])
|
|
51
|
+
print(get_preset("caption-top-strip"))
|
|
52
|
+
print(build_workflow_url())
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Go (`pkg.go.dev`)
|
|
56
|
+
|
|
57
|
+
```go
|
|
58
|
+
package main
|
|
59
|
+
|
|
60
|
+
import (
|
|
61
|
+
"fmt"
|
|
62
|
+
pkg "github.com/ethanbrooks5827/textinimage-canvas"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
func main() {
|
|
66
|
+
fmt.Println(pkg.HomepageURL)
|
|
67
|
+
fmt.Println(len(pkg.ListPresets()))
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Rust (`crates.io`)
|
|
72
|
+
|
|
73
|
+
```rust
|
|
74
|
+
use textinimage_canvas::{HOMEPAGE_URL, list_presets, get_preset};
|
|
75
|
+
|
|
76
|
+
fn main() {
|
|
77
|
+
println!("{}", HOMEPAGE_URL);
|
|
78
|
+
assert!(get_preset("caption-top-strip").is_some());
|
|
79
|
+
assert!(!list_presets().is_empty());
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Reference Pages
|
|
84
|
+
|
|
85
|
+
- [Text in Image](https://textinimage.com/)
|
|
86
|
+
- [Add Caption to Photo](https://textinimage.com/add-caption-to-photo)
|
|
87
|
+
- [Speech Bubble Generator](https://textinimage.com/speech-bubble-generator)
|
|
88
|
+
- [Add Date Stamp to Photo](https://textinimage.com/add-date-stamp-to-photo)
|
|
89
|
+
- [Circle Text Generator](https://textinimage.com/circle-text-generator)
|
|
90
|
+
- [AI Text Effects](https://textinimage.com/ai-text-effects)
|
|
91
|
+
- [About](https://textinimage.com/about)
|
|
92
|
+
- [Pricing](https://textinimage.com/pricing)
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# textinimage-canvas
|
|
2
|
+
|
|
3
|
+
Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
|
|
4
|
+
|
|
5
|
+
Built as a lightweight, zero-dependency reference toolkit for [Text in Image](https://textinimage.com/).
|
|
6
|
+
|
|
7
|
+
## Supported Presets
|
|
8
|
+
|
|
9
|
+
| Preset ID | Ratio / Scale | Guidance |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `caption-top-strip` | `4:5` | add white header strip above photo with centered bold sans-serif caption |
|
|
12
|
+
| `speech-bubble` | `1:1` | rounded comic dialogue bubble with dynamic tail anchor toward subject |
|
|
13
|
+
| `dseg7-datestamp` | `3:2` | retro 90s digital camera orange 7-segment date stamp in bottom-right safe zone |
|
|
14
|
+
| `circle-badge` | `1:1` | polar arc glyph placement around outer radius with balanced kerning |
|
|
15
|
+
| `quote-overlay` | `4:5` | high-contrast quote typography with round-join outline and soft drop shadow |
|
|
16
|
+
|
|
17
|
+
## Quick Usage
|
|
18
|
+
|
|
19
|
+
### JavaScript / TypeScript (NPM & JSR)
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { listPresets, getPreset, buildWorkflowUrl } from 'textinimage-canvas';
|
|
23
|
+
|
|
24
|
+
console.log(listPresets().map((p) => p.id));
|
|
25
|
+
console.log(getPreset('caption-top-strip'));
|
|
26
|
+
console.log(buildWorkflowUrl());
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Python (PyPI)
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from textinimage_canvas import list_presets, get_preset, build_workflow_url
|
|
33
|
+
|
|
34
|
+
print([p["id"] for p in list_presets()])
|
|
35
|
+
print(get_preset("caption-top-strip"))
|
|
36
|
+
print(build_workflow_url())
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Go (`pkg.go.dev`)
|
|
40
|
+
|
|
41
|
+
```go
|
|
42
|
+
package main
|
|
43
|
+
|
|
44
|
+
import (
|
|
45
|
+
"fmt"
|
|
46
|
+
pkg "github.com/ethanbrooks5827/textinimage-canvas"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
func main() {
|
|
50
|
+
fmt.Println(pkg.HomepageURL)
|
|
51
|
+
fmt.Println(len(pkg.ListPresets()))
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Rust (`crates.io`)
|
|
56
|
+
|
|
57
|
+
```rust
|
|
58
|
+
use textinimage_canvas::{HOMEPAGE_URL, list_presets, get_preset};
|
|
59
|
+
|
|
60
|
+
fn main() {
|
|
61
|
+
println!("{}", HOMEPAGE_URL);
|
|
62
|
+
assert!(get_preset("caption-top-strip").is_some());
|
|
63
|
+
assert!(!list_presets().is_empty());
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Reference Pages
|
|
68
|
+
|
|
69
|
+
- [Text in Image](https://textinimage.com/)
|
|
70
|
+
- [Add Caption to Photo](https://textinimage.com/add-caption-to-photo)
|
|
71
|
+
- [Speech Bubble Generator](https://textinimage.com/speech-bubble-generator)
|
|
72
|
+
- [Add Date Stamp to Photo](https://textinimage.com/add-date-stamp-to-photo)
|
|
73
|
+
- [Circle Text Generator](https://textinimage.com/circle-text-generator)
|
|
74
|
+
- [AI Text Effects](https://textinimage.com/ai-text-effects)
|
|
75
|
+
- [About](https://textinimage.com/about)
|
|
76
|
+
- [Pricing](https://textinimage.com/pricing)
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "textinimage-canvas"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [{name = "Ethan Brooks", email = "ethanbrooks5827@gmail.com"}]
|
|
13
|
+
keywords = ["html5-canvas", "typography", "caption-generator", "speech-bubble", "circle-text"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Homepage = "https://textinimage.com/"
|
|
17
|
+
Documentation = "https://textinimage.com/"
|
|
18
|
+
Repository = "https://github.com/ethanbrooks5827/textinimage-canvas"
|
|
19
|
+
Issues = "https://github.com/ethanbrooks5827/textinimage-canvas/issues"
|
|
20
|
+
|
|
21
|
+
[tool.setuptools.packages.find]
|
|
22
|
+
where = ["python"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from textinimage_canvas import HOMEPAGE_URL, list_presets, get_preset, build_workflow_url
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TestPkg(unittest.TestCase):
|
|
6
|
+
def test_presets(self):
|
|
7
|
+
self.assertGreaterEqual(len(list_presets()), 5)
|
|
8
|
+
self.assertEqual(get_preset("caption-top-strip")["id"], "caption-top-strip")
|
|
9
|
+
self.assertEqual(build_workflow_url(), HOMEPAGE_URL)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if __name__ == "__main__":
|
|
13
|
+
unittest.main()
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Lightweight preset metadata and URL helpers for Text in Image (https://textinimage.com/)."""
|
|
2
|
+
|
|
3
|
+
HOMEPAGE_URL = "https://textinimage.com/"
|
|
4
|
+
|
|
5
|
+
_PRESETS = [
|
|
6
|
+
{"id": "caption-top-strip", "ratio_or_scale": "4:5", "description": "add white header strip above photo with centered bold sans-serif caption"},
|
|
7
|
+
{"id": "speech-bubble", "ratio_or_scale": "1:1", "description": "rounded comic dialogue bubble with dynamic tail anchor toward subject"},
|
|
8
|
+
{"id": "dseg7-datestamp", "ratio_or_scale": "3:2", "description": "retro 90s digital camera orange 7-segment date stamp in bottom-right safe zone"},
|
|
9
|
+
{"id": "circle-badge", "ratio_or_scale": "1:1", "description": "polar arc glyph placement around outer radius with balanced kerning"},
|
|
10
|
+
{"id": "quote-overlay", "ratio_or_scale": "4:5", "description": "high-contrast quote typography with round-join outline and soft drop shadow"}
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def list_presets():
|
|
15
|
+
return [dict(item) for item in _PRESETS]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_preset(preset_id: str):
|
|
19
|
+
key = preset_id.strip().lower()
|
|
20
|
+
for item in _PRESETS:
|
|
21
|
+
if item["id"] == key:
|
|
22
|
+
return dict(item)
|
|
23
|
+
return None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def build_workflow_url(path: str = "") -> str:
|
|
27
|
+
clean = path.strip().lstrip("/")
|
|
28
|
+
if not clean:
|
|
29
|
+
return HOMEPAGE_URL
|
|
30
|
+
return f"{HOMEPAGE_URL.rstrip('/')}/{clean}"
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: textinimage-canvas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
|
|
5
|
+
Author-email: Ethan Brooks <ethanbrooks5827@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://textinimage.com/
|
|
8
|
+
Project-URL: Documentation, https://textinimage.com/
|
|
9
|
+
Project-URL: Repository, https://github.com/ethanbrooks5827/textinimage-canvas
|
|
10
|
+
Project-URL: Issues, https://github.com/ethanbrooks5827/textinimage-canvas/issues
|
|
11
|
+
Keywords: html5-canvas,typography,caption-generator,speech-bubble,circle-text
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# textinimage-canvas
|
|
18
|
+
|
|
19
|
+
Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
|
|
20
|
+
|
|
21
|
+
Built as a lightweight, zero-dependency reference toolkit for [Text in Image](https://textinimage.com/).
|
|
22
|
+
|
|
23
|
+
## Supported Presets
|
|
24
|
+
|
|
25
|
+
| Preset ID | Ratio / Scale | Guidance |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `caption-top-strip` | `4:5` | add white header strip above photo with centered bold sans-serif caption |
|
|
28
|
+
| `speech-bubble` | `1:1` | rounded comic dialogue bubble with dynamic tail anchor toward subject |
|
|
29
|
+
| `dseg7-datestamp` | `3:2` | retro 90s digital camera orange 7-segment date stamp in bottom-right safe zone |
|
|
30
|
+
| `circle-badge` | `1:1` | polar arc glyph placement around outer radius with balanced kerning |
|
|
31
|
+
| `quote-overlay` | `4:5` | high-contrast quote typography with round-join outline and soft drop shadow |
|
|
32
|
+
|
|
33
|
+
## Quick Usage
|
|
34
|
+
|
|
35
|
+
### JavaScript / TypeScript (NPM & JSR)
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import { listPresets, getPreset, buildWorkflowUrl } from 'textinimage-canvas';
|
|
39
|
+
|
|
40
|
+
console.log(listPresets().map((p) => p.id));
|
|
41
|
+
console.log(getPreset('caption-top-strip'));
|
|
42
|
+
console.log(buildWorkflowUrl());
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Python (PyPI)
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from textinimage_canvas import list_presets, get_preset, build_workflow_url
|
|
49
|
+
|
|
50
|
+
print([p["id"] for p in list_presets()])
|
|
51
|
+
print(get_preset("caption-top-strip"))
|
|
52
|
+
print(build_workflow_url())
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Go (`pkg.go.dev`)
|
|
56
|
+
|
|
57
|
+
```go
|
|
58
|
+
package main
|
|
59
|
+
|
|
60
|
+
import (
|
|
61
|
+
"fmt"
|
|
62
|
+
pkg "github.com/ethanbrooks5827/textinimage-canvas"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
func main() {
|
|
66
|
+
fmt.Println(pkg.HomepageURL)
|
|
67
|
+
fmt.Println(len(pkg.ListPresets()))
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Rust (`crates.io`)
|
|
72
|
+
|
|
73
|
+
```rust
|
|
74
|
+
use textinimage_canvas::{HOMEPAGE_URL, list_presets, get_preset};
|
|
75
|
+
|
|
76
|
+
fn main() {
|
|
77
|
+
println!("{}", HOMEPAGE_URL);
|
|
78
|
+
assert!(get_preset("caption-top-strip").is_some());
|
|
79
|
+
assert!(!list_presets().is_empty());
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Reference Pages
|
|
84
|
+
|
|
85
|
+
- [Text in Image](https://textinimage.com/)
|
|
86
|
+
- [Add Caption to Photo](https://textinimage.com/add-caption-to-photo)
|
|
87
|
+
- [Speech Bubble Generator](https://textinimage.com/speech-bubble-generator)
|
|
88
|
+
- [Add Date Stamp to Photo](https://textinimage.com/add-date-stamp-to-photo)
|
|
89
|
+
- [Circle Text Generator](https://textinimage.com/circle-text-generator)
|
|
90
|
+
- [AI Text Effects](https://textinimage.com/ai-text-effects)
|
|
91
|
+
- [About](https://textinimage.com/about)
|
|
92
|
+
- [Pricing](https://textinimage.com/pricing)
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
python/tests/test_pkg.py
|
|
5
|
+
python/textinimage_canvas/__init__.py
|
|
6
|
+
python/textinimage_canvas.egg-info/PKG-INFO
|
|
7
|
+
python/textinimage_canvas.egg-info/SOURCES.txt
|
|
8
|
+
python/textinimage_canvas.egg-info/dependency_links.txt
|
|
9
|
+
python/textinimage_canvas.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|