
Purpose
WebMinifier is HTML (HyperText Markup Language) and CSS (Cascading Style Sheets) minifier, available as a library and command line tool.
Minification removes comments and unneeded spaces (including tabs and newlines). HTML documents are keept well-formed if the source respects the XML (eXtended Markup Language) syntax. Embedded CSS is also minified.
It is written in C without any dependency.
Command line usage:
webminifier path/to/html_or_css_file path/to/minified_file
Library usage:
#include <webminifier.h>
/*...*/
char *input = "<html> ...";
char *output = (char *) malloc (strlen (input) * sizeof (char));
if (output != NULL) {
minify_html (input, output); //or minify_css
printf ("%s", output);
free (output);
}
/*...*/
Compile with -lwebminifier
(pkg-config --libs webminifier
)
License
Copyright Frank ENDRES - 2022-12-12 - <frankendres@tuxfamily.org> (disabled; use <first@last.fr>).
This software is governed by the CeCILL-C license under French law, compatible with the LGPL (Lesser General Public License).
My other projects
- Live-System: unintrusive live DVD / USB / NFS build and install tool written for Arch, Debian / Ubuntu and Slackware64 Linux
- SGSearch: Minimalist file search (name / content) utility, with Thunar extension
- GCryFolder / Thunar Encryption Plugin: encrypted folder integration into file managers, with Thunar extension
- GReadyMedia: GTK frontend to setup a ReadyMedia (formerly MiniDLNA) UPnp service