Skip to content

Latest commit

 

History

History
139 lines (101 loc) · 4.36 KB

MIGRATING.md

File metadata and controls

139 lines (101 loc) · 4.36 KB

Migration guide

Migrate assets (episodes text, audio, covers)

How to migrate a podcast to a local storage on this website?

  • Enable download assets in scripts/podcast_resources.rb:

e.g.

recommande = {
    :url => "https://recommande.duckdns.org/episodes.mp3.rss",
    :separator => "-",
    :usual_author => "Yattoz",
    :always_people => {"yattoz" => "Yattoz"},
    :podcast_key => "recommande",
    :location => Location::LOCAL,
    :cover_keep_orig => true,
    :audio_download => true,
    :resources_download => true
}
  • clean and regenerate podcast resources with ruby scripts/podcast_resources.rb --clean PODCASTKEY. This will remove old pages. The new generated pages will have links that point locally instead of remotely (e.g. /audio/thing.mp3 etc.)
  • Change feed link in docs/podcast/#{podcast}/README.md with local link, like feed: /podcasts/recommande/feed.rss
  • add line to .gitignore to not ignore the newly added podcast, e.g.: !docs/**/recommande/**
  • set location of podcast as Location::LOCAL in script/podcast_resources.rb
  • generate RSS link with ruby scripts/generate_rss.rb (run from top folder)

You should be good to go now for the server.

  • set the new RSS feed link in iTunes, Spotify, etc.

Create account and folder structure

  • Create an account with /usr/sbin/adduser podcastname with a strong password
  • login with SSH
  • change group ownership of the following directories to allow user podcastname to write on these only:
    • audio/#{podcastname}
    • images/#{podcastname}
    • resources/#{podcastname}
    • docs/podcasts/#{podcastname}

so in bash:

# as user $PODCASTKEY
export PODCASTKEY=$USER
su
# as root
chown -R $PODCASTKEY:developer /opt/calvinball-website/audio/$PODCASTKEY
chown -R $PODCASTKEY:developer /opt/calvinball-website/images/$PODCASTKEY
chown -R $PODCASTKEY:developer /opt/calvinball-website/resources/$PODCASTKEY
chown -R $PODCASTKEY:developer /opt/calvinball-website/docs/podcasts/$PODCASTKEY

This should allow user $PODCASTKEY to write on the directories they have access as a group.

Remember to chmod 775 these folders too (give RWX access to group!)

chmod 775 -R /opt/calvinball-website/audio/$PODCASTKEY
chmod 775 -R /opt/calvinball-website/images/$PODCASTKEY
chmod 775 -R /opt/calvinball-website/resources/$PODCASTKEY
chmod 775 -R /opt/calvinball-website/docs/podcasts/$PODCASTKEY
  • from root account, add user to podcasters group to have access to generation_token:
/usr/sbin/usermod -G podcasters $PODCASTKEY

People with the account should now drop their files in the correct folders.

For ease of manipulation create a symlink to the calvinball-website folder in their home:

# as user $PODCASTKEY
ln -s /opt/calvinball-website $HOME/calvinball-website

Known bug