项目作者: davidderus

项目描述 :
Your everyday direct-download companion
高级语言: Go
项目地址: git://github.com/davidderus/christopher.git
创建时间: 2017-09-30T18:23:27Z
项目社区:https://github.com/davidderus/christopher

开源协议:MIT License

下载


Christopher v1.0.0-alpha.5

Build Status
Go Report Card
GoDoc

Disclaimer

⚠️ This app is not maintained anymore ⚠️

Why? After spending some time building my own download helper, I realised that reinventing the wheel is less efficient than using an existing solution and just spending time on configuration and updates.

If you want to use and update this project, just fork it :)

Description

Christopher is your everyday direct-download companion.

It automatically grabs new episodes from RSS feeds, debrids their URL if needed,
and send them to a downloader service.

It also offers an integrated webserver for remote URL submission and accepts
debrid and download instruction from the command line.

Usage

  1. # Starts a FeedWatcher
  2. christopher feed-watcher
  3. # shorter version: christopher fw
  4. # Runs a webserver with a simple interface to debrid and download URIs
  5. christopher webserver
  6. # shorter version: christopher ws
  7. # Debrids an URI
  8. christopher debrid "http://rapidgator.net/file/HTGAWM.mkv"
  9. # shorter version: christopher de "http://rapidgator.net/file/HTGAWM.mkv"
  10. # Downloads an URI
  11. christopher download "https://google.fr"
  12. # shorter version: christopher do "https://google.fr"
  13. # Debrids and downloads an URI
  14. christopher debrid-download "http://rapidgator.net/file/HTGAWM.mkv"
  15. # shorter version: christopher dedo "http://rapidgator.net/file/HTGAWM.mkv"
  16. # Use a custom config file (default in ~/.config/christopher/config.toml)
  17. christopher -c ~/my/custom/config.toml […]

Configuration

Christopher looks for a toml configuration file at
$HOME/.config/christopher/config.toml.

  1. # Download configuration (required)
  2. # The downloader is an external service Christopher pushes links to.
  3. [downloader]
  4. # Name of the service downloading URIs
  5. name = "aria2"
  6. [downloader.auth_infos]
  7. token = "my-good-token"
  8. rpc_url = "http://127.0.0.1:6800/jsonrpc"
  9. # Debrider configuration (optional)
  10. # The debrider converts links from specific services to a downloadable link.
  11. # Each link sent to Christopher is first tested against each debriders
  12. # to see if it can be debrided.
  13. [debrider]
  14. name = "AllDebrid"
  15. [debrider.auth_infos]
  16. username = "valid-username"
  17. password = "valid-password"
  18. base_url = "https://alldebrid.com"
  19. # FeedWatcher configuration (optional)
  20. # The feedwatcher watch some feeds and send every new links
  21. # to the debriders/downloader
  22. [feedwatcher]
  23. # Defining a custom watch interval in minutes (default to 30 min.)
  24. watch_interval = 5
  25. # Adding one feed for the feedwatcher to look for
  26. [[feedwatcher.feeds]]
  27. title = "DirectDownload Feed"
  28. # URL to the provider feed
  29. url = "https://directdownload.tv"
  30. provider = "DirectDownload"
  31. # Providers configuration (optional)
  32. # For each feed provider, you can setup some specific config like a list
  33. # of host to send to the debrider.
  34. [providers]
  35. # Provider config key and feed provider key must be the same
  36. [providers.DirectDownload]
  37. # If specified, favorite_hosts will be looked for in the provider links.
  38. # If none of them are found, nothing will be downloaded.
  39. # If not specified, the first link available is downloaded.
  40. favorite_hosts = ["uploaded.net", "rapidgator.net"]
  41. # WebServer configuration (optional)
  42. # The webserver accepts valid URLs and sent them to Christopher
  43. # debriders/downloader
  44. [webserver]
  45. # Setting a custom host (default to "127.0.0.1")
  46. host = "0.0.0.0"
  47. # Setting a custom webserver port (default to 8000)
  48. port = 8080
  49. # Defining a secret for the CSRF token generation (required)
  50. secret = "my-strong-secret"
  51. # Constraining CSRF cookie to be HTTPS only if true (default to false)
  52. secure_cookie = true
  53. # Setting a realm for the HTTP digest auth (default to "christopher.local")
  54. auth_realm = "download-helper.local"
  55. # Users are a list of allowed users.
  56. # If no users are given, no Digest auth is setup.
  57. [[webserver.users]]
  58. name = "johndoe"
  59. # Setting a password via a MD5 string using:
  60. # `echo -n "$username:download-helper.local:$password" | md5`
  61. # Also works with all the algorithms supported by HTTP Digest
  62. password = "36f0730e47562fbdf9b91434130f91f2"
  63. # Teller configuration (optional)
  64. # The Teller handles logging across the whole application.
  65. # It supports text and JSON logging with variables.
  66. [teller]
  67. # A level from when the Teller must log things
  68. # Default is `info`, meaning info logs and above will be shown.
  69. log_level = "debug"
  70. # The log items format
  71. # Default is `text`
  72. log_formatter = "json"

Supported services

Here is a complete list of all supported services.

Do not hesitate to write a PR with some tests to add more.

Providers

  • DirectDownload (provider = "DirectDownload" # or dd, directdownload, directdownload.tv)

Debriders

  • AllDebrid (name = "AllDebrid" # or alldebrid, Alldebrid, ad)

Downloaders

  • Aria2 (name = "aria2" # or Aria2, aria)

Upcoming features

  • A complete logger with log levels handling
  • A download history to avoid duplicates and show status in webserver
  • A successful download notifier (push or email)
  • A lighter Docker Image
  • A better communication between the webserver and Christopher core
  • A documentation about the dispatcher and its stories/scenarios

Docker

You can run Christopher with Docker with the following command:

  1. # First build the image
  2. docker build -t christopher .
  3. # As a command line debrider
  4. docker run -v $HOME/.config/christopher/config.toml:/christopher/config.toml:ro christopher debrid "http://rapidgator.net/file/HTGAWM.mkv"

In order to download files, you must give the christopher container access
to a Downloader.

Looking at the docker-compose.yml file, you will see a basic example of a
working christopher + aria2 setup. Try it with docker-compose up.

Remember that you need to update your christopher config file with the right
aria2 RPC token and use http://aria2:6800/jsonrpc as the rpc_url.

Development

To build bindata file, use go-bindata -pkg webserver -o webserver/bindata.go -prefix webserver webserver/templates/.

Licence

MIT Licence. Click here to see the full text.