{"id":13878297,"url":"https://github.com/stereobooster/html_press","last_synced_at":"2025-04-12T02:53:28.973Z","repository":{"id":2386596,"uuid":"3352341","full_name":"stereobooster/html_press","owner":"stereobooster","description":" 🚨 [deprecated] Ruby gem for compressing html","archived":false,"fork":false,"pushed_at":"2016-04-13T22:39:08.000Z","size":292,"stargazers_count":35,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T22:36:35.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stereobooster.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-04T11:42:18.000Z","updated_at":"2023-01-09T11:20:46.000Z","dependencies_parsed_at":"2022-09-09T19:11:18.559Z","dependency_job_id":null,"html_url":"https://github.com/stereobooster/html_press","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fhtml_press","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fhtml_press/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fhtml_press/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fhtml_press/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stereobooster","download_url":"https://codeload.github.com/stereobooster/html_press/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248509817,"owners_count":21116124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:01:45.547Z","updated_at":"2025-04-12T02:53:28.947Z","avatar_url":"https://github.com/stereobooster.png","language":"Ruby","readme":"# HtmlPress ![Gem Version](https://fury-badge.herokuapp.com/rb/html_press.png) [![Build Status](https://travis-ci.org/stereobooster/html_press.png?branch=master)](https://travis-ci.org/stereobooster/html_press) [![Dependency Status](https://gemnasium.com/stereobooster/html_press.png?travis)](https://gemnasium.com/stereobooster/html_press) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/stereobooster/html_press)\n\n## How it works\n\nRemove all whitespace junk. Leave only HTML\n\n```\n1.               ┌――――――――――――――――――╖        2.         ┌――――――――――――――――――╖\n  ●――――――――――――――├―╢ \u003chtml\u003e ws junk ║          ●――――――――├―――――――――╢ \u003chtml\u003e ║\n                 └――――――――――――――――――╜                   └――――――――――――――――――╜\n```\n\n## Usage\n\n### Ruby\n```ruby\nrequire 'html_press'\ncompressed_html = HtmlPress.press html\n```\n\n### Jekyll\nsee [jekyll_press](https://github.com/stereobooster/jekyll_press)\n\n### Rails\nTODO :exclamation:\n\n### Sinatra\nTODO :exclamation:\n\n### Command line\nTODO :exclamation:\n\n## TODO\n  - use parser ([鋸](https://github.com/tenderlove/nokogiri)) instead of regexp's\n    - add option to convert relative urls to absolute urls (for SEO)\n  - [ambigious ampersands](http://mathiasbynens.be/notes/ambiguous-ampersands) for compression?\n  - Support other js/css minifiers (Closure, YUI compressor)\n  - htmlTydi\n  - Rack plugin\n  - add script to benchmark real projects like amazon or stackoverflow\n  - support html5 tags\n  - add more options\n  - Optimization: make substring replace based on substring length and its position in initial string\n\n## Alternatives\n  - [html-minifier](https://github.com/kangax/html-minifier) (js), [test suite](https://github.com/kangax/html-minifier/blob/gh-pages/tests/index.html), ruby wrapper - [html_minifier](https://github.com/stereobooster/html_minifier)\n  - [htmlcompressor](http://code.google.com/p/htmlcompressor/) (java), [test suite](http://code.google.com/p/htmlcompressor/source/browse/#svn%2Ftrunk%2Fsrc%2Ftest%2Fresources%2Fhtml%253Fstate%253Dclosed)\n  - PHPTal compress (php), [test suite](https://svn.motion-twin.com/phptal/trunk/tests/CompressTest.php)\n  - [W3 total cache](http://wordpress.org/extend/plugins/w3-total-cache/) - WP plugin from smashingmagazine contains html minifier (php)\n\n## Additional tools\n  - [jeanny](https://github.com/gfranco/jeanny) - rename css classes and ids in css and html files\n    - make shorter pathes for images in css\n  - [deadweight](https://github.com/aanand/deadweight) - remove unused css rules from css files\n  - [csscss](http://zmoazeni.github.com/csscss/) will parse any CSS files you give it and let you know which rulesets have duplicated declarations.\n  - [css-spriter](https://github.com/aberant/css-spriter), [sprite-factory](https://github.com/jakesgordon/sprite-factory) - combine images in sprites\n  - resize images by size defined in html and vice versa embed size of images in html\n  - [#1](http://habrahabr.ru/post/90761/), [#2](http://ap-project.org/English/Article/View/53/) - inline small images in css\n  - [smusher](https://github.com/grosser/smusher), jpegtran, optipng - losslessly minify images\n  - [sprockets](https://github.com/sstephenson/sprockets), [jammit](https://github.com/documentcloud/jammit) - asset bundlers\n  - [w3c_validators](https://github.com/alexdunae/w3c_validators)\n  - [reduce](https://github.com/grosser/reduce)\n\n## Resources\n\n### Minimize HTML\n  - http://perfectionkills.com/experimenting-with-html-minifier\n  - http://perfectionkills.com/optimizing-html\n  - https://developers.google.com/speed/articles/optimizing-html\n\n### Front-end optimization\n  - https://developers.google.com/speed/docs/insights/rules\n  - http://developer.yahoo.com/performance/rules.html\n","funding_links":[],"categories":["Ruby","Minifiers - HTML"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Fhtml_press","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstereobooster%2Fhtml_press","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Fhtml_press/lists"}