diff options
author | Slack Coder <slackcoder@server.ky> | 2024-04-08 15:29:11 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-07-18 11:47:49 -0500 |
commit | ae748859be8d6d3ed3c0929770f0c287ab6d6460 (patch) | |
tree | 284d3bf3d7fa496a9d334391eac996affc5a01b9 /README.md | |
parent | c2267767ca8ed06018d26a45b483c44b7c4234cf (diff) | |
download | mirror-ae748859be8d6d3ed3c0929770f0c287ab6d6460.tar.xz |
Port to Golang
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ac2e91 --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# Mirror + +Mirror free and open-source projects you like with minimal effort. + +Use this project as a service to keep a local or hosted copy of the projects +source code or their assets. + +## Status + +This project is in pre-alpha and under active development. Expect rapid and +breaking changes. + +## Requirements + +The following applications are required on your system. + + - Golang >= 1.22.4 + - git + - rsync + +## Verification + +Verify the project and its assets using the GPG Key included in the project. + +``` +gpg --import GPG-KEY +git commit verify-commit HEAD +``` + +To verify the projects vendored depnendencies: + +``` +go mod verify +``` + +## Building and Installation + +### Slackware + +You can create a package using the Slackbuild script provided with the project. + +``` +cd contrib/slackbuild +sudo sh *.SlackBuild +``` + +### Other Unix-like systems + +Standard practice is to install under /usr/local/bin + +``` +sudo GOBIN=/usr/local/sbin go build ./cmd/... +``` + +## Configuration + +Configuration is provided via json file format. + + - `min-interval` is the minimum time to wait before mirroring a project. + - `max-interval` is the minimum time to wait before mirroring a project. + - `mirrors` is the list of projects you want mirrored and how. + - `rsync` for mirroring files. + - `git` for mirroring project source code. + - `github-assets` for mirroring Github project assets. + +Refer to the following example. Mirror will mirror each project at a random +interval between 1 and 24 hours. + +``` +{ + "min-interval": "1h", + "max-interval": "24h", + "mirrors": [ + { + "method": "rsync", + "from": "rsync://mirrors.kernel.org/slackware/slackware64-15.0", + "to": "/mirror/slackware/slackware64-15.0" + }, + { + "method": "rsync", + "from": "rsync://mirrors.kernel.org/slackware/slackware-iso/slackware64-15.0-iso", + "to": "/mirror/slackware/slackware64-15.0-iso" + }, + { + "method": "rsync", + "from": "rsync://mirrors.kernel.org/slackware/slackware64-current", + "to": "/mirror/slackware/slackware64-current" + }, + { + "method": "git", + "from": "https://github.com/ytdl-org/youtube-dl", + "to": "/srv/git/slackcoder/youtube-dl", + "description": "Command-line program to download videos from YouTube.com and other video sites" + }, + { + "method": "github-assets", + "from": "https://github.com/ytdl-org/youtube-dl", + "to": "/mirror/youtube-dl" + } + ] +} +``` |