a-rustacean / font-icons-scraper

A tool to extract SVG icons from font files used by popular icon font services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Font Icons Scraper

Lint

Companies like Font Awesome leverage the concept of icon fonts to provide a convenient CDN solution for their font assets. Using scalable vector icons as font glyphs is made possible by icon fonts, making it simple to integrate and style using CSS. However, it is not feasible to access the entire collection of SVG icons from a premium CDN without the necessary authorisation.

With the help of this tool, you can extract SVG icons directly from the font files used by services like Font Awesome. You can utilise the SVG icons independently, modify their properties, and incorporate them into your applications without depending on a particular CDN or font supplier if you extract the SVG icons. This gives you the ability to adapt and maximise the use of symbols to comply with

Features

  • Extract SVG icons from font files
  • Gain direct access to individual SVG icons
  • Customize and optimize icon usage
  • Enhance the visual appeal of your projects

Installation

Pre-built binaries for Font Icons Scraper are not currently available, you can build it from source, follow these steps:

  1. Make sure your have rust installed on your machine.
  2. Clone this repository to your local machine.
  3. Navigate to the project directory.
  4. Run the provided installation script:
./install.sh

This will set up the necessary dependencies and configurations for the scraper.

Usage

Once the installation is complete, you can run the html scraper with the following command.

scrape-icons <CSS URL> <OUTPUT FOLDER>

Here are some example URLs you can use:

The tool will start extracting SVG icons from the font files, providing you with individual SVG files for each icon. You can customize the extraction behavior or specify font files as needed within the code.

Caution

The css files may be subject to copyright, this software's owner is not responsible for any bad use of it.

Uninstall

To uninstall the icons scraper, follow these steps:

  1. Navigate to the project directory.
  2. Run the provided uninstallation script:
./uninstall.sh

Contributing

Contributions to this project are welcome! If you find any issues, have suggestions for improvements, or would like to add missing features, please feel free to submit a pull request. Although there is no strict PR template, please provide a clear description and follow best practices for code contributions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A tool to extract SVG icons from font files used by popular icon font services.

License:MIT License


Languages

Language:Rust 98.5%Language:Shell 1.5%