Skip to content

glowkeeper/filmArchiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Movie Database Archiver

standard-readme compliant PRs Welcome License: GPL v3

This is the repository of filmArchiver.sh - a tool for grabbing the day's latest posters from The Movie Database and posting them to Arweave.

Table of Contents

Usage

Please fulfil the dependencies beforehand #tl;dr, you must be running hooverd, for which you'll need some arweave tokens. You'll also need an API key from The Movie Database.

filmArchiver.sh -k | --key YOUR_TMDB_API_KEY [-p | --prude] [-m | --movie-only]

(If you do not want to include adult films, supply the -p argument. If you do not want video releases, supply the -m argument).

The final step of the filmArchiver.sh script (which you'll find in the bin subdirectory) uses hooverd to push some generated html to Arweave. The script will output a transaction key from Arweave. It will look like this:

Transaction HtXA0tn_KdTTy9GgBrhMJ3yrYb4nRymkEgUNbKHTdA8 dispatched to arweave.net:443 with response: 200.

Once the transaction has been mined, you can load it in a browser. e.g, https://arweave.net/HtXA0tn_KdTTy9GgBrhMJ3yrYb4nRymkEgUNbKHTdA8. That will display the day's international film releases (looks especially good on mobile). Enjoy!

To check the status of a transaction, e.g. HtXA0tn_KdTTy9GgBrhMJ3yrYb4nRymkEgUNbKHTdA8, load the following: https://arweave.net/tx/HtXA0tn_KdTTy9GgBrhMJ3yrYb4nRymkEgUNbKHTdA8 - if that had not yet been mined, it would've returned Pending (it can take up to 10 minutes to mine Arweave transactions).

Because the script finds the day's film releases, a good way of running filmArchiver.sh is via cron:

59 23 * * * /yourFilmArchiverRepos/binfilmArchiver.sh -k YOUR_TMDB_API_KEY >> /some/log/file 2>&1

That will run the script daily at 23:59. It will output the required transaction key to /some/log/file. You can then use that key to load the html (as above).

Example Output

Built Using

Install

Clone this repository and install all dependencies.

Dependencies

  • The script runs on flavours of Linux (it will probably work on MacOS, too, but that has not been tested)
  • node
  • npm
  • hooverd
  • jq

You will need to create an account on The Movie Database and get one of their API keys (you supply that key to filmArchiver.sh via the -k argument - see usage). You will also need to have some arweave tokens.

Your arweave tokens will come in an arweave keyfile that you supply to hooverd, which must be monitoring port 1908. The easiest way to do that is to daemonise hooverd, using pm2. At the time of writing, hooverd does not appear to be a public npm package, so first clone the hooverd repository. Then, put your arweave keyfile (e.g arweave-keyfile-oJViU9iJRPS-TcFmvVyJhxD5EBqErtMtgXfDdf9UWY4.json) in the home directory of your cloned hooverd repository and amend the scripts section of hooverd's package.json to include the following:

"start": "node hooverd --wallet-file ./YOUR_ARWEAVE_KEYFILE"

You will need to install hooverd's node dependencies:

npm install

Then daemonise hooverd:

pm2 start "npm run start"

You can then run filmArchiver.sh as per usage instructions.

Maintainer

Steve Huckle - created as part of a gitcoin bounty.

Contributing

Contributions welcome - please email Steve Huckle.

License

GNU General Public License v3.0

Please refer to the file: LICENSE for the full text.

About

Load film posters onto the arweave distributed filesystem

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published