Skip to content

Commit

Permalink
Merge 4bbd7b3 into 4ec42b5
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCoderCarl authored Nov 22, 2022
2 parents 4ec42b5 + 4bbd7b3 commit 754aca6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 6 deletions.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# epistolary
# epistolary
Simple ETL getting info from https://newsapi.org/ and send to API

## Prehistory
This simple service help to search information automatically via News API

> Epistolary examines the reports and prepares them for recording
> (c) Author
## How to use
Need to fill `settings.toml` with next important variables:
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) Check the main repo - https://github.com/CoolCoderCarl/datapath - get `docker-compose.yaml`
6) `docker-compose up -d`
7) ...
8) PROFIT !!!


```
[DB]
DB_API_URL = "http://attainments_sanctuary:8888"
[NEWS_API]
API_KEY = ""
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
```

**Still have questions ? Google it.**
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
black
isort
pandas~=1.5.1
pytest~=7.2.0
fastapi~=0.87.0
dynaconfig~=0.4
dynaconf~=3.1.11
Expand Down
6 changes: 1 addition & 5 deletions test_api_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ def test_purge():


if __name__ == "__main__":
test_healthcheck()
test_insert()
test_get_news()
test_purge()
test_get_news()
pass

0 comments on commit 754aca6

Please sign in to comment.