Compare commits
No commits in common. "86445351b1e56aefaeb2ca260e6837a7c718d108" and "8c634c506d97732a4cc5191fbc341367fb37e341" have entirely different histories.
86445351b1
...
8c634c506d
31
.github/workflows/generate_filetree.yml
vendored
|
@ -1,31 +0,0 @@
|
|||
name: 🌴 Generate File Tree
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
architecture: "x64"
|
||||
|
||||
- name: Generate File Tree
|
||||
run: python config/tree.py svg png
|
||||
|
||||
- name: Load to GitHub
|
||||
run: |-
|
||||
git diff
|
||||
git config --global user.email "noreply@lammers.media"
|
||||
git config --global user.name "Dashboard Icons Bot"
|
||||
git add tree.json
|
||||
git commit -m ":construction_worker: Generates file_tree.json" || exit 0
|
||||
git push
|
2
.github/workflows/icons-page-generation.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Load to GitHub
|
||||
run: |-
|
||||
git diff
|
||||
git config --global user.email "noreply@lammers.media"
|
||||
git config --global user.email "noreply@walkx.fyi"
|
||||
git config --global user.name "Dashboard Icons Bot"
|
||||
git add -A
|
||||
git commit -m ":construction_worker: Generates ICONS.md" || exit 0
|
||||
|
|
2
ICONS.md
|
@ -70,4 +70,4 @@ Please review the [Contribution Guidelines](CONTRIBUTING.md) before contributing
|
|||
|
||||
Read our [LICENSE](LICENSE) for information regarding the use of our software and assets. By accessing or using this repository, you agree to be bound by the terms and conditions of the license.
|
||||
|
||||
For questions or concerns regarding the license, contact me at hey@lammers.media before using or distributing the contents of this repository.
|
||||
For questions or concerns regarding the license, contact me at walkxnl@gmail.com before using or distributing the contents of this repository.
|
|
@ -1,54 +0,0 @@
|
|||
import os
|
||||
import json
|
||||
import sys
|
||||
|
||||
def folder_to_json(path):
|
||||
tree = {}
|
||||
base_folder_name = os.path.basename(os.path.normpath(path)) # Get the base folder name
|
||||
|
||||
# Ensure the path doesn't return an empty string or dot.
|
||||
base_folder_name = base_folder_name if base_folder_name else os.path.basename(os.getcwd())
|
||||
|
||||
for root, dirs, files in os.walk(path):
|
||||
# Get the relative path of the root directory
|
||||
relative_path = os.path.relpath(root, path)
|
||||
|
||||
# Use base folder name for root, and append relative path for subfolders
|
||||
key = base_folder_name if relative_path == '.' else os.path.join(base_folder_name, relative_path)
|
||||
|
||||
# Only add the folder if there are files
|
||||
if files:
|
||||
tree[key] = files
|
||||
|
||||
return tree
|
||||
|
||||
def generate_combined_tree(paths):
|
||||
combined_tree = {}
|
||||
|
||||
for path in paths:
|
||||
# Add folder tree for each path
|
||||
combined_tree.update(folder_to_json(path))
|
||||
|
||||
return combined_tree
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Get the list of folder paths from command-line arguments
|
||||
folder_paths = sys.argv[1:]
|
||||
|
||||
if not folder_paths:
|
||||
print("Please provide at least one folder path.")
|
||||
sys.exit(1)
|
||||
|
||||
# Check if 'tree.json' exists
|
||||
if os.path.exists('tree.json'):
|
||||
print("'tree.json' already exists. No file was created.")
|
||||
sys.exit(0)
|
||||
|
||||
# Generate the combined folder tree for all specified paths
|
||||
combined_folder_tree = generate_combined_tree(folder_paths)
|
||||
|
||||
# Write the combined JSON structure to a file named tree.json
|
||||
with open('tree.json', 'w') as f:
|
||||
json.dump(combined_folder_tree, f, indent=4)
|
||||
|
||||
print("Folder tree successfully written to 'tree.json'.")
|
BIN
png/13ft.png
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 243 B |
BIN
png/2fauth.png
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 81 KiB |
BIN
png/alist.png
Before Width: | Height: | Size: 18 KiB |
BIN
png/alloy.png
Before Width: | Height: | Size: 19 KiB |
BIN
png/alpine.png
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 12 KiB |
BIN
png/aruba.png
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.6 KiB |
BIN
png/astral.png
Before Width: | Height: | Size: 3.3 KiB |
BIN
png/avg.png
Before Width: | Height: | Size: 89 KiB |
BIN
png/awwesome.png
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.3 KiB |
BIN
png/coolify.png
Before Width: | Height: | Size: 1.2 KiB |
BIN
png/davis.png
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
png/docsify.png
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 18 KiB |
BIN
png/eblocker.png
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 7.4 KiB |
BIN
png/esphome.png
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 7.4 KiB |
BIN
png/f-droid.png
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
png/finamp.png
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.1 KiB |
BIN
png/findroid.png
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.5 KiB |
BIN
png/gaseous.png
Before Width: | Height: | Size: 21 KiB |
BIN
png/gitee.png
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 5.1 KiB |
BIN
png/glances.png
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 38 KiB |
BIN
png/go2rtc.png
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 30 KiB |
BIN
png/godaddy.png
Before Width: | Height: | Size: 18 KiB |
BIN
png/gollum.png
Before Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 16 KiB |
BIN
png/gpt4free.png
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 3.5 KiB |
BIN
png/hoarder.png
Before Width: | Height: | Size: 3.5 KiB |
BIN
png/homey.png
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 41 KiB |
BIN
png/jackett.png
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 41 KiB |
BIN
png/kagi.png
Before Width: | Height: | Size: 4.6 KiB |
BIN
png/kestra.png
Before Width: | Height: | Size: 5.3 KiB |
BIN
png/kpn.png
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 7.3 KiB |
BIN
png/locals.png
Before Width: | Height: | Size: 7.4 KiB |
BIN
png/lynx.png
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 29 KiB |
BIN
png/manyfold.png
Before Width: | Height: | Size: 202 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 28 KiB |
BIN
png/myspeed.png
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 653 B |
BIN
png/netapp.png
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.6 KiB |
BIN
png/nocobase.png
Before Width: | Height: | Size: 6.6 KiB |
BIN
png/ollama.png
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
png/overleaf.png
Before Width: | Height: | Size: 2.7 KiB |
BIN
png/owntone.png
Before Width: | Height: | Size: 19 KiB |
BIN
png/p1ib.png
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.4 KiB |
BIN
png/patreon.png
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 2.6 KiB |