-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,47 @@ | ||
# datapath | ||
|
||
Simple ETL getting info from https://newsapi.org/ and send to telegram channel | ||
Send info getting from API to telegram. | ||
Third part of a system which search, save and share info. | ||
|
||
## Prehistory | ||
This simple service help to search information automatically via News API | ||
It is good idea to share info. | ||
|
||
> Datapath it is like telepath or astropath | ||
> (c) Author | ||
Enjoy. | ||
|
||
## How to use | ||
You can check the last available tags here - | ||
1) https://hub.docker.com/repository/docker/h0d0user/truth_seeker | ||
2) https://hub.docker.com/repository/docker/h0d0user/datapath | ||
3) https://hub.docker.com/repository/docker/h0d0user/news_db | ||
|
||
Need to fill `settings.toml` with next important variables: | ||
1) `DB_NAME`. Where you want to load your data before send to telegram. | ||
2) `API_KEY`. You can find this data here - https://my.telegram.org/apps | ||
3) `QUERY`. Key word to search for in articles. | ||
4) `API_TOKEN`. Ask *BotFather* in telegram. | ||
5) `CHAT_ID`. Use this to find chat ID where you want to send messages - https://api.telegram.org/botAPI_TOKEN/getUpdates | ||
6) `docker-compose up -d` | ||
7) ... | ||
8) PROFIT !!! | ||
|
||
*It is not final configuration. You can find template below.* | ||
|
||
File `settings.toml` template: | ||
1) `API_KEY`. You can find this data here - https://my.telegram.org/apps | ||
2) `QUERY`. Key word to search for in articles. | ||
3) `API_TOKEN`. Ask *BotFather* in telegram. | ||
4) `CHAT_ID`. Use this to find chat ID where you want to send messages - https://api.telegram.org/botAPI_TOKEN/getUpdates | ||
5) `docker-compose up -d` or `make dstart` | ||
6) ... | ||
7) PROFIT !!! | ||
|
||
``` | ||
[DB] | ||
DB_NAME = "/mnt/test.db" | ||
DB_API_URL = "http://attainments_sanctuary:8888" | ||
[NEWS_API] | ||
API_KEY = "" | ||
QUERY = "test" | ||
QUERY = "computer science" | ||
LANGUAGE = "en" | ||
[TELEGRAM] | ||
API_TOKEN = "" | ||
CHAT_ID = "" | ||
[TIMINIGS] | ||
TIME_TO_PURGE = "00:00" | ||
TIME_TO_SEARCH = "02:00" | ||
TIME_TO_SEND_START = "10:00" | ||
TIME_TO_SEND_END = "20:00" | ||
SENDING_INTERVAL = 300 | ||
``` | ||
|
||
|
||
For more info check: | ||
1) API & DB repo - https://github.com/CoolCoderCarl/attainments_sanctuary | ||
2) ETL repo - https://github.com/CoolCoderCarl/epistolary | ||
|
||
**Still have questions ? Google it.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters