Skip to content

Commit 827dc02

Browse files
committed
docs
1 parent 09631e5 commit 827dc02

File tree

3 files changed

+23
-53
lines changed

3 files changed

+23
-53
lines changed

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SHIBE_LOL_CLIENT_SECRET=
2+
3+
TWITTER_API_KEY=
4+
TWITTER_API_KEY_SECRET=
5+
TWITTER_ACCESS_TOKEN=
6+
TWITTER_ACCESS_TOKEN_SECRET=
7+
8+
MASTODON_ACCESS_TOKEN_KEY=

DEVELOPMENT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Developing Locally
2+
3+
1. Rename `.env.example` to `.env`. You will need API keys:
4+
5+
- From a X(Twitter) developer account, https://developer.twitter.com.
6+
7+
- From your access token key from your Mastodon instance. This is found in `Preferences > Development`. You will need to create a new application if you dont have one already
8+
9+
2. You can then run the npm script starting with `dev:` to test posting whilst in local development

README.md

Lines changed: 6 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,17 @@
1-
[![Post Shiba To Twitter/X Hourly](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml/badge.svg)](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml)
2-
31
<div align="center">
42

53
<h1> Shiba Every Hour </h1>
64

7-
<p> A GitHub Action which posts a picture of a Shiba to Twitter every hour.</p>
5+
<p>posting shibas around the the inter-webs hourly</p>
86

97
<img src="https://user-images.githubusercontent.com/18376481/90677906-ed53a180-e255-11ea-9df6-a2f6a59f0154.png">
108

119
<p>wow</p>
1210

1311
</div>
1412

15-
# Ok, seriously why?
16-
17-
I like Shiba's ok?
18-
19-
# But Seriously...
20-
21-
22-
There probably is a legit use case somewhere here... You just need to look harder.
23-
- Perhaps you want to tweet your application service status every hour via a health check API?
24-
- You could post a tweet every time is a PR is merged into your master branch?
25-
- You could post cat images every hour instead!?
26-
27-
The sky's the limit!
28-
29-
# Developing Locally
30-
31-
1. Clone this repo to your machine.
32-
33-
2. Create a `.env` in the root directory.
34-
35-
3. Inside the `.env` you will need to create four variables. `CONSUMER_KEY` , `CONSUMER_SECRET`, `ACCESS_TOKEN_KEY` and `ACCESS_TOKEN_SECRET`. These need to be populated with your own Twitter API keys which you can get by signing up at https://developer.twitter.com/ .
36-
37-
4. Your `.env` file should look something like this.
38-
```
39-
CONSUMER_KEY = hvdVM7ZGshibasaresogreat3ZvE5tXh0E4h
40-
CONSUMER_SECRET = 4ez9dEyAeGtbnXeca-ha-ha-M0i5wI02e1vPa
41-
ACCESS_TOKEN_KEY = 8185583706135142-not-a-real-key-gPwxau3Yi0adA
42-
ACCESS_TOKEN_SECRET = wow-fsaa2muchwoof
43-
```
44-
5. You can then run `npm run dev-shibe` to run the script locally.
45-
46-
# Modifying the Action or Script
47-
48-
Feel free to adapt this script for your own purposes.
49-
50-
The hourly schedule is configured in `./.github/workflows/post-shibe.yml`.
51-
52-
All the logic to fetch a Shiba image and post to Twitter is in `./index.js`.
53-
54-
55-
# Publishing to Github
56-
57-
> ⚠ Do NOT publish your `.env` to GitHub. Doing this will let anyone send posts to your Twitter account on your behalf.
58-
59-
1. Add your Twitter API as [GitHub secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) like so:
60-
61-
![Screenshot of GitHub Secrets with `CONSUMER_KEY`,`CONSUMER_SECRET`, `ACCESS_TOKEN_KEY` and `ACCESS_TOKEN_SECRET`](https://user-images.githubusercontent.com/18376481/90680314-95b73500-e259-11ea-8b06-75067520cefc.PNG)
62-
63-
64-
Happy hacking 🤓.
13+
| site | status |
14+
|------------|----------------|
15+
| X(Twitter) | [![Post Shiba To Twitter/X Hourly](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml/badge.svg)](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml) |
16+
| Mastodon | [![Post Shiba To Mastodon Hourly](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-mastodon.yml/badge.svg)](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-mastodon.yml) |
17+
| Bluesky | coming soon... |

0 commit comments

Comments
 (0)