Honestly, I don't know why I have to name this project as it is now.
This project is a personal Ruby Telegram Bot which could help you to store links from "Index of" resources.
This project could help you to store files from "Index of" resources inside Telegram.
Firstly, you'll need Ruby 2.7 or above (but I think it will work on legacy versions too). I recommend to use rbenv to manage your Rubies.
After building Ruby install the project and download dependencies:
git clone https://github.com/unurgunite/pdf_uploader.git && \
cd pdf_uploader && \
bundle install
If everything downloaded without any errors, go to BotFather to get Telegram API token. We
should store it somewhere, so create a file .env
at project's root as below:
echo 'TELEGRAM_TOKEN=YOUR-TOKEN-HERE' > .env
Now everything should work fine. Type in your terminal:
bundle exec ruby main.rb
And follow to your bot.
Here is a table with common commands which bot could serve.
Commands | Description |
---|---|
/start |
Start the bot |
/upload_url |
Upload url to get files from resource |
/help |
Print all commands |
The current parser implementation does not support links other than in "Index of" format, so I would be glad to receive a support.
Here is a table showing all dependencies for this project.
Dependencies | Description |
---|---|
telegram-bot-ruby | A library for communication with Telegram Bot API |
nokogiri | A library for parsing and analyzing XML sources |
httparty | A library for making requests easily (than via Net::HTTP) |
dotenv | A library for storing sensitive information (API token, for e.g.) |
rbs | A library for creating a type signatures (ONLY FOR DEVELOPMENT!) |
debug | A library for debugging Ruby code evaluating (ONLY FOR DEVELOPMENT!) |
rubocop | A library for code cleaning (ONLY FOR DEVELOPMENT!) |
Bug reports and pull requests are welcome on GitHub at https://github.com/unurgunite/pdf_uploader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct. To contribute you should fork this project and create there new branch:
git clone https://github.com/your-beautiful-username/pdf_uploader.git && \
git checkout -b refactor && \
git commit -m "Affected new changes" && \
git push origin refactor
And then make new pull request with additional notes of what you have done. The better the changes are scheduled, the faster the PR will be checked.
Everyone interacting in the PdfUploader
project's codebases, issue trackers, chat rooms and mailing lists is expected
to follow the code of conduct.
The project is available as open source under the terms of
the 3-Clause BSD License. The copy of the license is stored in project
under the LICENSE.txt
file
name: copy of the License
The documentation is available as open source under the terms of the CC BY-SA 4.0 License