Convert Font Awesome HTML tags into inline SVG
Project description
fa2svg
A Python package to convert Font Awesome <i>/<span> tags into inline SVG elements. It was specifically made so you can use Font Awesome in emails by passing the email body through this converter before sending.
Installation
pip install fa2svg
Or for local development:
git clone https://github.com/meena-erian/fa2svg.git
cd fa2svg
pip install -e .
Usage
from fa2svg.converter import to_inline_svg
html = '<p>Icon: <i class="fas fa-mug-saucer" style="font-size:64px;color:#c60"></i></p>'
print(to_inline_svg(html))
Contributing
Fork the repo, open issues, submit pull requests!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fa2svg-0.1.1.tar.gz.
File metadata
- Download URL: fa2svg-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81fbb63baa9eebb295a60429597bb9454028ecb354841b7a9d3911be64aa3036
|
|
| MD5 |
68555f0f7d039a19b112db6fb2b18b33
|
|
| BLAKE2b-256 |
c2428263c89e50f1226196c3e74225ccf981f45ce44dda78ed119a85377447a3
|
File details
Details for the file fa2svg-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fa2svg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82cd72795d14b8bf1dd91c321f1aac25f4f24d8a8e2e0f324c282f0d78dca692
|
|
| MD5 |
e8db1476369fab259ad6fcbd115656d2
|
|
| BLAKE2b-256 |
3006fbb5f77737a7e5b9a26f75d0b69aae666194a284dc64175580091650d29f
|