Skip to content

Commit

Permalink
Merge branch 'Schrodinger-Hat:main' into change-to-workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-101 authored May 12, 2022
2 parents 30d40b4 + a0c96a2 commit b8e3745
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [Wabri, TheJoin95]
github: #
patreon: # Replace with a single Patreon username
open_collective: schrodinger-hat
ko_fi: # Replace with a single Ko-fi username
Expand All @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.paypal.com/paypalme/thejoin
custom: #
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug / Feature request
about: Needs or a bug to report
title: ''
labels: ''
assignees: ''

---

**Issues or necessity of a feature**
Here

**Step to reproduce the bug / needs of a new feature**
Steps to reproduce the behavior:
1. '...'
2. '....'
3. screenshot here


**Additional notes**
Add any other notes here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/podcast_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Podcast Readme addition request
about: Add your podcast that is using our repository into our readme
title: 'Podcast Addition Request'
labels: 'podcast-addition'
assignees: ''

---

**Podcast title**
Title here

**Podcast url & social links**
Here..

**Podcast's topic**
here...

**How did you find this project? E.g. google, twitter, github...**
Here

**Additional notes**
Add any other notes here.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Upload Episode from YouTube To Anchor.Fm
uses: Schrodinger-Hat/youtube-to-anchorfm@v0.1.8
uses: Schrodinger-Hat/youtube-to-anchorfm@v1.0.1
env:
ANCHOR_EMAIL: ${{ secrets.ANCHOR_EMAIL }}
ANCHOR_PASSWORD: ${{ secrets.ANCHOR_PASSWORD }}
Expand All @@ -57,6 +57,27 @@ jobs:
**NOTE**: you need to [set up the secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) for *ANCHOR_EMAIL* and *ANCHOR_PASSWORD*. This environment variables are mandatory as they specify the signin account.
## Process a YouTube playlist
Right now, you can process a full playlist (one way only) with
```
curl https://scc-youtube.vercel.app/playlist-items/PLoXdlLuaGN8ShASxcE2A4YuSto3AblDmX \
| jq '.[].contentDetails.videoId' -r \
| tac \
| xargs -I% bash -c "jo id='%' > episode.json && git commit -am % && git push"
```

`https://scc-youtube.vercel.app/playlist-items` is from https://github.com/ThatGuySam/youtube-json-server

`jo` is a json generator https://github.com/jpmens/jo

`tac` is a command present in most linuxes and on mac with brew install coreutils. Its from reversing the list from older to newer. Remove if you want to upload in the order presented on youtube.

`jq` is a json processor https://stedolan.github.io/jq/

This must be run on the folder where your episode.json is.

## Draft Mode

By setting the `SAVE_AS_DRAFT`, the new episode will be published as a draft. This can be useful if you need someone else's
Expand All @@ -69,7 +90,7 @@ env:
## Audio conversion options
ffmpeg is used to convert the video do MP3. It's possible to pass arguments to ffmpeg with `POSTPROCESSOR_ARGS` enviroment
ffmpeg is used to convert the video to MP3. It's possible to pass arguments to ffmpeg with `POSTPROCESSOR_ARGS` enviroment
variable.

See `-postprocessor-args` syntax and options on https://github.com/yt-dlp/yt-dlp#post-processing-options.
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ exec('sudo curl -k -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/

console.log("Waiting for upload to finish");
await page.waitForTimeout(25 * 1000);
await page.waitForXPath('//div[contains(text(),"Save")]/parent::button[not(boolean(@disabled))]', { timeout: UPLOAD_TIMEOUT });
const [saveButton] = await page.$x('//div[contains(text(),"Save")]/parent::button[not(boolean(@disabled))]');
await page.waitForXPath('//button[text()="Save episode" and not(boolean(@disabled))]', { timeout: UPLOAD_TIMEOUT });
const [saveButton] = await page.$x('//button[text()="Save episode" and not(boolean(@disabled))]');
await saveButton.click();
await navigationPromise;

Expand Down

0 comments on commit b8e3745

Please sign in to comment.