Skip to main content

A CLI tool to download fonts used on a website

Project description

fontpls

Build Status PyPI - Python Version License

Overview

fontpls is a minimal cli tool for extracting fonts from websites written in Python.

This tool helps web developers, designers, and typographers easily extract and reuse fonts from websites with minimal effort.

Installation

pip install fontpls

Or install from source:

git clone https://github.com/jon-becker/fontpls
cd fontpls
pip install -e .

Usage

Basic usage:

fontpls https://example.com

With options:

fontpls https://example.com --output fonts --threads 8 --tags h1,p,div

Options

Option Description
--tags Only include fonts used in the specified HTML tags (comma-separated)
--exclude, -x Exclude fonts used in the specified tags (comma-separated)
--output, -o Output font files to the specified directory
--threads, -t Number of download threads to use
--verbose, -v Increase verbosity level (use multiple times for more detail)

Output

fontpls creates a directory structure like this:

example-com/
├── Font1-Regular.woff2
├── Font2-Bold.woff2
├── Font3-Italic.woff2
├── fonts.css
└── index.html
  • fonts.css: CSS stylesheet with @font-face declarations
  • index.html: HTML file showcasing all downloaded fonts

Contributing

If you'd like to contribute to fontpls, please open a pull-request with your changes, as well as detailed information on what is changed, added, or improved.

For more detailed information, see the contributing guide

Issues

If you've found an issue or have a question, please open an issue here. All issues must follow their respective templates.

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

fontpls-0.1.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

fontpls-0.1.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file fontpls-0.1.0.tar.gz.

File metadata

  • Download URL: fontpls-0.1.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for fontpls-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b14208e273c635b3291f778d98a5864c5672cc1f3b70bfa87f6dfee5eae6cdec
MD5 cb5fca512f39ab94646207e094894d24
BLAKE2b-256 a7699af021517208ed4774549f23194f54d0436d7f1bb553c8e43becb96601d6

See more details on using hashes here.

File details

Details for the file fontpls-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fontpls-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for fontpls-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1452d3b1d50ec01bddeebd86242810185f5a97c8821ae8069dfdc3b409d40af6
MD5 9a6bcb9d29c0ae5064bd7f18a4ec9282
BLAKE2b-256 dd7bb7a5028ccf6b020703f1eb86516029b88f820bf57e1d0061b1348895f7ff

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