-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,005 additions
and
823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,50 @@ | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "SleipnirGroup" | ||
repo_name = "Choreo" | ||
branch = "main" | ||
|
||
# Folders to download | ||
folders = [ | ||
"choreolib/src/main/native/cpp", | ||
"choreolib/src/main/native/include" | ||
] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = [ | ||
"src/main/cpp", | ||
"src/main/include" | ||
] | ||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item['type'] == 'file': | ||
download_file(item['download_url'], os.path.join(destination, item['name'])) | ||
elif item['type'] == 'dir': | ||
subdir = os.path.join(destination, item['name']) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item['path'], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, 'wb') as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "SleipnirGroup" | ||
repo_name = "Choreo" | ||
branch = "main" | ||
|
||
# Folders to download | ||
folders = ["choreolib/src/main/native/cpp", "choreolib/src/main/native/include"] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = ["src/main/cpp", "src/main/include"] | ||
|
||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item["type"] == "file": | ||
download_file( | ||
item["download_url"], os.path.join(destination, item["name"]) | ||
) | ||
elif item["type"] == "dir": | ||
subdir = os.path.join(destination, item["name"]) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item["path"], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, "wb") as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,53 @@ | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "mjansen4857" | ||
repo_name = "pathplanner" | ||
branch = "675-trajectory-generation-v2" | ||
|
||
# Folders to download | ||
folders = [ | ||
"pathplannerlib/src/main/native/cpp", | ||
"pathplannerlib/src/main/native/include" | ||
] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = [ | ||
"src/main/cpp", | ||
"src/main/include" | ||
] | ||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item['type'] == 'file': | ||
download_file(item['download_url'], os.path.join(destination, item['name'])) | ||
elif item['type'] == 'dir': | ||
subdir = os.path.join(destination, item['name']) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item['path'], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, 'wb') as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "mjansen4857" | ||
repo_name = "pathplanner" | ||
branch = "675-trajectory-generation-v2" | ||
|
||
# Folders to download | ||
folders = [ | ||
"pathplannerlib/src/main/native/cpp", | ||
"pathplannerlib/src/main/native/include", | ||
] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = ["src/main/cpp", "src/main/include"] | ||
|
||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item["type"] == "file": | ||
download_file( | ||
item["download_url"], os.path.join(destination, item["name"]) | ||
) | ||
elif item["type"] == "dir": | ||
subdir = os.path.join(destination, item["name"]) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item["path"], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, "wb") as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,64 @@ | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "PhotonVision" | ||
repo_name = "photonvision" | ||
branch = "master" # Assuming the main branch, change if needed | ||
|
||
# Folders to download | ||
folders = [ | ||
"photon-lib/src/main/native/cpp", | ||
"photon-lib/src/main/native/include", | ||
"photon-targeting/src/main/native/cpp", | ||
"photon-targeting/src/main/native/include", | ||
"photon-targeting/src/generated/main/native/cpp", | ||
"photon-targeting/src/generated/main/native/include" | ||
] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = [ | ||
"src/main/cpp", | ||
"src/main/include", | ||
"src/main/cpp", | ||
"src/main/include", | ||
"src/main/cpp", | ||
"src/main/include" | ||
] | ||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item['type'] == 'file': | ||
download_file(item['download_url'], os.path.join(destination, item['name'])) | ||
elif item['type'] == 'dir': | ||
subdir = os.path.join(destination, item['name']) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item['path'], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, 'wb') as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") | ||
import os | ||
import requests | ||
|
||
# GitHub repository details | ||
repo_owner = "PhotonVision" | ||
repo_name = "photonvision" | ||
branch = "master" # Assuming the main branch, change if needed | ||
|
||
# Folders to download | ||
folders = [ | ||
"photon-lib/src/main/native/cpp", | ||
"photon-lib/src/main/native/include", | ||
"photon-targeting/src/main/native/cpp", | ||
"photon-targeting/src/main/native/include", | ||
"photon-targeting/src/generated/main/native/cpp", | ||
"photon-targeting/src/generated/main/native/include", | ||
] | ||
|
||
# Destination directories (change these to your project's subdirectories) | ||
destinations = [ | ||
"src/main/cpp", | ||
"src/main/include", | ||
"src/main/cpp", | ||
"src/main/include", | ||
"src/main/cpp", | ||
"src/main/include", | ||
] | ||
|
||
|
||
def download_folder(owner, repo, path, branch, destination): | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}?ref={branch}" | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
contents = response.json() | ||
for item in contents: | ||
if item["type"] == "file": | ||
download_file( | ||
item["download_url"], os.path.join(destination, item["name"]) | ||
) | ||
elif item["type"] == "dir": | ||
subdir = os.path.join(destination, item["name"]) | ||
os.makedirs(subdir, exist_ok=True) | ||
download_folder(owner, repo, item["path"], branch, subdir) | ||
else: | ||
print(f"Failed to fetch contents: {response.status_code}") | ||
|
||
|
||
def download_file(url, destination): | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
os.makedirs(os.path.dirname(destination), exist_ok=True) | ||
with open(destination, "wb") as f: | ||
f.write(response.content) | ||
print(f"Downloaded: {destination}") | ||
else: | ||
print(f"Failed to download file: {url}") | ||
|
||
|
||
# Download and copy folders | ||
for folder, destination in zip(folders, destinations): | ||
print(f"Downloading {folder} to {destination}") | ||
download_folder(repo_owner, repo_name, folder, branch, destination) | ||
|
||
print("Download and copy process completed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#include <string.h> | ||
#include <regex> | ||
|
||
static const char* dev_ = "dev"; | ||
|
||
namespace photon { | ||
namespace PhotonVersion { | ||
const char* versionString = "UNKNOWN"; | ||
const char* buildDate = "UNKNOWN"; | ||
const bool isRelease = strncmp(dev_, versionString, strlen(dev_)) != 0; | ||
} | ||
} | ||
// Copyright (c) FRC 2053. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the MIT License file in the root of this project | ||
|
||
#include <cstring> | ||
#include <regex> | ||
|
||
static const char *dev_ = "dev"; | ||
|
||
namespace photon { | ||
namespace PhotonVersion { | ||
const char *versionString = "UNKNOWN"; | ||
const char *buildDate = "UNKNOWN"; | ||
const bool isRelease = | ||
std::strncmp(dev_, versionString, std::strlen(dev_)) != 0; | ||
} // namespace PhotonVersion | ||
} // namespace photon |
Oops, something went wrong.