There are many solutions for automatically downloading files from GitHub. However, they work easily mainly under Linux, needing the libraries wget or curl. If someone works with Windows or directly wants to use MATLAB, this program is useful.
The syntax is
filestr = githubFetch(user, repository, downloadType, name)
with the inputs
user: name of the user or the organization
repository: name of the repository
downloadType: 'branch' or 'release'
name: if downloadType is 'branch': branch name (default: 'master')
if downloadType is 'release': release version (default: 'latest')
and the output
filestr: path to the downloaded file (empty if the downloading failed)
Examples:
1) githubFetch('GLVis', 'glvis', 'branch')
% same as githubFetch('GLVis', 'glvis', 'branch', 'master')
2) githubFetch('matlab2tikz', 'matlab2tikz', 'branch', 'develop')
3) githubFetch('matlab2tikz', 'matlab2tikz', 'release', '1.1.0')
4) githubFetch('matlab2tikz', 'matlab2tikz', 'release')
% same as githubFetch('matlab2tikz', 'matlab2tikz', 'release', 'latest')
Zitieren als
Zoltán Csáti (2024). githubFetch (https://github.com/CsatiZoltan/githubFetch), GitHub. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats >
- Test and Measurement >
- MATLAB > Installation and Licensing > Install Products >
- MATLAB > Software Development Tools > Projects >
Tags
Quellenangaben
Inspiriert: human body parts detection
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Versionen, die den GitHub-Standardzweig verwenden, können nicht heruntergeladen werden
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.1.0.0 | Title corrected. |
|
|
1.0.0.0 |
|