Closed GoogleCodeExporter closed 9 years ago
You are probably not entering trailing slashes. It should be:
java -jar htmlcompressor.jar --type html -o /in/ /out/
Original comment by serg472@gmail.com
on 16 Sep 2011 at 3:29
Also you should always provide output directory, it doesn't use current one by
default.
Original comment by serg472@gmail.com
on 16 Sep 2011 at 3:30
Original comment by serg472@gmail.com
on 21 Sep 2011 at 2:09
It's still not working.
If I want /in to be my input folder and /out to be my output, shouldn't the
code look like this instead:
java -jar htmlcompressor.jar --type html -o /out/ /in/ ?
But no matter how I try it, it won't do anything...
Original comment by vitam...@t-online.de
on 21 Sep 2011 at 8:41
Ok so I have found out that folders can not be included with their relative
path (while single files can). I was trying to compress everything in
c:\htmlcomp\in and output it to c:\htmlcomp\out.
Defining only /in/ and /out/ in the bat file, will however create both folders
in c:\
So I am using the absolute path and at least the out folder is created
correctly in the htmlcompressor directory - besides that however, nothing will
happen..
Original comment by vitam...@t-online.de
on 21 Sep 2011 at 12:25
You are right, java -jar htmlcompressor.jar --type html -o /out/ /in/ is the
right one.
"/in/" means "in" dir in the root folder, if you want relative path from the
current folder (where jar file is) then it should be "in/".
What's inside that folder? Are there any *.html/*.htm files? Because it only
compresses those by default, and doesn't include sub-directories.
Original comment by serg472@gmail.com
on 21 Sep 2011 at 3:22
[quote] "/in/" means "in" dir in the root folder, if you want relative path
from the current folder (where jar file is) then it should be "in/". [/quote]
Ok, this makes perfect sense now!
There are files and subdirectories present - however, .phtml files only. So
this must be the root of the evil. Since it will compress single phtml files, I
thought it would work for folders too.
Alos, --recursive should allow me to include subdirectories, right?
Original comment by vitam...@t-online.de
on 21 Sep 2011 at 4:35
Something like this should work then:
java -jar htmlcompressor.jar --type html --recursive --mask *.phtml -o out/ in/
Original comment by serg472@gmail.com
on 21 Sep 2011 at 4:46
Also you probably would want to preserve <?php> tags with --preserve-php
parameter.
Original comment by serg472@gmail.com
on 21 Sep 2011 at 4:48
Thank you, this looks very promising!
I'll try this as soon as I am back at home.
Thank you so much for your effort and help. You have been more than kind!
Btw, I wanted to include --preserve-php parameter but found out, that even
without it, they stay untouched..
Original comment by vitam...@t-online.de
on 21 Sep 2011 at 4:56
Original comment by serg472@gmail.com
on 28 Sep 2011 at 3:21
Original issue reported on code.google.com by
vitam...@t-online.de
on 16 Sep 2011 at 9:39