obervinov / messages-package Goto Github PK
View Code? Open in Web Editor NEWThis package helps to easily and quickly generate beautiful messages for telegram bots using templates described in json.
License: MIT License
This package helps to easily and quickly generate beautiful messages for telegram bots using templates described in json.
License: MIT License
example
"""
This module is necessary to distribute and install the written module via pip
"""
from setuptools import setup
with open('README.md', 'r', encoding='utf8') as readme:
readme_content = readme.read()
with open('CHANGELOG.md', 'r', encoding='utf8') as changelog:
changelog_content = changelog.read()
setup(
name='users',
version='1.0.3',
license='MIT',
description=(
"This module contains classes and functions for implementing"
"the simplest authorization for telegram bots"
),
py_modules=["users"],
package_dir={'': 'users'},
author='Oleg Bervinov',
author_email='[email protected]',
long_description=(f"{readme_content}""\n\n"f"{changelog_content}"),
long_description_content_type="text/markdown",
url='https://github.com/obervinov/users-package',
include_package_data=True,
classifiers=[
"License :: OSI Approved :: MIT License",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Operating System :: OS Independent'
],
keywords=['users', 'authentication'],
install_requires=[
'logger @ https://github.com/obervinov/logger-package/tarball/v1.0.1#egg=logger-1.0.1',
'vault @ https://github.com/obervinov/vault-package/tarball/v2.0.0#egg=vault-2.0.0',
],
dependency_links=[
'https://github.com/obervinov/logger-package/tarball/v1.0.1#egg=logger-1.0.1'
'https://github.com/obervinov/vault-package/tarball/v2.0.0#egg=vault-2.0.0'
]
)
python = "^3.9 || ^3.10 || ^3.11"
{3}
)
"post_already_downloaded": {
"text": "{0} The content of the post <b>{1}</b> has already been downloaded.\n{3} The download was skipped.",
"args": [":construction:", "post_id", ":boxing_glove:"]
}
Traceback (most recent call last):
File "/home/pyinstabot-downloader/app/src/bot.py", line 521, in <module>
main()
File "/home/pyinstabot-downloader/app/src/bot.py", line 517, in main
telegram.launch_bot()
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telegram/telegram.py", line 202, in launch_bot
self.telegram_bot.polling(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/__init__.py", line 1104, in polling
self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/__init__.py", line 1179, in __threaded_polling
raise e
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/__init__.py", line 1141, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/util.py", line 149, in raise_exceptions
raise self.exception_info
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/util.py", line 92, in run
task(*args, **kwargs)
File "/home/pyinstabot-downloader/app/src/bot.py", line 329, in process_one_post
telegram.send_styled_message(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telegram/telegram.py", line 171, in send_styled_message
text=self.messages.render_template(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/messages/messages.py", line 91, in render_template
return template['text'].format(*arguments)
IndexError: Replacement index 3 out of range for positional args tuple
# PR-1: NAME
**full changelog**: https://github.com/obervinov/messages-package/compare/v1.0.0...v1.0.1 by @ obervinov https://github.com/obervinov/messages-package/pull/1
## VERSION - YYYY-MM-DD
### What's Changed
#### π Bug Fixes
*
*
#### π Documentation
*
*
#### π₯ Breaking Changes
*
*
#### π Features
*
*
progressbar
Check after a week, since dependabot runs once a week, this is an old log!!!
https://github.com/obervinov/messages-package/blob/main/.github/dependabot.yml
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
name: Test, Build and create relese
on:
push:
branches:
- '*'
- '*/*'
- '**'
env:
PROJECT_DESCRIPTION: "This project is a telegram bot that allows you to create backups of content from your Instagram profile to Dropbox or Mega clouds, as well as in the local file system."
jobs:
pylint:
uses: obervinov/_templates/.github/workflows/[email protected]
verify-changelog:
uses: obervinov/_templates/.github/workflows/[email protected]
pytest:
uses: obervinov/_templates/.github/workflows/[email protected]
build-release:
uses: obervinov/_templates/.github/workflows/build.docker.yml@release/v1.0.5
needs: [pylint, verify-changelog, pytest]
configs.json
does not exist
=========================== short test summary info ============================
ERROR tests/test_create_inline_markup.py::test_extract_token - FileNotFoundError: [Errno 2] No such file or directory: 'configs/messages.json'
ERROR tests/test_create_inline_markup.py::test_create_inline_markup_3 - FileNotFoundError: [Errno 2] No such file or directory: 'configs/messages.json'
ERROR tests/test_create_inline_markup.py::test_create_inline_markup_4 - FileNotFoundError: [Errno 2] No such file or directory: 'configs/messages.json'
alias not found
just send error
in the log message
configs.json
is empty
=========================== short test summary info ============================
ERROR tests/test_create_inline_markup.py::test_extract_token - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR tests/test_create_inline_markup.py::test_create_inline_markup_3 - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR tests/test_create_inline_markup.py::test_create_inline_markup_4 - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
if "__name__" == "__main__"
they are not actually used. Pytest runs the functions itself.(Example)[tests/configs/messages.json]
-> [Example](tests/configs/messages.json)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.