Skip to content

Commit

Permalink
setup: Add setuptools support
Browse files Browse the repository at this point in the history
Also update the README to explain the new installation option.
  • Loading branch information
diegoe committed Mar 10, 2021
1 parent 022b43b commit 24d5291
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 3 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# packpath
Automatically upload Signal stickers from a given path and YAML configuration


## Install it

The package is available in PyPI, through `pip`:
```sh
$ pip3 install packpath
```

But you can also simply checkout this repository and run it as a module:
```sh
$ git clone https://github.com/diegoe/packpath.git
$ cd packpath
$ python3 -m packpath (plus arguments, see below)
```

## How it works

`packpath` reads a path and loads a `config.yaml` file from it to automatically
Expand All @@ -9,13 +24,19 @@ fill a `signalstickers-client` client, and submit stickers.
It subclasses `signalstickers_client.models.LocalStickerPack` to add a
`load_path()` method.

The module is meant for command line invocation, but can easily be used
in code:
You need to provide your username and password, as well as the path to a
sticker directory containing a `config.yaml` file. See below for details
on both, or run `packpath --help`:

```sh
$ python3 -m packpath [path] --user [uuid_id] --password [password]
$ packpath --user [uuid_id] --password [password] [path_to_sticker_dir]

# Most of this README and its instructions are available in the
# command's help:
$ packpath --help
```


## YAML format

The YAML format is rather simple:
Expand All @@ -39,6 +60,7 @@ list of filenames to use on your `config.yaml`:
$ ls -1 >> config.yaml
```


## Signal credentials

From https://github.com/signalstickers/signalstickers-client#uploading-a-pack:
Expand All @@ -50,13 +72,15 @@ From https://github.com/signalstickers/signalstickers-client#uploading-a-pack:
The above is also available in `python3 -m packpath --help`.


## Credits

This is a simple wrapper on top of the very handy
[`signalstickers-client`](https://github.com/signalstickers/signalstickers-client).

Go check it out.


## Disclaimer

All boiler plate disclaimers apply. But also please be respectful of
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools",
"wheel"
]
build-backend = "setuptools.build_meta"
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[metadata]
name = packpath
version = attr: packpath.__version__
description = Automatically upload Signal stickers from a given path and YAML configuration
license = AGPL-3.0-only
author = Diego Escalante Urrelo
author_email = [email protected]

long_description = file: README.md
long_description_content_type = text/markdown

classifiers =
Development Status :: 4 - Beta
Environment :: Console
Intended Audience :: End Users/Desktop
License :: OSI Approved :: GNU Affero General Public License v3
Programming Language :: Python :: 3.9
Programming Language :: Python
Topic :: Communications :: Chat
Topic :: Utilities

url = https://github.com/diegoe/packpath
project_urls =
GitHub = https://github.com/diegoe/packpath

[options]
include_package_data = True
packages= find:
install_requires =
signalstickers-client>=3.1.0
PyYAML>=5.4.1

[options.entry_points]
console_scripts =
packpath = packpath.__main__:main
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()

0 comments on commit 24d5291

Please sign in to comment.