Skip to content
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

feat() Apply new name #5

Merged
merged 1 commit into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ko_fi: alfem
# These are supported funding model platforms
ko_fi: nyaran
custom:
- https://www.buymeacoffee.com/nyaran
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# telegram-download-daemon
# telegram-download-daemon-ng

A Telegram Daemon (not a bot) for file downloading automation [for channels of which you have admin privileges](https://github.com/alfem/telegram-download-daemon/issues/48).

Based on the original work of [@alfem](https://github.com/alfem): https://github.com/alfem/telegram-download-daemon

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E03K0RP)

If you have got an Internet connected computer or NAS and you want to automate file downloading from Telegram channels, this
Expand Down Expand Up @@ -54,20 +56,5 @@ You can also 'talk' to this daemon using your Telegram client:

# Docker

`docker pull alfem/telegram-download-daemon`

When we use the [`TelegramClient`](https://docs.telethon.dev/en/latest/quick-references/client-reference.html#telegramclient) method, it requires us to interact with the `Console` to give it our phone number and confirm with a security code.

To do this, when using *Docker*, you need to **interactively** run the container for the first time.

When you use `docker-compose`, the `.session` file, where the login is stored is kept in *Volume* outside the container. Therefore, when using docker-compose you are required to:

```bash
$ docker-compose run --rm telegram-download-daemon
# Interact with the console to authenticate yourself.
# See the message "Signed in successfully as {youe name}"
# Close the container
$ docker-compose up -d
```
TODO

See the `sessions` volume in the [docker-compose.yml](docker-compose.yml) file.
11 changes: 6 additions & 5 deletions telegram-download-daemon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# Telegram Download Daemon
# Author: Alfonso E.M. <[email protected]>
# Telegram Download Daemon NG
# Author: Luis Zurro <[email protected]>
# Based on original work from: Alfonso E.M. <[email protected]> [https://github.com/alfem/telegram-download-daemon]
# You need to install telethon (and cryptg to speed up downloads)

from os import getenv, path
Expand Down Expand Up @@ -30,7 +31,7 @@
import asyncio


TDD_VERSION="1.13"
TDD_VERSION="0.0.1"

TELEGRAM_DAEMON_API_ID = getenv("TELEGRAM_DAEMON_API_ID")
TELEGRAM_DAEMON_API_HASH = getenv("TELEGRAM_DAEMON_API_HASH")
Expand Down Expand Up @@ -113,8 +114,8 @@

async def sendHelloMessage(client, peerChannel):
entity = await client.get_entity(peerChannel)
print("Telegram Download Daemon "+TDD_VERSION+" using Telethon "+__version__)
await client.send_message(entity, "Telegram Download Daemon "+TDD_VERSION+" using Telethon "+__version__)
print("Telegram Download Daemon NG "+TDD_VERSION+" using Telethon "+__version__)
await client.send_message(entity, "Telegram Download Daemon NG"+TDD_VERSION+" using Telethon "+__version__)
await client.send_message(entity, "Hi! Ready for your files!")


Expand Down