Re: How do calendar?
Well, this is what I did for mine: 1. Typed command "cal 2001" for calendar 2. Loaded up the screenshot taker in the multimedia folder 3. Took a screenshot 4. Loaded it up in the GIMP 5. Cropped it 6. Colored the background 7. Brought in another image on top, opacity set to something like 30% 8. Saved as PCX file, then JPG. You can see the results here: http://www.geocities.com/caljet72/graphics/seacalendar.jpg Hope this helps Jet --- Jeffrey Goldberg <[EMAIL PROTECTED]> wrote: > On Fri, 9 Feb 2001, Jonathan Gift wrote: > > > Jeffrey Goldberg wrote: > > > > (1) the "fax" command will convert text into a > faxible TIFF, so > > > > > > (2) [Use LaTeX] > > > > > > > I don't have fax program loaded. Can check > dselect... Latex neither. > > If you never use LaTeX, then don't install it for > this. It is an > outstanding document preperation system, but it is > big. > > fax is actually just a script which calls other > things. In particular it > calls /usr/bin/efix to convert from text to TIFF. > The whole thing is part > of the "efax" package which comes with RedHat. > > The README file says > > efax is distributed as a gzip'ed tar file, > efax-0.9.tar.gz. It > may be obtained by anonymous FTP from > metalab.unc.edu in > /pub/Linux/apps/serialcomm/fax. > > efix may be just the program you are looking for. > > > Nothing simpler, um? straight text with a > transparent bg is the > > objective... > > I didn't think that my suggestions were pretty, and > was hoping that others > would have better suggestions. But do look at efix > in efax. It's not > that big a package. > > -j > > -- > Jeffrey Goldberg > I have recently moved, see > http://www.goldmark.org/jeff/contact.html > Relativism is the triumph of authority over truth, > convention over justice > __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: How do calendar?- Thanks all!
Wandered Inn wrote: > It appears that each line of text is a separate layer which might make > it easier to line things up. The formatting was a bit off, but it worked. Thanks for the info and thanks to the group for the numerous responses. I'm still trying the perl script... -- Jonathan Gift
Re: How do calendar?
Jonathan Gift wrote: > > Wandered Inn wrote: > > > > I'm not sure I understand, but you could redirect the output of the cal > > command to a file, then use the ascii to image layer plugin to read in > > the file you created. > > If you can tell me how to lay in text that would do it. With background > transparent? This the plugin? Default? Note, someone else posted that the spacing is not retained, and I've not seen a way around that, other than cut and paste the individual layers, which could be doable but a pain. If you're doing a single month, it probably wouldn't be so bad, but a whole year's going to take some tedious work. Anyway, if you want to see the initial results do this: cal 2001 > cal.out open gimp File->new set size fill type->transparent Script-fu->Utils->Ascii to image layer select filename -> cal.out set font type, color and size if you want. select okay. It appears that each line of text is a separate layer which might make it easier to line things up. You might be better off sending doing a screen capture of the cal output from xterm and then removing the background. > > Thanks. > > -- > > Jonathan Gift -- Until later: Geoffrey [EMAIL PROTECTED] "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - Albert Einstein
Re: How do calendar?
On Fri, 9 Feb 2001, Jonathan Gift wrote: > Jeffrey Goldberg wrote: > > (1) the "fax" command will convert text into a faxible TIFF, so > > > > (2) [Use LaTeX] > > > > I don't have fax program loaded. Can check dselect... Latex neither. If you never use LaTeX, then don't install it for this. It is an outstanding document preperation system, but it is big. fax is actually just a script which calls other things. In particular it calls /usr/bin/efix to convert from text to TIFF. The whole thing is part of the "efax" package which comes with RedHat. The README file says efax is distributed as a gzip'ed tar file, efax-0.9.tar.gz. It may be obtained by anonymous FTP from metalab.unc.edu in /pub/Linux/apps/serialcomm/fax. efix may be just the program you are looking for. > Nothing simpler, um? straight text with a transparent bg is the > objective... I didn't think that my suggestions were pretty, and was hoping that others would have better suggestions. But do look at efix in efax. It's not that big a package. -j -- Jeffrey Goldberg I have recently moved, see http://www.goldmark.org/jeff/contact.html Relativism is the triumph of authority over truth, convention over justice
Re: How do calendar?
Jeffrey Goldberg wrote: > > (1) the "fax" command will convert text into a faxible TIFF, so > > (2) create call-2001.txt as above. > I don't have fax program loaded. Can check dselect... Latex neither. Nothing simpler, um? straight text with a transparent bg is the objective... -- Jonathan Gift
Re: How do calendar?
Wandered Inn wrote: > > I'm not sure I understand, but you could redirect the output of the cal > command to a file, then use the ascii to image layer plugin to read in > the file you created. If you can tell me how to lay in text that would do it. With background transparent? This the plugin? Default? Thanks. -- Jonathan Gift
Re: How do calendar?
On Thu, 8 Feb 2001, Jonathan Gift wrote: > With the cal 2001 command I can get the year's calendar displayed on a > terminal or shot to a file. Q: How can I use that as background, as in > paste? Hmm. The problem is getting ASCII text to an image. I am sure that my following suggestions aren't very good, but (1) the "fax" command will convert text into a faxible TIFF, so cal 2001 > cal-2001.txt fax make cal-2001.txt will create a file cal-2001.txt.001 which is a fax image, and should be importable by GIMP. (2) create call-2001.txt as above. Create a file like cal.tex with \documentclass{minimal} \usepackage{verbatim,type1cm} \pagestyle{empty} \begin{document} \verbatiminput{cal-2001.txt} \end{document} latex cal dvips -o cal.ps cal Then you should have a PostScript file, cal.ps that you can play with > Any ideas. Well, those are my idea. But I'm sure that there must be better ways of doing this. -j -- Jeffrey Goldberg I have recently moved, see http://www.goldmark.org/jeff/contact.html Relativism is the triumph of authority over truth, convention over justice
Re: How do calendar?
On Thu, Feb 08, 2001 at 07:29:59PM +0100, Jonathan Gift wrote: > With the cal 2001 command I can get the year's calendar displayed on a > terminal or shot to a file. Q: How can I use that as background, as in > paste? Since I'm bored I decided to write a little Perl-Fu script to do this. It's probably not very robust or elegant or whatever, but it works :-) If anyone knows a better way to get the font size, drop me a line 'cause this is ugly in my solution... cheers, .roel #!/usr/bin/perl -w # Gimp Perl-Fu script to make a calendar. # Roel Vanhout, [EMAIL PROTECTED], 20010208 use Gimp; use Gimp::Fu; sub makeimage { my($mon,$year,$font,$fgcolor,$bgcolor, $border) = @_; if($mon eq "") { $text = `cal $year`; } else { $text = `cal $mon $year`; } my @array = split/-/, $font; my $size = $array[8]; $size /= 10; my ($width, $height, $ascent, $descent) = Gimp->gimp_text_get_extents_fontname($text, $size, 0, $font); my $image = Gimp->gimp_image_new($width + $border * 2, $height + $border * 2, RGB); my $background = Gimp->gimp_layer_new($image, $width + $border * 2, $height + $border * 2, RGB, "Background", 100, NORMAL_MODE); Palette->set_background($bgcolor); $background->fill(BG_IMAGE_FILL); Gimp->gimp_image_add_layer($background, 1); Palette->set_foreground($fgcolor); my $textlayer = Gimp->gimp_text_fontname($background, $border, $border, $text, -1, 1, $size, 0, $font); Gimp->gimp_image_resize($image, $textlayer->width + $border * 2, $textlayer->height + $border * 2, 0, 0); Gimp->gimp_layer_resize($background, $textlayer->width + $border * 2, $textlayer->height + $border * 2, 0, 0); Gimp->gimp_floating_sel_anchor($textlayer); return $image; } ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); register "makeimage", "Makes a calendar", "This scipt makes a calendar.", "Roel Vanhout", "roel\@2e-systems.com", # @ must be written as \@ in a perl string "0.0", "/Xtns/Script-Fu/Misc/Calendarbutton", "", [ [PF_INT, 'month', 'The month you want a calendar for. Leave empty if you want a full year.', $mon +1], [PF_INT, 'year', 'The year you want a calendar for. Leave empty if you want a full year.', $year+ 1900], [PF_FONT, 'font', 'The font you want to use', "-misc-fixed-medium-r-normal-*-*-200-*-*-c-*-iso10646-1"], [PF_COLOR, 'fgcolor', 'The foreground color', [255,255,255]], [PF_COLOR, 'bgcolor', 'The background color', [0,0,0]], [PF_INT, 'border', 'The border you want around the calendar', 10] ], \&makeimage; exit main;
Re: How do calendar?
Let me tell you the trouble I had with the gimp and calendars: variable width fonts I suggest that you generate it with something else, I used LaTeX and then get it from that ps file, or whatever. cal makes nice calendars because it is limited to only fixed width fonts. Maybe someone knows how to get the fixed width fonts to the gimp, but Typesetting like that isn't really what the gimp does. Jonathan Gift wrote: > > Hi, > > With the cal 2001 command I can get the year's calendar displayed on a > terminal or shot to a file. Q: How can I use that as background, as in > paste? > > Any ideas. > > Thanks. > > -- > > Jonathan Gift
Re: How do calendar?
It's easiest to call cal in a window and then cut'n'paste its output to the text entry dialog in GIMP (1.2.0 anyway). Spaces and newlines are preserved in the image. Cheers, Peter Wandered Inn wrote: > > Jonathan Gift wrote: > > > > Hi, > > > > With the cal 2001 command I can get the year's calendar displayed on a > > terminal or shot to a file. Q: How can I use that as background, as in > > paste? > > I'm not sure I understand, but you could redirect the output of the cal > command to a file, then use the ascii to image layer plugin to read in > the file you created. > > Is that what you're trying to do? > > > > > Any ideas. > > > > Thanks. > > > > -- > > > > Jonathan Gift > > -- > Until later: Geoffrey [EMAIL PROTECTED] > > "Great spirits have always found violent opposition from mediocre minds. > The > latter cannot understand it when a man does not thoughtlessly submit to > hereditary prejudices but honestly and courageously uses his > intelligence." > - Albert Einstein
Re: How do calendar?
Jonathan Gift wrote: > > Hi, > > With the cal 2001 command I can get the year's calendar displayed on a > terminal or shot to a file. Q: How can I use that as background, as in > paste? I'm not sure I understand, but you could redirect the output of the cal command to a file, then use the ascii to image layer plugin to read in the file you created. Is that what you're trying to do? > > Any ideas. > > Thanks. > > -- > > Jonathan Gift -- Until later: Geoffrey [EMAIL PROTECTED] "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - Albert Einstein