On Fri, 19 Sep 2008 16:47:41 +0200 Martin Hansen <[EMAIL PROTECTED]> wrote:
> Hi, > > I did not get Your script working. I am getting a "convert: > Postscript delegate failed `/tmp/magick-XXB0tWqO': No such file or > directory.", so I think it is a bug on my machine. However: > Well, what do you know, I'm getting the same message when I run dailypic. It appears not to be the image-magick that is in difficulties but the enscript which does not recognise the @ as a special escape. This worked on Friday, and not since. Something has changed, but nothing that appears to affect enscript. I'm a bit lost. It took me ages to understand how to work the escapes stuff in enscript to get the coloured output into the picture, and really I don't know how to fix this. Shelagh > I am also working on a script that puts Remind on a Xfce4 > desktop using RMagick (ImageMagick from Ruby). (It will need some > modifications to run on other desktops). The result so far can be > seen at http://home1.stofanet.dk/mh.homepage/files/screenshot.png > > I run it as an autostarted application and as a cron job at midnight: > In: > crontab -e > Insert: > @midnight $HOME/bin/xfremind > > Where $HOME/bin/xfremind is where I placed the script. > > The script requires remind, RMagick http://rmagick.rubyforge.org/ > (and everything RMagick depends on. On Debian, the package is named > librmagick-ruby). > > The script looks like: > > > > > > #!/usr/bin/env ruby > > require 'RMagick' > > BACKGROUND_PICKTURE="background.png" #Place it at > ~/.config/xfremind/background.png NEGATE_CALENDAR = true > screen_width = 1280 > screen_height = 1024 > > OUTPUT_DIR="#{ENV['HOME']}/.config/xfremind" > unless test ?d,OUTPUT_DIR > Dir.mkdir(OUTPUT_DIR) > end > Dir.chdir(OUTPUT_DIR) > > if Object.const_defined?(:BACKGROUND_PICKTURE) && > File.exist?(BACKGROUND_PICKTURE) background = > Magick::ImageList.new(BACKGROUND_PICKTURE) else > fill = Magick::GradientFill.new(0, 0, 0, 0, "#8888bb", "#333399") > background = Magick::Image.new(screen_width, screen_height, fill) > background = background.swirl(-360) > end > > system('remind -m -b1 -p ~/.reminders | rem2ps -sthd 14 -se 10 -i -l > -e > calendar.ps') # The command that generates the postscript > calendar. calendar = Magick::ImageList.new("calendar.ps") > calendar.rotate!(90) > > if Object.const_defined?(:NEGATE_CALENDAR) && (NEGATE_CALENDAR) > calendar = calendar.negate > wallpaper = background.composite(calendar, > Magick::SouthEastGravity, Magick::ScreenCompositeOp) else > wallpaper = background.composite(calendar, > Magick::SouthEastGravity, Magick::MultiplyCompositeOp) end > > wallpaper.write('wallpaper.png') # This file should be selected as > wallpaper. system('killall -USR1 xfdesktop') # This reloads the XFCE4 > desktop. > > > > > > > > Kind Regards > Martin Hansen > > On Tue, 5 Aug 2008 14:13:18 +1000 > Shelagh Manton <[EMAIL PROTECTED]> wrote: > > > As the subject says. This was devised for xfce4 but I'm sure that > > the guts of the script would be useful for any desktop. At least on > > *nix OSes. > > > > It does have three dependencies ssed imagemagick and enscript. > > Most are available with distro package managers but may not be > > installed by default. ssed (super sed) might be the only one that is > > difficult to get. > > > > 8< ----------------------------------------------------------- > > #!/bin/bash > > #dailypic: make a picture for desktop of the output of remind. > > > > empty='s/\e\[0m/@color{default}/g > > s/\e\[0;31m/@color{1 0 0}/ > > s/\e\[0;32m/@color{0 1 0}/ > > s/\e\[0;33m/@color{1 1 0}/ > > s/\e\[0;34m/@color{0 0 1}/ > > s/\e\[0;35m/@color{1 0 1}/ > > s/\e\[0;36m/@color{0 1 1}/ > > s/\e\[0;37m/@color{0 0 0}/ > > s/\e\[31;1m/@color{1 0 0}/ > > s/\e\[32;1m/@color{0 1 0}/ > > s/\e\[33;1m/@color{1 1 0}/ > > s/\e\[34;1m/@color{0 0 1}/ > > s/\e\[35;1m/@color{1 0 1}/ > > s/\e\[36;1m/@color{0 1 1}/ > > s/\e\[37;1m/@color{0 0 0}/' > > > > picture="/path/to/your/wallpapers/daily.png" > > > > remind | ssed "$empty" | enscript --escapes=@ -Br -fPalatino-Bold16 > > -q -o - | convert -trim -transparent white -rotate 90 - "$picture" > > xfdesktop > > > > Shelagh > _______________________________________________ > Remind-fans mailing list > [email protected] > http://lists.whatexit.org/mailman/listinfo/remind-fans -- ---------------------------------------------------------------- Jabber: [EMAIL PROTECTED] ---------------------------------------------------------------- _______________________________________________ Remind-fans mailing list [email protected] http://lists.whatexit.org/mailman/listinfo/remind-fans
