Author |
Message |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Wed 30 Oct 2013, 19:37 Post subject:
|
|
I've been using bsvg program and I find I can get all the icon images
to generate in one folder by running the following script...
For color icons see the built-in help for bsvg
Code: |
#!/bin/bash
mkdir -p /tmp/SVGicons
bsvg -i | sed '1,/Available/d' > /tmp/test.tmp
cat /tmp/test.tmp |
while read -r COLUMN1 COLUMN2 COLUMN3 COLUMN4 ;do
cd /tmp/SVGicons/
bsvg $COLUMN1
bsvg $COLUMN2
bsvg $COLUMN3
bsvg $COLUMN4
done
|
___________________________________________________
I wrote a SVG-viewer to quickly check the folder of images
http://www.murga-linux.com/puppy/viewtopic.php?p=733827#733827
___________________________________________________
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Thu 31 Oct 2013, 04:58 Post subject:
|
|
Dear Don,
Thanks for using bsvg. I did supply a dump script with the pet, I think, but if not, here it is:
Code: |
#!/bin/bash
# *****************************************************
# PROGRAM: bsvg_gen
# PURPOSE: to dump all svgs from bsvg library
# AUTHOR: vovchik (Puppy Linux forum)
# MODDED:
# DEPENDS: bash, bsvg
# PLATFORM: Puppy Linux (actually, any *nix)
# DATE: 25-06-2012
# NOTES: you can specify fill and stoke colors
# ie: bsvg_gen all red black, otherwise
# the default of black and grey
# *****************************************************
# ***********************
# FUNCTIONS
# ***********************
# ------------------
function usage()
# ------------------
{
# show help
echo
echo "bsvg_dump generates a dump (in your current directory)"
echo "of all svgs contained in the bsvg library."
echo
echo "Usage: bsvg_gen dump [fill color] [stroke color]"
echo "Examples: bsvg_gen dump red black"
echo " bsvg_gen dump \"#6c6c6c\" red"
echo " bsvg_gen dump none red"
echo
echo "Run plain 'bsvg' for help with the color arguments."
echo
}
# ------------------
function chk_args()
# ------------------
{
# check user input
dump="$1"
case $dump in
"dump")
fill="$2"
stroke="$3"
;;
*)
usage
exit 1
;;
esac
}
# ------------------
function mk_icons()
# ------------------
{
# generate complete icon set
# in current working directory
for f in $(bsvg -I); do
bsvg "$f" "$fill" "$stroke"
done
}
# ***********************
# END FUNCTIONS
# ***********************
# ***********************
# MAIN
# ***********************
chk_args $1 $2 $3
mk_icons
exit 0
# ***********************
# END MAIN
# ***********************
|
With kind regards,
vovchik
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Thu 31 Oct 2013, 19:36 Post subject:
|
|
I'll try out your script. I'm working on putting your icons on left side of
button. I'm nearly finished.
_________________________________
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Sat 02 Nov 2013, 16:22 Post subject:
|
|
I have packaged the free CNS icons to be used
as well.
FreeCNS icons-2.0.pet
Here is some more examples...
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Sat 02 Nov 2013, 16:25 Post subject:
|
|
Here is script to make the buttons.
Note: All SVG icons MUST be in /usr/share/icons/SVGicons/
First the possible colors...
Quote: | bsvg -C [lists svg 'named colors' (1 color per line)]
bsvg firefox red pink - [prints to stdout and does not create file]
SVG 'named colors' (148):
aliceblue antiquewhite aqua aquamarine
azure beige bisque black
blanchedalmond blue blueviolet brown
burlywood cadetblue chartreuse chocolate
coral cornflowerblue cornsilk crimson
cyan darkblue darkcyan darkgoldenrod
darkgray darkgreen darkgrey darkkhaki
darkmagenta darkolivegreen darkorange darkorchid
darkred darksalmon darkseagreen darkslateblue
darkslategray darkslategrey darkturquoise darkviolet
deeppink deepskyblue dimgray dimgrey
dodgerblue firebrick floralwhite forestgreen
fuchsia gainsboro ghostwhite gold
goldenrod gray green greenyellow
grey honeydew hotpink indianred
indigo ivory khaki lavender
lavenderblush lawngreen lemonchiffon lightblue
lightcoral lightcyan lightgoldenrodyello lightgray
lightgreen lightgrey lightpink lightsalmon
lightseagreen lightskyblue lightslategray lightslategrey
lightsteelblue lightyellow lime limegreen
linen magenta maroon mediumaquamarine
mediumblue mediumorchid mediumpurple mediumseagreen
mediumslateblue mediumspringgreen mediumturquoise mediumvioletred
midnightblue mintcream mistyrose moccasin
navajowhite navy oldlace olive
olivedrab orange orangered orchid
palegoldenrod palegreen paleturquoise palevioletred
papayawhip peachpuff peru pink
plum powderblue purple red
rosybrown royalblue saddlebrown salmon
sandybrown seagreen seashell sienna
silver skyblue slateblue slategray
slategrey snow springgreen steelblue
tan teal thistle tomato
turquoise violet wheat white
whitesmoke yellow yellowgreen none
|
Here is example of using script...
Code: | ./button-svg.sh DejaVu 10 "Forward" .4 magenta 2 black Forward2.svg white "#00FG00" |
Description |
remove fake .gz extension
|

Download |
Filename |
button-svg.gz |
Filesize |
2.76 KB |
Downloaded |
256 Time(s) |
Last edited by don570 on Mon 11 Nov 2013, 17:25; edited 2 times in total
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Sat 02 Nov 2013, 17:25 Post subject:
|
|
Dear Don,
Very nice work...so thanks.
With kind regards,
vovchik
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Mon 04 Nov 2013, 19:19 Post subject:
|
|
you will just exit if there is no existing folder
/usr/share/icons/SVGicons/
______________________________________________________
To use the script without an icon, don't put in icon name. Example...
Code: | ./button-svg.sh DejaVu 10 "Forward" .4 magenta 2 black |
or just put 'none' as your icon.
If you misspell the icon name then no icon will show on left side of button.
__________________________________________________________
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Mon 04 Nov 2013, 21:22 Post subject:
Subject description: download svg icons |
|
I put all the svg icons in one easy to download and install package.
vovchik's icons were generated with black and red (optional colors)
See several posts below for download of pet package
of compatible icons.
I recommend that for dark colors like black,blue etc , use opacity =0.1
If you want a grey rectangle then try the color 'white'
and opacity high(=0.7)
Another example...
Code: | ./button-svg.sh DejaVu 10 "No" .2 teal 2 black LightBulb.svg white black |
_____________________________________________
Last edited by don570 on Wed 13 Nov 2013, 20:51; edited 2 times in total
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Mon 11 Nov 2013, 17:01 Post subject:
|
|
I have found a method to create compatible SVG image icons that
can be used in my buttons.
Just download the package below and read the ReadMe file.
Instructions to make your own compatible SVG icon...
-install script 'button-svg.sh' found in icon_creation.tar.gz package.
Make sure it is executable.
-create image with inkscape(lite) using template.svg as a template.
It's very important to use template.svg since this affects the size.
Stay well inside border lines of document frame.(see inkscapelite-example.png)
-save to disk. Open template.svg file with texteditor.
Remove section(s) which describe paths,polygons,rectangles.
Place these code lines in the my_image.svg file.(see help-image.png)
-save the file with an extension .svg
in the folder /usr/share/icons/SVGicons/
You may check to see if it will open properly with mtpaint or inkscape(lite)
(see Screenshot.png for image of the final button)
Notes:
The name of icon mustn't have spaces in it.
Inkscapelite has a bug with forming a circle with a stroked
edge.
- run the script example:
button-svg.sh DejaVu 10 "No" .2 blue 2 black my_image.svg black white
Explanation of parameters:
# ${1} font-family example: DejaVu, Sans or Times
# ${2} round corners - recommend 0 to 15 - 0 is square corner
# ${3} quoted textstring
# ${4} opacity of rectangle - set low for dark colors
# ${5} rectangle color - quoted hex or English word ---> bsvg -c
# ${6} stroke width -normally 2 - set to zero if no border stroke is desired
STROKECOLOR=${7} - normally black
ICON_NAME=${8} - fill in name (if 'none' then no icon will show)
ICON_FILL_COLOR=${9}
ICON_STROKE_COLOR=${10}
____________________________________________________
 |
Description |
script and templates to make compatible SVG image icons.
|

Download |
Filename |
icon_creation.tar.gz |
Filesize |
50.08 KB |
Downloaded |
228 Time(s) |
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Wed 13 Nov 2013, 20:48 Post subject:
|
|
I have new 'compatible SVG icons package'. I added a new icon
'alarmclock.svg' that I made using inkscape in Ubuntu.
(Warning ! Gradients should be avoided in the making of svg icon)
Here is command line that generated the button
Code: | button-svg.sh DejaVu 10 "My Alarm" .2 teal 2 black alarmclock.svg white black
|
________________________________________________
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Sat 16 Nov 2013, 17:17 Post subject:
|
|
I added 13 additional icons in version 1.2 of compatible SVG icons.
Code: |
alarmclock2.svg
clock.svg
delete.svg
envelop.svg
eye.svg
floppy.svg
letter.svg
padlock.svg
paperclip.svg
picture2.svg
speaker.svg
suitcase.svg
warning2.svg
|
Note when making compatible icons--->
Do not use gradients or grouping of objects.
Use full program Inkscape rather than Inkscapelite
since there is a lot more features.
__________________________________________
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Thu 23 Jun 2016, 14:45 Post subject:
|
|
Here is collection of SVG icons to use for practice.
Description |
freeware svg icons
|

Download |
Filename |
compatible-SVGicons-1.2.tar.gz |
Filesize |
247.72 KB |
Downloaded |
63 Time(s) |
Last edited by don570 on Sat 23 Jul 2016, 15:21; edited 1 time in total
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4786 Location: Kingwood, TX
|
Posted: Thu 23 Jun 2016, 16:09 Post subject:
|
|
Some of us have been making Public Domain svg icons fior use in themes (mostly single svg paths that can be layered) and I created a tool to build them with a unified theme (requires a bit of shell scripting if you want to generate all of them). Ahyhow they are
here There is quite a collection now.
You can/should ignore the most recent posts that involve using svg paths for text - that is something I wanted to have for nanosvg and libsvgtiny, neither of which handle <text> tags. It also ensures that my crappy font looks just as crappy from one SVG engine to the next regardless of its builtin or loaded font.
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4985 Location: Ontario
|
Posted: Sat 25 Jun 2016, 15:44 Post subject:
|
|
They look professional.
I'll try to adapt them to my template.
I explain my template a few post above.
They need to be compatible to my template
or they don't work with my script.
____________________________________
|
Back to top
|
|
 |
|