-
-
Notifications
You must be signed in to change notification settings - Fork 62.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegram bot #6263
Comments
Is there anything we need to do to enable someone to make this? Does it relate to #5778? |
You don't need to do anything, maybe in a few days I'll start creating a more serious bot that can be hosted for free on platforms like Heroku. I hadn't seen the API proposal, if one day they will be created the hypothetical bot would be even easier to create. |
I'm not a regular visitor and user of free programming books, so the
following does not provide help to set up this assistant application,
but asks:
+ Is this bot to work like a web crawler to offer list-like digest,
like «for Python, these are the resources available», or attempt to
download the linked material (the two need not exclude each other)?
+ Inferring from the sibling project free science books I recall some
of the entries do not point to a specific, single .pdf file, but to
collection of .html files. Here, on free programming books, a
fetch of a single file is not possible for all of them; for example
for lectures filed as MOOC, too.
+ Or, does the bot aims to provide a RSS (or a RSS like) notifier
such hat once a profile is set (say, for example, Python) one
receives an email about a newly added resource in this category?
This model to follow free programming books' evolution would be
different to (and independent from) the notification profiles one
may set on GitHub.
+ Or, does the bot aims to provide a searchable database (similar to
a catalog in the library) that upon connection and entering your
category of choice (perhaps in combination with which languages
[like English, French, etc.] accessible to you) list/point to the entries?
…On Sat, 16 Oct 2021 11:30:50 -0700 ImVector ***@***.***> wrote:
You don't need to do anything, maybe in a few days I'll start creating a more serious bot that can be hosted for free on platforms like Heroku. I hadn't seen the API proposal, if one day they will be created the hypothetical bot would be even easier to create.
|
My idea is something much simpler and more banal @nbehrnd . |
I finally created the telegram bot: @freeprogrammingbooks_bot. Tell me how it is. |
Testers needed! |
@eshellman @LuigiImVector Bot is not giving any response. Can you please link the bot source code it would be very helpful |
You have to write /search and after the thing to search. I will now edit and make it clearer. |
Am I doing it wrong?? |
Write the thing to search in new message: |
|
Retry and send screenshot
The repository is private for the moment because the TOKEN bot is written in plain text in the file but this is the current code: https://gist.github.com/LuigiImVector/2a82893078b7515a9b296a16ae13789c |
> Is bot open source??
The repository is private because there isthe TOKEN bot in the file
I interpret (and maybe misunderstand) this as the script contains
some login details (yours?). It would not be good if this were the
case.
Because the project for this script is written strives for free (as
in open, accessible) programming, would it be acceptable for you if
the source code truly would become public (i.e., going beyond the
snapshot/gist shared) for code review and maybe addition of features,
including addition of a permissive license (the project itself using
CC BY 4.0)?
Visual inspection of file bot.py: Welcome if the script provides the
functionality you envisioned on your local set up. (I don't use
telegram). To ease the navigation in your code (for others than
you), may you add brief doc strings for the functions you defined?
(If it is intended to be run directly from the CLI, a shebang line,
and joining the functions in a `def main` function plus a block like
```python
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
logging.info("Received KeyboardInterrupt")
```
eventually calling this one would be advantageous details, too.)
|
The TOKEN is the identification code of the bot that allows you to manage it, I'm working on hiding it and making the repository public. I didn't do it right away because everything was in a beta phase (still is).
The only way to run the bot in local is creating a local heroku server, I need to figure out what is the best option to make everything more opensource and maintenable by the community as well. |
The TOKEN is the identification code of the bot that allows you to manage it, I'm working on hiding it and making the repository public. I didn't do it right away because everything was in a beta phase (still is).
Ok, the project is in early development.
The only way to run the bot in local is creating a local heroku server, I need to figure out what is the best option to make everything more opensource and maintenable by the community as well.
While searching for something different about Python, I stumbled over
a presentation by Philip James on PyCon 2019 about setting up and
interacting/moderating such a server for Mastodon with Python. Maybe
it is good to have this as a spare wheel in the trunk, because
(apparently) this equally may run from an instance on replit, and
would be open source, too.
https://en.wikipedia.org/wiki/Mastodon_(software)
https://www.youtube.com/watch?v=3AQZfXG-ZXs
https://blog.replit.com/setting%20up%20a%20mastodon
|
Do you say to create something for Mastodon too? Anyway, I made the bot repository public: https://github.com/LuigiImVector/freeprogrammingbooks-bot |
Do you say to create something for Mastodon too?
No, at present, I do not plan to set up a Mastodon robot because for
me Mastodon is a recent find a few days old. Somewhat influenced by
the books by Edward Tufte and color maps in general (like e.g.,
colorbrewer), the presentation mentioned was encountered on my way to
an other by Jake van der Plas.
Maybe familiarization with Mastodon and their API for Python once is
going to exceed «the critical mass» to pick this idea up.
|
This issue has been automatically marked as stale because it has not had recent activity during last 60 days 😴 It will be closed in 30 days if no further activity occurs. To unstale this issue, remove stale label or add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Thank you for your patience ❤️ |
The telegram bot continues to work, despite some minor fixes that need to be made. Currently:
If the idea of having a bot on telegram you think is still interesting I continue to work on it. |
@LuigiImVector Did you tried render Cloud Platform? |
nice website but I preferred to host it on a VPS from DigitalOcean |
@LuigiImVector We would love to have a telegram bot it would help many people. |
It would be nice to create a telegram bot that would allow you to quickly view free resources belonging to a certain category/subcategory.
I created a small bot in python to use it as an example (it's just a concept, the code is really bad): https://gist.github.com/LuigiImVector/c748aa5801c8f3fdfeb4114eb35d1eac
The idea is to make it self-manageable, to send the resources it will save a copy of the desired file and search for the name of the desired subcategory ("Android" for example) and the program will send all the updated resources assigned to that subcategory.
There are many other ways to do this, if you like this I can help create it.
The text was updated successfully, but these errors were encountered: