On Tue, Mar 18, 2008 at 10:38 AM, Paul Fox <[EMAIL PROTECTED]> wrote: > eben wrote: > > Do you think that making sugar-iconify a standard (and strongly > > recommended) step in creating proper sugar icons is a bad idea? What > > are your experiences actually using it so far? > > i think such a script is an excellent addition. as the OP of this > thread, it would have helped me quite a bit. > > a few things, based on my experience writing my own (inferior) > script the other day, and on using yours just now: > > - as "cluttery" as it feels, i think the script should create > a backup ("icon.svg~") of the original, by default, if > it's going to overwrite the original. there could be an > option to suppress this.
Interesting point, and not a bad idea. Perhaps instead I could simply ask [y/n] at runtime if it is about to overwrite the old file (still with an option to suppress this prompt). > - a "guess" behavior would be useful: rather than demanding the > hex values for fill and stroke, the script could figure these > out for itself, and either just go ahead, or confirm with the > user first. this would also give an opportunity to warn > if there are more than two values used for fill or stroke. (is > this ever appropriate?) I hadn't thought about creating a guess algorithm. It doesn't, however, require passing the stroke and fill values -- it has a default of (#666666, #FFFFFF) for (stroke, fill), which are the colors provided in the template icons, and probably the preferred look of the icons when listed on the wiki. Adding logic to attempt to automatically determine stroke and fill colors would be a nice addition...I'll look into this. > - does the script do anything at all with no options? i did this > first, forgetting i probably needed -f and -s, and i then wasn't > sure if anything had happened. if it nees options, then it should > give usage() with none. It does indeed silently function, replacing the current icon, when no flags are passed. Of course, it does this by using ht e above mentioned defaults. Thinking about it, I may need better feedback in that case. I have a habit of always using the -v verbose flag, which makes it really easy to confirm that the entities were replaced properly. Perhaps the best feedback would be to count the number of entities replaced, and display a warning when none were replaced successfully. > many thanks for doing this... Certainly; thanks for your feedback! I'll try to take these concerns into account today before updating the wiki. Stay tuned for updates! - Eben _______________________________________________ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar