added example config

This commit is contained in:
Domeniko Gentner 2020-11-08 14:33:43 +01:00
parent a4c463c12d
commit bd655cb883
4 changed files with 31 additions and 1 deletions

4
.gitignore vendored
View File

@ -1,7 +1,9 @@
.idea
venv
bearer.json
twitter.json
mail_credentials.json
test.*
__pycache__/
*.json
!/etc/tw2hugo/twitter.json
!/etc/tw2hugo/mail_credentials.json

View File

@ -107,6 +107,19 @@ Between these you can simple call the keys from the json, so `name` in dict `use
Neato, isn't it? If you want to know how it looks like, head over to my [website](https://tuxstash.de/) and scroll down
to the footer.
# Excluding hashtags
Sometimes you do not want a tweet to decorate the hard work you call your web home. You can add the following to `twitter.json`
to exclude certain hashtags:
```
"exclude": [
"politics"
]
```
You find sample configuration files in the `/etc/` folder in the project root.
<!--suppress HtmlDeprecatedAttribute -->
<p align="center">
<a href='https://ko-fi.com/L3L31HXRQ' target='_blank'><img height='36' style='border:0;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

View File

@ -0,0 +1,8 @@
{
"smtp-server": "smtp.example.com",
"smtp-port": 465,
"email-user": "notify@example.com",
"email-sendfrom": "notify@example.com",
"email-password": "passw0rd",
"email-sendto": "you@example.com"
}

7
etc/tw2hugo/twitter.json Normal file
View File

@ -0,0 +1,7 @@
{
"bearer": "bearer token from twitter",
"twitter-handle": "GothSeiDank",
"output-location": "/path/to/hugo/data/latest_tweet.json",
"exclude": ["1", "2"]
}