Scene7ize
Converts local image paths in an HTML or CSS file to Scene7 paths containing dimensions and format info. Will make working with Scene7 a little less unbearable.
Automatically assumes JPGs have been optimized, default quality is set to 100.
Installation
$ gem install scene7ize
Usage
- The first argument is the Scene7 URL prefix.
- The second argument is an input file.
- Third argument (optional) is an output file.
- Fourth argument (optional) is a base path. If provided, images will be reference from it - otherwise they will be referenced relative to the input file.
To run in "safe mode", specify an output file:
$ scene7ize parse -u http://s7.example.com -i index.html -o output.html
Or, omit the output file to replace contents of an input file.
$ scene7ize parse -u http://s7.example.com -i index.html
TODO
- Code documentation
- Better error handling and documentation for arguments
- Accept a default parameter to set JPEG quality
- Create a way to reverse the Scene7ize process and restore original paths (likely by searching path for image files)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request