项目作者: Base24

项目描述 :
Helper programs to create templates and schemes
高级语言: Python
项目地址: git://github.com/Base24/base24-helpers.git
创建时间: 2020-03-04T22:46:12Z
项目社区:https://github.com/Base24/base24-helpers

开源协议:MIT License

下载


Github top language
Codacy grade
Repository size
Issues
License
Commit activity
Last commit

base24-helpers

Project Icon

Helper programs to create templates and schemes.

base24tools.py

Lib file used by iterm2base24.py and windowsTerminal2b24.py with the following
function:

  1. def process(base24, base24lookup, sourceThemeDict, bgNumber, fgNumber):
  2. """process a base24 dict using a lookup table to translate the source theme
  3. onto the base24 scheme
  4. Args:
  5. base24 (dict): a dictionary representing a base24 scheme
  6. base24lookup (dict): a dictionary mapping base24 colour ids to the
  7. respective key in the sourceThemeDict
  8. sourceThemeDict (dict): a dictionary representing the source theme/
  9. scheme
  10. bgNumber (int): lower base0N bound for the background 0-9
  11. fgNumber (int): upper base0N bound for the foreground 0-9. Must be
  12. greater than bgNumber
  13. Returns:
  14. dict: base24 dict to write to scheme file
  15. """

baseCompare.py

Compare base16 and base24 Windows terminal themes quickly

  1. usage: baseCompare.py [-h] [--all] themes
  2. Compare base16 and base24 windows terminal themes quickly
  3. positional arguments:
  4. themes directory containing generated windows terminal themes
  5. optional arguments:
  6. -h, --help show this help message and exit
  7. --all compare all schemes

batchIterm2b24.py

Convert a directory containing .itermcolors to base24 schemes

  1. usage: batchIterm2b24.py [-h] itermschemes
  2. Convert .itermcolors to base24 scheme in a directory
  3. positional arguments:
  4. itermschemes directory containing itermschemes
  5. optional arguments:
  6. -h, --help show this help message and exit

iterm2base24.py

Convert a singular .itermcolors to a base24 scheme

  1. usage: iterm2base24.py [-h] file
  2. Convert .itermcolors to base24 scheme
  3. positional arguments:
  4. file file.itermschemes
  5. optional arguments:
  6. -h, --help show this help message and exit

windowsTerminal2b24.py

Convert a profiles.json (such as your own) to a number of base24 schmes

  1. usage: windowsTerminal2b24.py [-h] file
  2. Convert profiles.json to base24 scheme
  3. positional arguments:
  4. file profiles.json
  5. optional arguments:
  6. -h, --help show this help message and exit

schemeSuggest.py

Suggest scheme colours based on a base24 theme template and the theme file

  1. usage: schemeSuggest [-h] [--mode MODE] template theme
  2. Pair colours with base24 colour ids
  3. positional arguments:
  4. template relative or abs path to the base24 template
  5. theme relative or abs path to the theme file
  6. optional arguments:
  7. -h, --help show this help message and exit
  8. --mode MODE color format: hex (ff00aa), reversehex (aa00ff), rgb (255,0,170), reversergb (170,0,255), dec (1.0,0,0.666),
  9. reversedec (0.666,0,1.0)

templateGen.py

Take and existing theme and a base24 scheme file and produces a base24 template
file

  1. usage: templateGen [-h] [--mode MODE] [--fuzz FUZZ] colour_scheme theme
  2. Generate a base24 template from an existing scheme and a theme file
  3. positional arguments:
  4. colour_scheme relative or abs path to the base24 colour scheme
  5. theme relative or abs path to the theme file
  6. optional arguments:
  7. -h, --help show this help message and exit
  8. --mode MODE color format: hex (ff00aa), reversehex (aa00ff), rgb (255,0,170), reversergb (170,0,255), dec (1.0,0,0.666),
  9. reversedec (0.666,0,1.0)
  10. --fuzz FUZZ find 'close' colours and replace these ((r,g,b)+-fuzz: default=0, max-recommended=5)

schemeTableGen.py

Generate a table to put in a scheme project readme

  1. usage: schemeTableGen.py [-h] scheme
  2. Generate a table to put in a scheme project readme
  3. positional arguments:
  4. scheme base24 scheme file
  5. optional arguments:
  6. -h, --help show this help message and exit

Language information

Built for

This program has been written for Python 3 and has been tested with
Python version 3.8.0 https://www.python.org/downloads/release/python-380.

Install Python on Windows

Chocolatey

  1. choco install python

Download

To install Python, go to https://www.python.org and download the latest
version.

Install Python on Linux

Apt

  1. sudo apt install python3.8

How to run

With VSCode

  1. Open the .py file in vscode
  2. Ensure a python 3.8 interpreter is selected (Ctrl+Shift+P > Python:Select
  3. Interpreter > Python 3.8)
  4. Run by pressing Ctrl+F5 (if you are prompted to install any modules, accept)

    From the Terminal

    1. ./[file].py

Download

Clone

Using The Command Line

  1. Press the Clone or download button in the top right
  2. Copy the URL (link)
  3. Open the command line and change directory to where you wish to
    clone to
  4. Type ‘git clone’ followed by URL in step 2
    1. $ git clone https://github.com/Base24/base24-helpers

More information can be found at
https://help.github.com/en/articles/cloning-a-repository

Using GitHub Desktop

  1. Press the Clone or download button in the top right
  2. Click open in desktop
  3. Choose the path for where you want and click Clone

More information can be found at
https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop

Download Zip File

  1. Download this GitHub repository
  2. Extract the zip archive
  3. Copy/ move to the desired location

Community Files

Licence

MIT License
Copyright (c) Base24
(See the LICENSE for more information.)

Changelog

See the Changelog for more information.

Code of Conduct

In the interest of fostering an open and welcoming environment, we
as contributors and maintainers pledge to make participation in our
project and our community a harassment-free experience for everyone.
Please see the
Code of Conduct for more information.

Contributing

Contributions are welcome, please see the Contributing Guidelines for more information.

Security

Thank you for improving the security of the project, please see the Security Policy for more information.