You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+25-7
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,14 @@ Proxy Printer
4
4
Generates reasonably good-looking HTML proxies for a card game from an ODS spreadsheet. Useful for making card game prototypes. Comes with some basic CSS; you can add your own style rules to make the proxies prettier or better suited to your game. Does some heuristic text resizing so that text of different lengths is more likely to fit without being too small.
5
5
6
6
7
-
Installing with pip
7
+
Installing (Python 3 required)
8
8
------
9
9
10
-
(Python 3 required)
11
-
12
10
```
13
-
pip3 install proxyprinter
11
+
pip install proxyprinter
14
12
```
15
13
16
-
(You might need to use `sudo` or a VirtualEnv depending on your system setup.)
14
+
(You might need to use a VirtualEnv depending on your system.)
17
15
18
16
19
17
Usage
@@ -23,6 +21,12 @@ Usage
23
21
24
22
Do `proxyprinter --help` for usage statement with all commandline options.
25
23
24
+
There's also an (experimental) GUI, which you can run as:
25
+
26
+
proxyprintergui
27
+
28
+
The GUI provides access to most settings although currently it doesn't let you save them for later.
29
+
26
30
27
31
Input Format
28
32
-------------
@@ -47,12 +51,13 @@ You can customize various settings for your project by adding a `ProxyPrinter Se
47
51
|------------|-------------|------------|
48
52
|`CSSFile`| The filename of an external CSS file to reference. | Put the value in the **2nd row**, same column |
49
53
|`Copyright`| The copyright owner to print at the bottom of the cards. | Put the value in the **2nd row**, same column |
54
+
|`BaseURL`| The base URL for images to use when making Tabletop Simulator exports, e.g. `https://example.com/some/folders/`. | Put the value in the **2nd row**, same column |
50
55
| Text Size Thresholds | Downsize text when it exceeds length thresholds. |[Text Size Thresholds](#text-size-thresholds)|
51
56
| Rich Field Substitution | Substitution patterns to embed special styles or symbols in field text |[Rich Field Substitutions](#rich-field-substitutions)|
52
57
53
58
For any setting defined in the spreadsheet that can also be set by commandline parameter, the commandline parameter overrides it if specified.
54
59
55
-
### Text Size Thresholds ###
60
+
### Text Size Thresholds
56
61
57
62
The Proxy Printer sizes down text for most fields based on the number of characters in it. Depending on how much space you have available for each field, you may need to adjust these thresholds, so that it goes down to medium or small text sizes with less (or more) text.
58
63
@@ -71,7 +76,7 @@ In each row after it, you can define a threshold to use. In each row, put the v
71
76
Any default values you don't redefine remain. Any fields that don't have thresholds defined use the thresholds for `*` (whether you defined it or left it default).
72
77
73
78
74
-
### Rich Field Substitutions ###
79
+
### Rich Field Substitutions
75
80
76
81
To include special styles and images inline in your text, you can define patterns from the spreadsheet values that will map to specific styles in the HTML. For example, you can make it so that `<5 G>` gets replaced with a "5 Gold" icon in the text. (Custom CSS may be necessary, of course.)
77
82
@@ -89,3 +94,16 @@ In each later row, put the following values:
89
94
|[Regular Expression](https://docs.python.org/3/library/re.html) to search for in the text. Example: `\<([0-9]+) G\>`| Text to replace it with. Regular-expression backreferences are allowed. Example: `<span class='gold_coin'>\1</span>`|
90
95
91
96
These substitutions apply after escaping any HTML that appears in the text, so if your pattern needs to match `<` or `>`, you must use the escaped versions `<` and `>` instead. Also, this means your substitutions can include raw HTML.
97
+
98
+
99
+
Tabletop Simulator Export
100
+
-------------------------
101
+
102
+
TTS export is experimental/janky, but the tool _can_ create a zip file with images and JSON files you can then use to import a page of cards into [Tabletop Simulator](https://store.steampowered.com/app/286160/Tabletop_Simulator/) for playing online.
103
+
104
+
1. Set the `BaseURL` in your sheet to the path at a website where you can upload image files
105
+
2. Build the proxy sheet HTML file using these tools
106
+
3. Load the proxy sheet _from a web server_. It won't work if you access it using a `file://` URL (something about HTML5 Canvas security settings). You can use `python -m http.server` from the folder you wrote the output to
107
+
4. Click the "Make ZIP" button (at the end of the card list) and wait. It might take a while and scroll the page a bit before starting a zip file download
108
+
5. Extract the zip and upload the images to the site you set in the Base URL. Optionally add a `back.jpeg` image depicting the card back to use
109
+
6. Move the JSON file from the zip to your Tabletop Simulator's saved objects folder. Open TTS and load the file as a saved object. It might take a few moments to load all the card images
0 commit comments