Search found 11 matches

by farbewerk
2013-07-10T11:37:18-07:00
Forum: Users
Topic: Running out of space...or not
Replies: 6
Views: 4029

Re: Running out of space...or not

Thank you very much. That worked perfectly.
by farbewerk
2013-07-10T07:23:53-07:00
Forum: Users
Topic: Running out of space...or not
Replies: 6
Views: 4029

Re: Running out of space...or not

Getting this error: png-blast.sh: line 2: syntax error near unexpected token `"MAGICK_TMPDIR=/home/smcgown/PNGS"' png-blast.sh: line 2: `putenv("MAGICK_TMPDIR=/home/smcgown/PNGS");' The script currently reads: #! /usr/bin/sh putenv("MAGICK_TMPDIR=/home/smcgown/PNGS"); list=$(cat newhexcodes.txt) for ...
by farbewerk
2013-07-10T06:44:08-07:00
Forum: Users
Topic: Running out of space...or not
Replies: 6
Views: 4029

Re: Running out of space...or not

Thanks for the quick reply! I saw that it's possible to do this with:

Code: Select all

putenv("MAGICK_TMPDIR=/data");
Do I use this in a general terminal session or do I need to declare this in the script itself?
by farbewerk
2013-07-10T06:27:52-07:00
Forum: Users
Topic: Running out of space...or not
Replies: 6
Views: 4029

Running out of space...or not

I'm running a script to create a 2px by 2px png file for each of the possible 16.7 million colors available in the hex color spectrum. Here's the script: #! /usr/bin/sh list=$(cat newhexcodes.txt) for color in $list; do convert -size 2x2 xc:"#$color" $color.png done newhexcodes.txt contains a list ...
by farbewerk
2013-07-03T09:23:22-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

Figured it out:

Code: Select all

#! /usr/bin/sh
list=$(cat hexcodes.txt)
	for color in $list; do

	convert -size 2x2 xc:"#$color" $color.png

done
IM is happily cranking away...

Thanks to all for the assistance.
by farbewerk
2013-07-03T08:08:31-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

Also, the color list is pretty large. Can I read the list from a file into the list variable?
by farbewerk
2013-07-03T07:02:32-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

Do I need a shebang line on that bash script and then chmod to run it?
by farbewerk
2013-07-02T17:21:32-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

The list does alternate between name and code. So I can just put a column with the hex values in there. Question is, how do I get imagemagick to take the values in the list? Is there bash script I can put in there to do this? I don't know Ruby either so I'm using my basic programming knowledge to ...
by farbewerk
2013-07-02T14:29:19-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

Snibgo, the command you showed also worked for me. I think that the list isn't being passed correctly to the script. Anybody see anything?
by farbewerk
2013-07-02T14:21:30-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Re: Trying to generate files from a list

I think there is supposed to be an array created that points the name and color to the values in the lookup list. This is actually code lifted from this page: http://www.starrhorne.com/2012/01/18/making-a-million-little-color-swatches-with-imagemagick-and-rake.html I emailed the author but decided ...
by farbewerk
2013-07-02T12:49:59-07:00
Forum: Users
Topic: Trying to generate files from a list
Replies: 14
Views: 6686

Trying to generate files from a list

Hello all, I'm trying to create around 900 small files from a list of hex codes. I have a YAML file (hexcode.yml) and am using the following code: #!/usr/bin/ruby require "yaml" YAML.load_file("hexcode.yml").each do |name, color| p "Creating: #{name} (#{color}) => images/colors/#{name}.png" %x ...