Git Product home page Git Product logo

download-github-folder's Introduction

download-github-folder

What This Project Does

This project allows you to download any folder inside a repo on github.

Requirements

You need to have installed latest node, git, npm

Initialization

Execute this:

# Clone this repo:
git clone -b main --depth 1 https://github.com/nikelborm/download-github-folder.git
# cd to it:
cd download-github-folder
# Install dependencies:
npm install
# Create .env file:
cp .template.env .env

Then get personal github access token here

Environment Variables

  • GITHUB_ACCESS_TOKEN: This is your personal access token from GitHub. It is used to authenticate your requests to the GitHub API. You can generate one from your GitHub account settings.
  • GITHUB_REPO_OWNER: This is the username of the owner of the repository you are trying to download from. For example, if the repository's URL is https://github.com/apache/superset, the owner is apache.
  • GITHUB_REPO_NAME: This is the name of the repository you are trying to download from. In the example above, the repository name is superset.
  • PATH_TO_DIRECTORY_IN_REPO: This is the path to the directory you want to download. It can be directory that lies inside root of repo like docker or it can be some nested directory like docker/nginx.
  • COMMIT_SHA_HASH_OR_BRANCH_NAME_OR_TAG_NAME: This is the commit SHA hash, branch name, or tag name you want to download from. If you don't specify it, the default branch in the repository will be used.

How to use

  1. Set env variables in .env file
  2. Run npm start

download-github-folder's People

Contributors

nikelborm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.