ekeih / infinitewisdom Goto Github PK
View Code? Open in Web Editor NEWA telegram bot that sends inspirational quotes of infinite wisdom... ๐ฅ
Home Page: https://t.me/InfiniteWisdomBot
License: GNU Affero General Public License v3.0
A telegram bot that sends inspirational quotes of infinite wisdom... ๐ฅ
Home Page: https://t.me/InfiniteWisdomBot
License: GNU Affero General Public License v3.0
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are pending. To force PRs open, click the checkbox below.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Dockerfile
python 3.11-slim-buster
.github/workflows/docker.yml
actions/checkout v4
docker/login-action v3
docker/metadata-action v5
docker/build-push-action v5
pyproject.toml
poetry >=1.2.2
pyproject.toml
python ^3.8
container-app-conf ^5.0.0
python-telegram-bot ^12.2.0
telegram-click ^5.0.0
requests *
prometheus-client *
google-cloud-vision *
pytesseract *
opencv-python *
sqlalchemy *
alembic *
emoji *
It would be nice to sort images based on how often they were picked in an inline search. To prevent images from ranking always high this should probably only include a recent time frame.
For individual users it would also be nice to sort recently used images to the top of the inline search if no search string has been entered. This way it would be easier to find recently used images again more quickly.
Environment variables are always a string. Configuration entries have a specific type though f.ex. bool
. Since there is no type safety on variable assignment in python it is currently possible to set a "False"
string as the value of a boolean config entry. This is problematic because in python only bool("") == False
so any other env variable would be considered as True
(even "False"
).
To mitigate this a type conversion shall be added for types other than string (namely int
, float
and bool
).
Although analysing images to know what kind of emotion would be associated by humans with it, it would also be nice to let users vote on images when requesting one via the /inspire command. This way it would also be possible to rank images based on user feedback.
To speed up the startup process and maintain a reasonable queue size it would be useful to cache already fetched image URLs in a persistent cache. Although a local disk cache might be sufficient the desired solution would involve an AWS shared storage to be able to easily scale on a Kubernetes cluster.
Sometimes the image uploader uploads images twice before processing the next item. This may have to do with long processing times that exceed the configured uploader interval.
To solve this a mechanism to wait for the end of the last processing unit should be introduced to optionally prevent concurrent runs.
Since uploaded files can only be referenced by the bot that uploaded them telegram file ids schould be stored in relation to the bot token used. To prevent the token from being spread all over the database its value should be hashed before storing.
Sometimes the job that is sceduled to fetch new api images stops for no apparent reason. Altough this hasn't occurred for quite a while it should be investigated.
One thing that might improve the situation is to shorten the duration of this job as it probably never was meant to run such long running tasks.
Currently newly added images are only analyzed once. This is bad for multiple reasons:
To improve this the image analysis process should be extracted to a worker that continuously checks all persistence entries for a possible analysis improvement.
It might still be a good thing to analyse new images right away though (and not wait for the worker to find it) so at least something is available until the best possible analysis is possible.
Hey there, great little bot! ๐
Searching by emoji might be quite challenging if there is no easy way to detect a mood from a text snipped using some existing python library, but it would add a pretty cool way to find "appropriate" quotes.
Since all data is now stored in a persistence there is no need for the bot itself to know how to directly query the image api, it just needs to access the persistence. Therefore it would be better to refactor all api querying code to a separate file/class that runs the background crawling itself and is only created and started once in the __main__
method. That way it would also be possible to run the crawler in a completely separate process.
Currently there is only a single value that can be configured and it can only configured in one way using environment variables. It would be cool to be able to control the behavior of the bot in a more detailed way like:
It would also be cool to be able to configure less security crucial parameters using a config.yaml
in addition to using environment variables.
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.