This is a Ruby script to download videos from Twitter and upload them to Nextcloud.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Josh McFarland 774f8d3c40 Fixed config file path. 2 months ago
.config.yml.example Initial commit. 2 months ago
.gitignore Initial commit. 2 months ago
Gemfile Initial commit. 2 months ago
Gemfile.lock Initial commit. 2 months ago
README.md Updated README." 2 months ago
vid_getter.rb Fixed config file path. 2 months ago

README.md

This Ruby script will allow you to download videos from Twitter and upload them to a Nextcloud instance.

The last 7 days worth of Tweets are checked.

Replies to tweets that end in the magic_string are found.

Video files from those tweets are downloaded to the video_path.

Videos are uploaded from the video_path to nextcloud.

Entries are written to an sqlite database to keep track of which videos have been handled to avoid duplicates.

Push notification is sent via Pushover to alert about the upload when done.

This script can be batched/scheduled to check and handle your videos regularly. =D

Requirements:

Ruby v3

These Ruby gems: yaml, json, sqlite3, net/http

yt-dlp installed on your machine

https://github.com/yt-dlp/yt-dlp

A Twitter account with API access.

https://developer.twitter.com/en/docs/twitter-api

A Nextcloud account and API access.

https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/basic.html

A Pushover account and API access.

https://pushover.net/api

An example config.yml has been provided.

Please change the information to match your accounts.