[sugar] icon assistance/validation
Paul Fox
pgf at foxharp.boston.ma.us
Tue Mar 18 11:07:23 EDT 2008
eben wrote:
> On Tue, Mar 18, 2008 at 10:38 AM, Paul Fox <pgf at foxharp.boston.ma.us> wrote:
> > - 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).
that would be fine.
> > - 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.
oh yeah -- i forgot to mention the defaults. i don't think
they're all that useful (hence my notion of guessing them),
because there there are a lot of competing suggested values, none
of which include "#666666", that i can find :-).
bert said earlier that he uses:
<!ENTITY fill_color "#CCCCCC">
<!ENTITY stroke_color "#000000">
a skim of the wiki search results for "fill_color" and "stroke_color"
gives mostly fills of #ffffff and strokes of #000000, and on the
XO itself, i see the following:
==xo-14-83-DB,pgf(1)>> cd /usr/share/activities
==xo-14-83-DB,pgf(1)>> cat */activity/*svg | egrep 'ENTITY stroke'
<!ENTITY stroke_color "#5555FF">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#000000">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#00FF00">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#d7e4f6">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#000000">
<!ENTITY stroke_color "#010101">
<!ENTITY stroke_color "#010101">
==xo-14-83-DB,pgf(1)>>
==xo-14-83-DB,pgf(1)>> cat */activity/*svg | egrep 'ENTITY fill'
<!ENTITY fill_color "#9999FF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#0000FF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#133c6d">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
<!ENTITY fill_color "#FFFFFF">
> > - 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.
that would be good.
paul
=---------------------
paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 35.4 degrees)
More information about the Sugar
mailing list