Skip to content

Commit

Permalink
fhmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
FredHappyface committed Jun 25, 2023
1 parent 4d5a8f6 commit 5595129
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 143 deletions.
12 changes: 0 additions & 12 deletions documentation/reference/MODULES.md

This file was deleted.

7 changes: 3 additions & 4 deletions documentation/reference/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Tstickers Modules
# Tstickers Index

> Auto-generated documentation modules index.
> Auto-generated documentation index.
Full list of [Tstickers](README.md#tstickers-index) project modules.
A full list of `Tstickers` project modules.

- [Tstickers Index](README.md#tstickers-index)
- [Tstickers](tstickers/index.md#tstickers)
- [Module](tstickers/module.md#module)
- [Caching](tstickers/caching.md#caching)
Expand Down
43 changes: 28 additions & 15 deletions documentation/reference/tstickers/caching.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Caching

[Tstickers Index](../README.md#tstickers-index) /
[Tstickers](./index.md#tstickers) /
Caching

> Auto-generated documentation for [tstickers.caching](../../../tstickers/caching.py) module.
Sticker caching functionality used by the downloader.
#### Attributes

- [Tstickers](../README.md#tstickers-index) / [Modules](../MODULES.md#tstickers-modules) / [Tstickers](index.md#tstickers) / Caching
- [createConverted](#createconverted)
- [verifyConverted](#verifyconverted)
- `cachedSession` - requests_cache: `CachedSession('.cache/tstickers.requests.sqlite', backend='sqlite', expire_after=60 * 60 * 12, allowable_codes=(200), allowable_methods=('GET', 'POST'))`

#### Attributes

- `cachedSession` - requests_cache: `CachedSession('.cache/tstickers.requests.sqlite...`
- [Caching](#caching)
- [createConverted](#createconverted)
- [verifyConverted](#verifyconverted)

## createConverted

[[find in source code]](../../../tstickers/caching.py#L60)

```python
def createConverted(packName: str, data: dict):
```
[Show source in caching.py:60](../../../tstickers/caching.py#L60)

Write cache data to a file identified by packName

Expand All @@ -27,14 +26,19 @@ Write cache data to a file identified by packName
- `packName` *str* - name of the sticker pack eg. "DonutTheDog"
- `data` *dict* - packName cache data to write to cache

## verifyConverted

[[find in source code]](../../../tstickers/caching.py#L21)
#### Signature

```python
def verifyConverted(packName: str) -> bool:
def createConverted(packName: str, data: dict):
...
```



## verifyConverted

[Show source in caching.py:21](../../../tstickers/caching.py#L21)

Verify the cache for a packName eg. "DonutTheDog". Uses the cache "version"
to call the verify function for that version

Expand All @@ -45,3 +49,12 @@ to call the verify function for that version
#### Returns

- `bool` - if the converted cache has been verified

#### Signature

```python
def verifyConverted(packName: str) -> bool:
...
```


75 changes: 46 additions & 29 deletions documentation/reference/tstickers/convert.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# Convert

> Auto-generated documentation for [tstickers.convert](../../../tstickers/convert.py) module.
[Tstickers Index](../README.md#tstickers-index) /
[Tstickers](./index.md#tstickers) /
Convert

Sticker convert functions used by the downloader.
> Auto-generated documentation for [tstickers.convert](../../../tstickers/convert.py) module.
- [Tstickers](../README.md#tstickers-index) / [Modules](../MODULES.md#tstickers-modules) / [Tstickers](index.md#tstickers) / Convert
- [assureDirExists](#assuredirexists)
- [convertTgs](#converttgs)
- [convertWebp](#convertwebp)
- [convertWithPIL](#convertwithpil)
- [Convert](#convert)
- [assureDirExists](#assuredirexists)
- [convertTgs](#converttgs)
- [convertWebp](#convertwebp)
- [convertWithPIL](#convertwithpil)

## assureDirExists

[[find in source code]](../../../tstickers/convert.py#L13)

```python
def assureDirExists(root: Path, directory: Path | str) -> Path:
```
[Show source in convert.py:13](../../../tstickers/convert.py#L13)

make the dir if not exists

Expand All @@ -29,19 +27,19 @@ make the dir if not exists

- `Path` - the full path

## convertTgs

[[find in source code]](../../../tstickers/convert.py#L72)
#### Signature

```python
def convertTgs(
swd: Path,
threads: int = 4,
frameSkip: int = 1,
scale: float = 1,
) -> int:
def assureDirExists(root: Path, directory: Path | str) -> Path:
...
```



## convertTgs

[Show source in convert.py:72](../../../tstickers/convert.py#L72)

Convert animated stickers to webp, gif and png

#### Arguments
Expand All @@ -57,14 +55,19 @@ for optimisation with a quality trade-off. Defaults to 1.

- `int` - number of stickers successfully converted

## convertWebp

[[find in source code]](../../../tstickers/convert.py#L44)
#### Signature

```python
def convertWebp(swd: Path, threads: int = 4) -> int:
def convertTgs(swd: Path, threads: int = 4, frameSkip: int = 1, scale: float = 1) -> int:
...
```



## convertWebp

[Show source in convert.py:44](../../../tstickers/convert.py#L44)

Convert static stickers to png and gif

#### Arguments
Expand All @@ -76,14 +79,19 @@ Convert static stickers to png and gif

- `int` - number of stickers successfully converted

## convertWithPIL

[[find in source code]](../../../tstickers/convert.py#L27)
#### Signature

```python
def convertWithPIL(inputFile: str) -> str:
def convertWebp(swd: Path, threads: int = 4) -> int:
...
```



## convertWithPIL

[Show source in convert.py:27](../../../tstickers/convert.py#L27)

Convert the webp file to png

#### Arguments
Expand All @@ -93,3 +101,12 @@ Convert the webp file to png
#### Returns

- `str` - path to input file

#### Signature

```python
def convertWithPIL(inputFile: str) -> str:
...
```


Loading

0 comments on commit 5595129

Please sign in to comment.