Skip to content

Commit

Permalink
Merge pull request #5 from Nyaran/feature/rename
Browse files Browse the repository at this point in the history
feat() Apply new name
  • Loading branch information
Nyaran authored Apr 23, 2023
2 parents 6c72b01 + a7a1eba commit 93fa268
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
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

0 comments on commit 93fa268

Please sign in to comment.