webkitpdf.vala
authorAlan Knowles <alan@roojs.com>
Mon, 25 Apr 2016 07:42:08 +0000 (15:42 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 25 Apr 2016 07:42:08 +0000 (15:42 +0800)
webkitpdf.vala

index f65a63f..10cacc4 100644 (file)
@@ -6,14 +6,14 @@ public class webkitpdf {
     public static string? opt_url = null;
        public static uint opt_delay = 0;
        public static string opt_target_png = null;
-       public static string opt_target_pdf = null;     
+       public static string opt_target_jpg = null;     
        public static string[]? opt_inject_js = null;           
        const OptionEntry[] options = {
                
                        
                        { "url", 0, 0, OptionArg.STRING, ref opt_url, "Url to grab", null },
                        { "delay", 0, 0, OptionArg.INT, ref opt_delay, "Delay before snapshot in seconds", null },
-                       { "png", 0, 0, OptionArg.STRING, ref opt_target_png, "File to write (PNG)", null },
+                       { "jpg", 0, 0, OptionArg.STRING, ref opt_target_png, "File to write (JPG)", null },
                        { "inject", 0, 0, OptionArg.STRING_ARRAY, ref opt_inject_js, "Inject Javascript file(s)", null },
                        { "pdf", 0, 0, OptionArg.STRING, ref opt_target_pdf, "File to write (PDF)", null },
                        { null }
@@ -39,8 +39,8 @@ public class webkitpdf {
             if (webkitpdf.opt_url == null) {
                 throw new OptionError.BAD_VALUE("missing url");
             }
-                       if (webkitpdf.opt_target_png == null && webkitpdf.opt_target_pdf == null) {
-                throw new OptionError.BAD_VALUE("missing pdf or png filename");
+                       if (webkitpdf.opt_target_jpg == null && webkitpdf.opt_target_pdf == null) {
+                throw new OptionError.BAD_VALUE("missing pdf or jpg filename");
             }
             if (webkitpdf.opt_target_pdf == null) {
                 throw new OptionError.BAD_VALUE("missing pdf file path");