Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: CONTEST!!! See INSIDE FOR MORE INFO!!! :D

  1. #1
    Guest

    CONTEST!!! See INSIDE FOR MORE INFO!!! :D

    I want to create a cronjob that every morning at a certain time, will take a screenshot of my desktop and whatever I happen to be doing at that point in time.

    I want it to name the screenshot in the following format:
    date_screenshot.png, so the screenshot for today would be:
    20041118_screenshot.png (yearmonthday)

    and save it to the ~/screenshots folder.

    two things.....

    a. I think I need a script to actually handle the naming of the screenshot

    and

    b. I don't know where to begin.

    Actually, I think I have an idea.....

    The first person that provides the script and the cron to successfully do this will receive his or her choice of a Penguin Power Button or Magnet (I know its not much, but its all I can afford!) from the LF Store.

  2. #2
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    0 10 * * * import -window root ~/screeshots/`date`.png

    ^^^ just put that in your crontab

    or iif you prefer you can put the command into a script and cron that...

    those are backtics around date

  3. #3
    Guest
    Doesn't work.

    If I run:
    import -window root ~/screenshots/`date`.png

    at the cli, it thinks for a minute, but it doesn't do anything.

  4. #4
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    sorry forgot the date format is wrong
    you need:

    import -window root ~/screenshot/`date +"%F"`.png

    Code:
    maccorin@debian:~$ import -window root ~/screenshot/`date +"%F"`.png 
    maccorin@debian:~$ ls screenshot/
    2004-11-18.png
    maccorin@debian:~$

  5. #5
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    in case your wondering, the reason the first one didn't work is because it had a space in the output of `date`, so there was no recognizable image extension for import to decide what kind of file to make, in that case it just silently bails... which should probably be fixed.

  6. #6
    Guest
    Well, I guess you win the, um, button.

    BUt thats ok. If solo keeps buy stuff from amazon, we'll have another gift certificate to give away.... which means another competition.

  7. #7
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Dang! I gotta start checking the forums after I get home from work. I missed an easy one.

    This is really great way to support the site too. Good idea Mark.
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  8. #8
    RetroJ
    Guest
    Hey neat trick. That one is going on my list!

  9. #9
    Senior Member
    Join Date
    Apr 2004
    Location
    Indiana?... We named the dog Indiana!
    Posts
    488
    Quote Originally Posted by mcangeli";p="3713
    Well, I guess you win the, um, button.

    BUt thats ok. If solo keeps buy stuff from amazon, we'll have another gift certificate to give away.... which means another competition.
    And don't forget the swag I just bought (WPL ball cap, and a TM big mug). Very nice stuff, BTW :w00t: :mrgreen: . I've got one of the LNX stickers on the bumper of my truck; though I haven't had anyone ask about it yet (so are you from Luxemberg, or what? :mrgreen: ) . Guess I'll take some pictures this weekend and post them.

    Oh, and that is a slick little cron trick there mac .
    Steve

  10. #10
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    Quote Originally Posted by snct";p="3731
    Quote Originally Posted by mcangeli";p="3713
    Well, I guess you win the, um, button.

    BUt thats ok. If solo keeps buy stuff from amazon, we'll have another gift certificate to give away.... which means another competition.
    And don't forget the swag I just bought (WPL ball cap, and a TM big mug). Very nice stuff, BTW :w00t: :mrgreen: . I've got one of the LNX stickers on the bumper of my truck; though I haven't had anyone ask about it yet (so are you from Luxemberg, or what? :mrgreen: ) . Guess I'll take some pictures this weekend and post them.

    Oh, and that is a slick little cron trick there mac .
    don't worry about the button I'll buy some linuxfoo stuff once i get my first couple paychecks.

    Glad you guys like the date trick in cron.

Similar Threads

  1. redirect traffic inside NAt to appear to come from outside.
    By frostbolt in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 11-09-2010, 04:08 PM
  2. Bioshock - possible spoilers inside
    By Enolij in forum Windows - General Topics
    Replies: 1
    Last Post: 10-18-2007, 11:42 AM
  3. LinuxFoo Logo Contest!!
    By mcangeli in forum General Chat
    Replies: 27
    Last Post: 07-10-2005, 02:10 AM
  4. Contest
    By Jdun in forum Linux - General Topics
    Replies: 2
    Last Post: 09-21-2004, 08:00 AM
  5. Contest!
    By kenshi in forum General Chat
    Replies: 18
    Last Post: 12-31-2001, 01:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •