### Adding a New Scheme to Base16 Registry (YAML) Source: https://context7.com/chriskempson/base16-schemes-source/llms.txt This example demonstrates how to add a new scheme to the `list.yaml` file. New entries must follow the `base16-[scheme-name]-scheme` naming convention for repositories and be inserted alphabetically into the list. ```yaml # Example: Adding a new scheme called "midnight" # Repository must be named: base16-midnight-scheme # Add entry in alphabetical position in list.yaml: materia: https://github.com/Defman21/base16-materia midnight: https://github.com/yourusername/base16-midnight-scheme # New entry nebula: https://github.com/Misterio77/base16-nebula-scheme ``` -------------------------------- ### Parse Base16 Scheme Registry with Python Source: https://context7.com/chriskempson/base16-schemes-source/llms.txt This Python script fetches the `list.yaml` registry, parses it using `PyYAML`, and iterates through each scheme. It demonstrates how to extract scheme names and repository URLs, and construct raw URLs for scheme definition files. ```python import yaml import requests # Fetch the scheme list from the repository response = requests.get( "https://raw.githubusercontent.com/chriskempson/base16-schemes-source/main/list.yaml" ) schemes = yaml.safe_load(response.text) # Iterate through all available schemes for scheme_name, repo_url in schemes.items(): print(f"Scheme: {scheme_name}") print(f"Repository: {repo_url}") # Convert GitHub URL to raw YAML URL for scheme files # Each scheme repo contains .yaml files with color definitions raw_base = repo_url.replace("github.com", "raw.githubusercontent.com") + "/main/" print(f"Raw URL base: {raw_base}") print("---") # Output: # Scheme: default # Repository: https://github.com/chriskempson/base16-default-schemes # Raw URL base: https://raw.githubusercontent.com/chriskempson/base16-default-schemes/main/ # --- # Scheme: apprentice # Repository: https://github.com/casonadams/base16-apprentice-scheme # ... ``` -------------------------------- ### Parse Base16 Scheme Registry with Shell Source: https://context7.com/chriskempson/base16-schemes-source/llms.txt This shell script provides a concise way to download and parse the `list.yaml` registry. It filters out comments and empty lines, then iterates through scheme entries to display their names and URLs, with an option to clone repositories. It also includes a command to count the total number of registered schemes. ```bash # Download and parse the scheme list curl -s https://raw.githubusercontent.com/chriskempson/base16-schemes-source/main/list.yaml | \ grep -v "^#" | \ grep -v "^$" | \ while IFS=': ' read -r name url; do echo "Fetching scheme: $name from $url" # Clone each scheme repository # git clone "$url" "schemes/$name" done # Count total schemes curl -s https://raw.githubusercontent.com/chriskempson/base16-schemes-source/main/list.yaml | \ grep -v "^#" | grep -v "^$" | wc -l # Output: 76 ``` -------------------------------- ### Base16 Scheme Registry Format (YAML) Source: https://context7.com/chriskempson/base16-schemes-source/llms.txt The `list.yaml` file serves as the core registry, mapping scheme names to their respective GitHub repository URLs. This format is directly parsed by Base16 builders to discover available color schemes. ```yaml # Official Base16 Schemes default: https://github.com/chriskempson/base16-default-schemes # Community Contributed Schemes - alphabetically ordered apprentice: https://github.com/casonadams/base16-apprentice-scheme atelier: https://github.com/atelierbram/base16-atelier-schemes atlas: https://github.com/ajlende/base16-atlas-scheme dracula: https://github.com/dracula/base16-dracula-scheme gruvbox: https://github.com/dawikur/base16-gruvbox-scheme nord: https://github.com/spejamchr/base16-nord-scheme solarized: https://github.com/aramisgithub/base16-solarized-scheme ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.