https://github.com/jsonkao/sync-archives
A collection of scripts for syncing local and remote archives.
https://github.com/jsonkao/sync-archives
Last synced: about 1 year ago
JSON representation
A collection of scripts for syncing local and remote archives.
- Host: GitHub
- URL: https://github.com/jsonkao/sync-archives
- Owner: jsonkao
- Created: 2020-04-01T15:09:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-07T12:39:11.000Z (about 3 years ago)
- Last Synced: 2025-02-06T10:15:16.524Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A collection of scripts for syncing local and remote archives.
## Setup
1. Clone this directory and `npm install`.
2. For archives on GitHub: Create a `.env` file. Set `TOKEN` to your [OAuth token](https://help.github.com/articles/creating-an-access-token-for-command-line-use) (use spec-scraper-bot if you can). Add `.env` to your [`.gitignore`](https://guide.freecodecamp.org/git/gitignore/).
3. For archives on S3: Configure `spec-graphics` AWS credentials.
## GitHub archives
$ node github-download.js CONTENT_PATH OUTPUT_PATH
This script downloads an archive from GitHub.
The content path should be of the form `/repos/:owner/:repo/contents/:path`. The output path is a local directory. The script will make the output path if it doesn't already exist.
$ node github-upload.js INPUT_PATH CONTENT_PATH
This script uploads a local archive to GitHub.
The content path should be of the form `/repos/:owner/:repo/contents/:path`. The input path is a local directory. The script will make the input path if it doesn't already exist.
## S3 archives
_In progress._