Skip to content

Commit

Permalink
port to deltabot-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Feb 6, 2024
1 parent b50428b commit 5ca1711
Show file tree
Hide file tree
Showing 21 changed files with 258 additions and 358 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.9]
python-version: ['3.8', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -24,9 +24,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install '.[dev]'
- name: Check code with isort
run: |
isort --check .
- name: Check code with black
run: |
black --check .
Expand All @@ -35,7 +32,7 @@ jobs:
pylama
- name: Test with pytest
run: |
pytest
#pytest
deploy:
needs: test
Expand All @@ -57,11 +54,3 @@ jobs:
build: true
# only upload if a tag is pushed (otherwise just build & check)
upload: ${{ github.event_name == 'push' && steps.check-tag.outputs.match == 'true' }}
- name: Create GitHub release
if: ${{ github.event_name == 'push' && steps.check-tag.outputs.match == 'true' }}
uses: Roang-zero1/github-create-release-action@master
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
changelog_file: "CHANGELOG.rst"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

2 changes: 0 additions & 2 deletions .mypy.ini

This file was deleted.

44 changes: 0 additions & 44 deletions CHANGELOG.rst

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# StickersBot

[![Latest Release](https://img.shields.io/pypi/v/stickersbot.svg)](https://pypi.org/project/stickersbot)
[![CI](https://github.com/deltachat-bot/stickersbot/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/stickersbot/actions/workflows/python-ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Delta Chat bot that allows users to get stickers packs and convert normal images to stickers.

## Installation and configuration

```sh
pip install stickersbot
```

Configure the bot:

```sh
stickersbot init [email protected] PASSWORD
```

Start the bot:

```sh
stickersbot serve
```

Run `stickersbot --help` to see all available options.

## Usage

To get sticker packs, browse https://signalstickers.com/ and copy the URL of the pack you want (the link in the "+ Add to Signal" button, an URL starting with ``https://signal.art/addstickers``) and send the pack URL to the bot in private, the bot will send you a zip with the sticker pack.

To create an sticker from a normal image send the image to the bot and it will send you back the image as sticker.

Send any text to the bot to search packs matching the given text.

Send an emoji to the bot to get a random sticker associated with that emoji.
44 changes: 0 additions & 44 deletions README.rst

This file was deleted.

Binary file added avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 49 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,53 @@
[build-system]
requires = [
"setuptools>=45",
"setuptools-scm>=6.2",
"wheel",
]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "stickersbot"
description = "Sticker packs for all your Delta Chat needs"
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE"}
keywords = ["deltachat", "bot"]
authors = [
{name = "adbenitez", email = "[email protected]"},
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
]
dependencies = [
"deltabot-cli>=3.0.0,<4.0",
"signalstickers-client>=3.1.0",
"emoji>=1.6.1",
"cachelib>=0.7.0",
"requests>=2.26.0",
]

[project.optional-dependencies]
dev = [
"black",
"mypy",
"isort",
"pylint",
"pylama",
"pytest",
"types-emoji",
"types-requests",
]

[project.scripts]
stickersbot = "stickersbot:main"

[tool.setuptools_scm]
write_to = "simplebot_stickers/_version.py"
# can be empty if no extra settings are needed, presence enables setuptools_scm

[tool.setuptools]
packages = ["stickersbot"]

[tool.isort]
profile = "black"

[tool.mypy]
ignore_missing_imports = "True"
9 changes: 0 additions & 9 deletions requirements/requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/requirements-test.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements/requirements.txt

This file was deleted.

65 changes: 0 additions & 65 deletions setup.py

This file was deleted.

Loading

0 comments on commit 5ca1711

Please sign in to comment.