Merge branch 'main' of ssh://codessh.lema.org:2222/santiago/fedi_slurp

This commit is contained in:
Santiago Lema 2025-05-21 01:23:32 +00:00
commit 511841b9bf

View file

@ -1,4 +1,3 @@
# Fedi Link Fetcher
A pair of PHP scripts that extract links from your Mastodon / snac bookmarks and add them to:
@ -6,29 +5,54 @@ A pair of PHP scripts that extract links from your Mastodon / snac bookmarks and
- YouTube Playlist (Google oAUTH API)
- Readeck (simple API token)
## TODO instructions readeck API
## 1. Getting a Readeck token
how to get tokeb in web ui
In Web UI:
## TODO isntructions Youtube PlayList
- Settings, API tokens, Create API Token
- Check Bookmarks Read + Write
Save it as:
```
/_credentials/token.json
```
## 2. Getting a Youtube API token
- Go to the Google Cloud Console:
- Project > APIs & Services > Credentials
- Create oauth client ID
- for TV and limited INPUT
- Download the OAuth 2.0 Client ID JSON file
Save it as:
```
/_credentials/client_secret.json
```
## 3. Add your Google account as a test user
- Go to Google Cloud Console > OAuth consent screen
- ~> Audience
- Under “Test users”
- Add your Google email for your Youtube account
1. Go to the Google Cloud Console:
• Project > APIs & Services > Credentials
create oauth client ID
for TV and limited INPUT
• Download the OAuth 2.0 Client ID JSON file
save as /home/snac/youtube_list/client_secret.json
Option 1: Add your Google account as a test user
1. Go to Google Cloud Console > OAuth consent screen
~> Audience
2. Scroll to “Test users”
3. Add your Google email (e.g. jacques.lema@gmail.com)
## 4. Download Google API Client with PHP Composer
```
composer require google/apiclient:^2.0
```
## 5. Run command to create fedilist and get a token
```
./create_fedilist.php
```
## 6. Add the command to your cron to fetch the links regularly
```
*/5 * * * * /home/snac/fedi_slurp/fedi_slurp.php > /home/snac/logs/fedi_slurp.log 2>&1
```