Skip to content

Commit ce70da2

Browse files
committed
Add ToC to README
1 parent 7be57f3 commit ce70da2

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

README.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44

55
Much of the functionality of this package has been ported over from [tivars_lib_cpp](https://github.com/adriweb/tivars_lib_cpp). However, a number of changes have been made to the API to better suit Python's strengths and capabilities as a language (e.g. scripting, dynamic typing).
66

7+
- [Installation](#installation)
8+
- [As a Package](#as-a-package)
9+
- [As a Submodule](#as-a-submodule)
10+
- [Unit Testing](#unit-testing)
11+
- [How to Use](#how-to-use)
12+
- [Entries](#entries)
13+
- [Vars & Headers](#vars--headers)
14+
- [Models](#models)
15+
- [Documentation](#documentation)
16+
- [API](#api)
17+
- [Formatting Output](#formatting-output)
18+
- [Other Functionalities](#other-functionalities)
19+
- [PIL](#pil)
20+
- [Tokenization](#tokenization)
21+
- [Examples](#examples)
22+
723
## Installation
824

925
The current release version is `v0.9.2`. All versions require Python 3.10+ to run.
@@ -246,24 +262,6 @@ Flash files such as apps, OSes, and certificates can be loaded using the `TIFlas
246262

247263
All TI-82/83/84 series calcs are represented as `TIModel` objects stored in `tivars.models`. Each model contains its name, metadata, and features; use `has` on a `TIFeature` to check that a model has a given a feature. Models are also used to determine var file extensions and token sheets.
248264

249-
## Other Functionalities
250-
251-
### PIL
252-
253-
The `tivars.PIL` package can be used to interface with PIL, the [Python Imaging Library](https://pillow.readthedocs.io/en/stable/). Simply import the package to register codecs for each of the TI image types. You can then open such images directly into a PIL `Image`:
254-
255-
```python
256-
from PIL import Image
257-
from tivars.PIL import *
258-
259-
img = Image.open("Pic1.8ci")
260-
img.show()
261-
```
262-
263-
### Tokenization
264-
265-
Functions to decode and encode strings into tokens can be found in `tivars.tokenizer`. These functions utilize the [TI-Toolkit token sheets](https://github.com/TI-Toolkit/tokens), which are kept as a submodule in `tivars.tokens`. Support currently exists for all models in the 82/83/84 series; PR's concerning the sheets themselves should be directed upstream.
266-
267265
## Documentation
268266

269267
### API
@@ -275,7 +273,7 @@ The var file format(s) and data sections can be found in a readable format on th
275273
> [!NOTE]
276274
> The wiki is still a work-in-progress. Why not [contribute a page](https://github.com/TI-Toolkit/tivars_lib_py/wiki)?
277275
278-
### Formatting
276+
### Formatting Output
279277

280278
All entry types support string formatting using Python's f-strings.
281279

@@ -294,6 +292,24 @@ All entry types support string formatting using Python's f-strings.
294292

295293
Additionally, the `t` type is supported for types which can be made from tokens, composing the object out of typeable (accessible) token names. For example, `-2 + 5i` is presented as `~2+5[i]`.
296294

295+
## Other Functionalities
296+
297+
### PIL
298+
299+
The `tivars.PIL` package can be used to interface with PIL, the [Python Imaging Library](https://pillow.readthedocs.io/en/stable/). Simply import the package to register codecs for each of the TI image types. You can then open such images directly into a PIL `Image`:
300+
301+
```python
302+
from PIL import Image
303+
from tivars.PIL import *
304+
305+
img = Image.open("Pic1.8ci")
306+
img.show()
307+
```
308+
309+
### Tokenization
310+
311+
Functions to decode and encode strings into tokens can be found in `tivars.tokenizer`. These functions utilize the [TI-Toolkit token sheets](https://github.com/TI-Toolkit/tokens), which are kept as a submodule in `tivars.tokens`. Support currently exists for all models in the 82/83/84 series; PR's concerning the sheets themselves should be directed upstream.
312+
297313
## Examples
298314

299-
You can find more sample code in `examples` that details common operations on each of the entry types. There are also examples for interfacing with popular external libraries (e.g. NumPy, PIL). Contributions welcome!
315+
You can find more sample code in [`examples`](https://github.com/TI-Toolkit/tivars_lib_py/tree/main/examples) that details common operations on each of the entry types. There are also examples for interfacing with popular external libraries (e.g. NumPy, PIL). Contributions welcome!

0 commit comments

Comments
 (0)