Open LuigiImVector opened 3 years ago
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 . The user must indicate a language, a type of resource (books, courses...) and the subcategory (Android, C++, Java...) and the bot will download the markdown file from the github page (maybe I could use the Github API) and will search the subcategory, save it and send to the user a markdown formatted message with the links to the resources of the chosen subcategory.Nothing too complex, there are many other better ways to do this, anyway any advice is always welcome.
I finally created the telegram bot: @freeprogrammingbooks_bot. It isn't perfect, could be better but I decided to create it this way so that it can self-maintain despite constant updates of the repository. I'm hosting the bot on heroku.
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
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.
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?? See in the above img
Am I doing it wrong?? See in the above img
Write the thing to search in new message: first message: /search second message: python
Am I doing it wrong?? See in the above img
Write the thing to search in new message: first message: /search second message: python No response Is bot open source??
No response
Retry and send screenshot
Is bot open source??
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
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
logging.info("Received KeyboardInterrupt")
eventually calling this one would be advantageous details, too.)
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)?
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).
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 eventually calling this one would be advantageous details, too.)
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
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.
Do you say to create something for Mastodon too?
Anyway, I made the bot repository public: https://github.com/LuigiImVector/freeprogrammingbooks-bot In the README there is a guide that explains how to contribute to the project, maybe there is still some imperfection in it but I'm testing and improving it.
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 :sleeping:
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 :heart:
The telegram bot continues to work, despite some minor fixes that need to be made. Currently:
fpb.json
).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.