Code Monkey home page Code Monkey logo

base16-conversion-scripts's Introduction

Base16 scheme conversion

This conversion script allows you to convert Base16 scheme YAML files to other formats such as JSON, Lua, TOML, CSV and XML.

Requirements

Before getting started, you need to have Python installed. Additionally, you need to install the PyYAML package.

pip install pyyaml

# for XML conversion
pip install lxml

Step-by-Step

Clone the repository and navigate to it:

git clone https://github.com/Diogo-ss/base16-conversion-scripts.git
cd base16-conversion-scripts

Execute the script with the following command:

python <script_name>.py

The script will create the base16 folder with the converted files in the same directory as the YAML files.

Supported Output Formats

The script supports conversion of Base16 schemes to the following formats:

JSON
{
    "scheme": "standardized-dark",
    "author": "ali (https://github.com/ali-githb/base16-standardized-scheme)",
    "base00": "222222",
    "base01": "303030",
    "base02": "555555",
    "base03": "898989",
    "base04": "898989",
    "base05": "c0c0c0",
    "base06": "e0e0e0",
    "base07": "ffffff",
    "base08": "e15d67",
    "base09": "fc804e",
    "base0A": "e1b31a",
    "base0B": "5db129",
    "base0C": "21c992",
    "base0D": "00a3f2",
    "base0E": "b46ee0",
    "base0F": "b87d28"
}
Lua
-- This file was automatically generated from a YAML file.

return {
	scheme = "standardized-dark",
	author = "ali (https://github.com/ali-githb/base16-standardized-scheme)",
	base00 = "222222",
	base01 = "303030",
	base02 = "555555",
	base03 = "898989",
	base04 = "898989",
	base05 = "c0c0c0",
	base06 = "e0e0e0",
	base07 = "ffffff",
	base08 = "e15d67",
	base09 = "fc804e",
	base0A = "e1b31a",
	base0B = "5db129",
	base0C = "21c992",
	base0D = "00a3f2",
	base0E = "b46ee0",
	base0F = "b87d28",
}
TOML
# This file was automatically generated from a YAML file.

scheme = "standardized-dark"
author = "ali (https://github.com/ali-githb/base16-standardized-scheme)"
base00 = "222222"
base01 = "303030"
base02 = "555555"
base03 = "898989"
base04 = "898989"
base05 = "c0c0c0"
base06 = "e0e0e0"
base07 = "ffffff"
base08 = "e15d67"
base09 = "fc804e"
base0A = "e1b31a"
base0B = "5db129"
base0C = "21c992"
base0D = "00a3f2"
base0E = "b46ee0"
base0F = "b87d28"
XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <scheme>standardized-dark</scheme>
  <author>ali (https://github.com/ali-githb/base16-standardized-scheme)</author>
  <base00>222222</base00>
  <base01>303030</base01>
  <base02>555555</base02>
  <base03>898989</base03>
  <base04>898989</base04>
  <base05>c0c0c0</base05>
  <base06>e0e0e0</base06>
  <base07>ffffff</base07>
  <base08>e15d67</base08>
  <base09>fc804e</base09>
  <base0A>e1b31a</base0A>
  <base0B>5db129</base0B>
  <base0C>21c992</base0C>
  <base0D>00a3f2</base0D>
  <base0E>b46ee0</base0E>
  <base0F>b87d28</base0F>
</root>
CSV
Key,Value
scheme,standardized-dark
author,ali (https://github.com/ali-githb/base16-standardized-scheme)
base00,222222
base01,303030
base02,555555
base03,898989
base04,898989
base05,c0c0c0
base06,e0e0e0
base07,ffffff
base08,e15d67
base09,fc804e
base0A,e1b31a
base0B,5db129
base0C,21c992
base0D,00a3f2
base0E,b46ee0
base0F,b87d28

Other formats will be added soon.

Notes

  • Make sure you have installed PyYAML before running the script.
  • Make sure you have navigated to the correct directory before running the script.

base16-conversion-scripts's People

Contributors

diogo-ss avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.