Skip to content

Instantly share code, notes, and snippets.

View Developer-Mike's full-sized avatar
🏮

mika.dev Developer-Mike

🏮
View GitHub Profile
@bpanthi977
bpanthi977 / rclone-exclude.py
Last active May 14, 2025 20:41
Create rclone --exclude-from list by recursively visting .gitignore files
#!/usr/bin/env python
import os
import subprocess
def append_parentpath(path, ignore_string):
return [path + '/' + line for line in ignore_string.splitlines()]
def traverse_and_generate(path, printpath=""):
dirs = os.listdir(path)
if '.git' in dirs: