Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andorsk/daily_wisdom
daily wisdom apis. Get slack notifications each day with things like the tao of programming, or sun tsu.
https://github.com/andorsk/daily_wisdom
api data-api literature python script slack teaching
Last synced: 13 days ago
JSON representation
daily wisdom apis. Get slack notifications each day with things like the tao of programming, or sun tsu.
- Host: GitHub
- URL: https://github.com/andorsk/daily_wisdom
- Owner: andorsk
- License: apache-2.0
- Created: 2022-04-07T08:56:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T14:32:36.000Z (about 1 year ago)
- Last Synced: 2024-10-31T13:23:37.777Z (2 months ago)
- Topics: api, data-api, literature, python, script, slack, teaching
- Language: Python
- Homepage:
- Size: 79.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Daily Wisdom
Get your wisdom here! This was a short personal project I had to send myself
messages such as sun tsu, the tao of programming, etc to my slack channel daily.
I felt that these pieces of literature were best served like a cup of coffee,
daily and gradually, rather than all at once.![](https://i.imgur.com/MBuu5fE.png)
Honestly, this repo is currently scoped mainly to just work ( and it does ) for
my personal use. If this is interesting to others, I would be happy to build out
a more production version of this.**State:** Works, but made for personal use. You can extend this and generalize
it, but not built for a larger audience.## Usage:
To start with python:
```
python -m pip install -r requirements.txt
cd app && python main.py
```To start with docker: `docker-compose up -d>`
## Environment Variables
- **DATAFILE**: Should point to the files.json file. It's relative to where you
invoke the script.## Swagger Docs
You can go to `/docs` for swagger docs. Ex. http://127.0.0.1:5000/docs
### /{key} api
You can extend and add your own namespaces. For example, extend this into your
own books etc. It will be keyed based upon the `files.json` file.The content should be in yml format. See [sun tsu](app/sun_tsu.yml) for more
details.## Ways to integrate this into slack
I have daily messages sent to slack via a scheduler.
![](https://i.imgur.com/MBuu5fE.png)
But you can customize this to whatever you want. As a command:
![](https://i.imgur.com/vk35wLy.png)
or many others.
See https://api.slack.com/messaging/webhooks for documentation on how to use
incoming web hooks.## Architecture
super simple architecture
```mermaid
graph TD
app
subgraph files
suntsu[Sun Tsu]
tao[Tao]
otherfiles[Other Files]
end
app --> suntsu
app --> tao
app --> otherfiles
```## Contributions
I'd welcome contributions! PR's, Issues, etc!