semvec/pypi-packages huggingface dataset:
iterm2-colors2rgb 0.1.1
Convert iTerm2 profile colors XML file to RGB

# Convert iTerm2 profile colors to RGB dataset

As a user of iTerm2 and a developer that wants to use python packages supporting colorization 
such as [Rich](), I want to extract the colors from my iTerm2 Profile into an RGB dataset 
that provides:

   * Background (R,G,B)
   * Foreground (R,G,B)
   * List of 8 "normal" colors of (R, G, B)
   * List of 8 "bright" colors of (R, G, B)
   
# Usage

You will first need to export your profile colors from iTerm, as described in the section
below. You can then either use this package directly or programaticaly.

**direct module**<br/>
Consider an iTerm profile with color values that look like this in the app:

![colors in iTerm](https://github.com/jeremyschulman/iterm2-colors2rgb/blob/master/iterm2-profile-colors.png)


After exporting these settings to the default filename "Untitled.itemcolors",
run python:

```
python -m iterm2_colors2rgb Untitled.itermcolors
```   

Outputs (formatted for clarity):
````
(
   (0, 0, 0), 
   (199, 199, 199), 
   [(0, 0, 0), (201, 27, 0), (0, 194, 0), (199, 196, 0), (2, 37, 199), (202, 48, 199), (0, 197, 199), (199, 199, 199), (104, 104, 104)], 
   [(255, 110, 103), (95, 250, 104), (255, 252, 103), (104, 113, 255), (255, 119, 255), (96, 253, 255), (255, 255, 255)]
)
````

**programmatic**<br/>

```python
from iterm2_colors2rgb import iterm2_colors2rgb

# as a tuple (bg, fb, normal_list, bright_list)
colors = iterm2_colors2rgb("Untitled.itermcolors")
```

# Installation
```
pip install iterm2-colors2rgb
```  

# Exporting Profile Colors from iTerm

![export steps](https://github.com/jeremyschulman/iterm2-colors2rgb/blob/master/export-steps.png)

Steps:

  1. Open the iTerm2 app settings
  2. Select the Prefrences option
  3. Select the Profiles option
  4. Select the profile that you want to export
  5. Click the _Color Presents ..._ dropdown to reveal the Export option
  6. Click the Export option
  
You will then be presented with a Save File diaglog box which allows you to
choose the name and location where you want to save your settings.


# Usage with Rich TerminalTheme

If you are using the Rich package and you want to save your console output to file with thes colors you can

```python
from rich.console import TerminalTheme, Console

HTML_SAVE_THEME = TerminalTheme(
    (0, 0, 0),
    (199, 199, 199),
    [(0, 0, 0),
     (201, 27, 0),
     (0, 194, 0),
     (199, 196, 0),
     (2, 37, 199),
     (202, 48, 199),
     (0, 197, 199),
     (199, 199, 199),
     (104, 104, 104)],
    [(255, 110, 103),
     (95, 250, 104),
     (255, 252, 103),
     (104, 113, 255),
     (255, 119, 255),
     (96, 253, 255),
     (255, 255, 255)]
)

# create the Console instance with `record=True` to use the save methods
console = Console(record=True)

# ... console.print(...) usage to render text to screen

# now save the console output to an HTML file using the color theme
console.save_html('mytabledata.html', theme=HTML_SAVE_THEME)
```
md-table-creator 0.0.2
A python script that converts mysql create tables to markdown tables
Requires Python: >=3.8

# MD Table Creator

Python 3.8.3

Takes in a mysql create table syntax as an input and output markdown table which you can then paste into confluence.

3.8.2 is used for the walrus operator

# Contributing

## Setup

Create a virtualenv, example with `pyenv` and `pyenv-virtualenv` plugin:

    pyenv install 3.8.2
    pyenv virtualenv 3.8.2 md-table-creator
    pyenv local md-table-creator # Automatically activates md-table-creator whenever you are in this folder
    pip install -r requirements.txt
    pre-commit install

## Running Tests

    pytest .
    pytest -vv . # verbose mode

Or if you want tests to re-run when any file is changed:

    ptw .
    ptw . -- -vv # verbose mode

## Running formatter

    black .

# Uploading as a library to pypy

Followed these instructions:

https://dzone.com/articles/executable-package-pip-install

    rm -rf build dist # clear as folders conflict with pyinstaler
    python setup.py bdist_wheel # compile
    python -m twine upload dist/* # upload to pypy

# Versioning

Using semantic versioning
intrand 0.0.6
various handy utilities
Requires Python: >=3.7

# intrand.py
Python utilities that are useful in their own little ways.

# Installation
pip: `pip install --upgrade intrand`

# Usage
```python
import intrand

# some default values
defaults = {
	"preferences":{
		"color":"blue",
		"size":"medium",
		"gradient":True
	}
}

# some user input (perhaps via API)
userConfig = {
	"id":1234567890,
	"name":{
		"first":"John",
		"middle":"James",
		"last":"Smith"
	},
	"preferences":{
		"color":"gray"
	}
}

intrand.dict_utils.merge(defaults, userConfig)	# merge keys present in defaults,
												# but missing in userConfig
												# into userConfig

print(userConfig)
```

Optionally, you may choose to overwrite your existing values with the new by specifying `overwrite=True`.