semvec/pypi-packages huggingface dataset:
mpl-fontkit 0.4.1
Easy font management for matplotlib
License: MIT
Requires Python: >=3.7

# mpl_fontkit

![pypi](https://flat.badgen.net/pypi/v/mpl_fontkit?color=blue)

- Use font from google fonts
- Use icon from font awesome
- Set the font and use it easily
- Helpful error message to get your font name right

### Install

```shell
pip install mpl_fontkit
```

### Quick Start


#### Install Google Fonts

```python
import mpl_fontkit as fk

# https://fonts.google.com/specimen/Lato?query=Lato
fk.install("Lato")
```
If the font does not available in matplotlib,
this will download from Google and add it to
matplotlib.

To check available styles for a font
```python
fk.font_table("Lato")
```
<img src="https://raw.githubusercontent.com/heatgraphy/mpl-fontkit/main/images/font_tables.svg" width="300">

And then you are ready to use it in your plots

```python
import matplotlib.pyplot as plt
plt.text("Lato Font", fontdict={"style": "italic", "weight": 700, "size": 24})
```
<img src="https://raw.githubusercontent.com/heatgraphy/mpl-fontkit/main/images/in_plot.svg" alt="show in plot" width="300">

#### Install Font Awesome

To install font awesome and use it in your plot.
```python
fk.install_fontawesome()

plt.text(.5, .5, "\uf58b\uf005\uf59b", fontfamily="Font Awesome 6 Free")
```

The font awesome is available as `Font Awesome 6 Free` and
`Font Awesome 6 Brands`, the name of icon is encoded as unicode.

You can search for icons and get the unicode [here](https://fontawesome.com/search).

<img src="https://raw.githubusercontent.com/heatgraphy/mpl-fontkit/main/images/fontawesome.svg" alt="fontawesome showcase" width="200">

#### Set a font globally

To set a font manually. 
This will update the `rcParams` for you.

```python
import mpl_fontkit as fk

fk.set_font("Lato")
```

Most of the time when you can't get the font to work
simply because the font name is not the same as the file name.
You can just type a fuzzy name, we will try to find
a similar name and show you in the error message.

```python
import mpl_fontkit as fk

fk.set_font("Lat")
```
```text
LookupError: Cannot find Lat, do you mean: Lato. 
    Use `.list_fonts()` to list all the available fonts.
```

#### Get available fonts

```python
fk.list_fonts()
```
```shell
['Agency FB',
 'Algerian',
 'Arial',
 'Arial Rounded MT Bold',
 'Bahnschrift',
 'Baskerville Old Face',
 'Bauhaus 93',
 ...]
 
 ```

#### What fonts look like?

Show one font
```python
fk.show("Lato")
```
<img src="https://raw.githubusercontent.com/heatgraphy/mpl-fontkit/main/images/show.svg" width="200">

Show all fonts at once
```python
fk.show_fonts()
```
android-text-tool 0.1.2
This is a tool for extracting string resources from an Android project.
License: MIT
Requires Python: >=3.11,<4.0

# Android Text Tool

## Description

This script is useful for extracting all strings from a multimodule Android project. It supports different output formats
which may be useful for you. Currently supported csv, yaml, dynodict-yaml. JSON is coming soon.

NOTE: Before starting using this tool, please run in your project root otherwise you may get a lot of rubbish strings in
the output file:

```bash
./gradlew clean
```

## Installation

This tool can be installed via PIP repositiory by running the following command:

```bash
pip install android-text-tool
```

or if you use Poetry, run this:

```bash
poetry add android-text-tool
```

## Usage

### Basic usage

Run the tool in the root directory of your project(please, don't forget to clean it before to prevent extracting strings from different libraries you use).

```bash
android-text-tool . -f csv
```

As a result, you'll get a CSV file which contains all string resources from your project.

### Advanced usage

```bash
android-text-tool [-h] -f {csv,yaml,dynodict} [-l DEFAULT_LANGUAGE] path
```

Positional arguments:

* `path` - the path of the Android project to scan.

Optional arguments:

* `-f {csv,yaml,dynodict}`, `--format {csv,yaml,dynodict}` - the output format to save the translations. Default is csv.
* `-l DEFAULT_LANGUAGE`, `--default-language DEFAULT_LANGUAGE` - the default language for the translations. This language code will be used for strings inside `value` folder. Default is en.

## Supported output formats

### CSV

This is a comma-separated sheet.

Example:

```csv
key,es,ht,fr,en
translation1,Test1,Test1,Test1,Test1
translation2,Test1,Test1,Test1,Test1
translation3,Test1,Test1,Test1,Test1
```

### YAML

Example:

```yaml
languages:
- en
- ht
- es
- fr
name: Exported project - 2023-11-03T02:29:50
translations:
- key: strings.xml
  translations:
  - key: translation1
    values:
      en: Test1
      fr: Test1
      ht: Test1
  - key: translation2
    values:
      en: Test1
      fr: Test1
      ht: Test1
```

### Dynodict YAML

This format is for a tool which is going to be released soon. It's under development. Please, do not use it.