Skip to main content

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 .

Upload

twine upload --config-file "./.pypirc" dist\*

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fa2svg-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fa2svg-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file fa2svg-0.1.2.tar.gz.

File metadata

  • Download URL: fa2svg-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for fa2svg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 895ebaf0611f4a4216d3f05e16b2f7c3c23392ffbf82382015b6e1677a4113c4
MD5 001c8904298b82e7264122a95914223a
BLAKE2b-256 c436bb8240b8da3023c4b1e45ba52319c56fd0e6a855e385fdbaa4e13dfb4380

See more details on using hashes here.

File details

Details for the file fa2svg-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fa2svg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for fa2svg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f5eb6309fdc7cca76f8fb5d5ab51453aa4b32ed412d2047ddaaeb37886970c7
MD5 00fe0e748f2723371187d635a668dcd3
BLAKE2b-256 921878aa0a311be1f9a20133371b266d7874c7e458a22565f354c78137f96dea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page