[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
Tynsoe Projects • View topic - images, erros, properties window, caches, etc

images, erros, properties window, caches, etc

images, erros, properties window, caches, etc

Postby electricmetric » Fri Aug 06, 2010 4:20 am

Hi, it has been a long time since I have used GeekTool, glad to see it is still around.

A few issues, starting with the simplest.

Often times, I open the pref pane, and drag a file, image, or shell to the desktop, which results in a small window that is floating with an X and a resize handle. However, there is no way to get the Properties window to show up. I seem to toggle the opening and closing of the pref pane and eventually the properties come around, but it takes some doing. Is this a known issue, or am I doing something wrong?

Today, I made a small script that pulls the images out of flikrs images of the last 7 days. It simply greps through the html, yanks out a list of images with a regex, passes them off to curl, and saved them into ~/bin/flickrPOD/images

Every time the script is run, controlled by launchd to run once an hour, it clears out the images directory, and puts in a new set. As I was testing this, I ran into a lot of issues. For reasons I can't explain, the image that GeekTool shows was much smaller than it should have been. It was not the preview image, but some other size which I can not find a relation to.

I finally took the images, set a box on the desktop, and set it to refresh every 2 seconds. It would cycle through the 10 images I had fine, and they were of the correct size, I believe. I then cd'd to directory in the terminal and started renaming the images. From original_name.jpg to 1.jpg then 2.jpg etc, up to 10.jpg. By the time I was at 10.jpg, GeekTool was not showing me any images at all.

Is this caching related perhaps, maybe there is a cache I need to clear out? However, that does not explain the image size issue, which if I recall correctly, was an issue with version 2 as well, and I can not for the life of me remember what it was. Ahh, it was resolution calculations. If the image was 72 dpi all was well, if the image was 216 dpi, it would be shown 3x smaller than it should be. Whereas a browser, when given a file:/// reference, will go to 100% image size, at native resolution. This doesn't seem to be the exact same thing, but perhaps related in some way.

Here is a pastie of my syslog going apeshit :)
http://pastie.org/1078899
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am

Re: images, erros, properties window, caches, etc

Postby ybizeul » Sat Aug 14, 2010 6:59 pm

electricmetric wrote:Hi, it has been a long time since I have used GeekTool, glad to see it is still around.

A few issues, starting with the simplest.

Often times, I open the pref pane, and drag a file, image, or shell to the desktop, which results in a small window that is floating with an X and a resize handle. However, there is no way to get the Properties window to show up. I seem to toggle the opening and closing of the pref pane and eventually the properties come around, but it takes some doing. Is this a known issue, or am I doing something wrong?


Hi, this is not the first time I see this issue mentioned.

Next time it happens, could you take a look at the console and see if anything related to GeekTool is displayed ?

electricmetric wrote:Today, I made a small script that pulls the images out of flikrs images of the last 7 days. It simply greps through the html, yanks out a list of images with a regex, passes them off to curl, and saved them into ~/bin/flickrPOD/images

Every time the script is run, controlled by launchd to run once an hour, it clears out the images directory, and puts in a new set. As I was testing this, I ran into a lot of issues. For reasons I can't explain, the image that GeekTool shows was much smaller than it should have been. It was not the preview image, but some other size which I can not find a relation to.

I finally took the images, set a box on the desktop, and set it to refresh every 2 seconds. It would cycle through the 10 images I had fine, and they were of the correct size, I believe. I then cd'd to directory in the terminal and started renaming the images. From original_name.jpg to 1.jpg then 2.jpg etc, up to 10.jpg. By the time I was at 10.jpg, GeekTool was not showing me any images at all.

Is this caching related perhaps, maybe there is a cache I need to clear out? However, that does not explain the image size issue, which if I recall correctly, was an issue with version 2 as well, and I can not for the life of me remember what it was. Ahh, it was resolution calculations. If the image was 72 dpi all was well, if the image was 216 dpi, it would be shown 3x smaller than it should be. Whereas a browser, when given a file:/// reference, will go to 100% image size, at native resolution. This doesn't seem to be the exact same thing, but perhaps related in some way.
Here is a pastie of my syslog going apeshit :)
http://pastie.org/1078899


Send me a sample of an image not displaying correctly so that I can fix this (which should already be fixed, but you know...)

The erratic behavior you get when renaming images is normal.
When you set GeekTool to walk through a directory, it is actually recursive, and that recursivity can be a CPU hog if done too often. That's why when starting, the content is cached and used for further access.
IIRC, the cache is rebuild every minutes or so...

Now, directories can contain anything, that's why as a measure of protection against heavy loops, geektool gives up after not finding images with 10 different files, renaming the images brought up those errors in logs, as a side effect
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: images, erros, properties window, caches, etc

Postby electricmetric » Tue Aug 17, 2010 7:45 am

Thanks for the reply. I was not able to get the properties window to behave badly this time around, next time it does, I will get you a capture of the console. These may possibly be related from an older session though:
Code: Select all
8/14/10 12:30:11 AM   GeekTool[11108]   GeekTool 3 version 298 running
8/15/10 3:48:57 PM   GeekTool[13238]   GeekTool 3 version 298 running
8/17/10 12:32:09 AM   GeekTool[13238]   GTPreferencePaneConnector Connected
8/17/10 12:32:31 AM   GeekTool[13238]   No command defined
8/17/10 12:32:40 AM   GeekTool[13238]   GTPreferencePaneConnector Disconnected
8/17/10 12:32:42 AM   GeekTool[13238]   GTPreferencePaneConnector Connected
8/17/10 12:32:48 AM   GeekTool[13238]   GTPreferencePaneConnector Disconnected


I just deleted all images from a directory, and put in a new batch, to which I am now getting this error:
Code: Select all
8/17/10 12:37:37 AM   GeekTool[13238]   006A6B50-1420-4110-9D2F-B78D53486231 Couldn't find an image after 10 tries. You should choose a directory which mostly contains images !


That error is repeating, and has been for 5 minutes now. I will let it go for a while and see if it ever fixes itself. So far, the only way I have been able to get it to is to open GT and toggle that geeklet to a tmp directory then back to the correct one.

These three images, which are now scaled to 72ppi, and work correctly in GT, can also be downloaded as a zip, where they are not 72ppi, and will display at incorrect sizes: http://dl.dropbox.com/u/340087/drops/08 ... 004331.zip

http://i.imgur.com/aALsN.jpg
http://i.imgur.com/ATeau.jpg
http://i.imgur.com/mIhNx.jpg

Thanks for looking into this.
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am

Re: images, erros, properties window, caches, etc

Postby electricmetric » Sun Aug 22, 2010 12:14 am

Hello, here is a copy from syslog that after I was working in GT and no matter how many times I re-opened the pref pane, the editing panel would not show up:
Code: Select all
Aug 20 05:09:28 localhost GeekTool[1971]: GeekTool 3 version 298 running
Aug 20 15:29:39 localhost GeekTool[2386]: GeekTool 3 version 298 running
Aug 20 21:31:59 localhost GeekTool[2386]: GTPreferencePaneConnector Connected
Aug 20 21:32:18 localhost GeekTool[2386]: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: FilePath)
Aug 20 21:32:56 localhost GeekTool[2386]: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: FilePath)
Aug 20 21:33:21 localhost GeekTool[2386]: GTPreferencePaneConnector Disconnected
Aug 20 21:33:25 localhost GeekTool[2386]: GTPreferencePaneConnector Connected
Aug 20 21:33:55 localhost GeekTool[2386]: No command defined
Aug 20 21:34:23 localhost GeekTool[2386]: GTPreferencePaneConnector Disconnected
Aug 20 21:34:35 localhost GeekTool[2386]: GTPreferencePaneConnector Connected
Aug 20 21:34:37 localhost GeekTool[2386]: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: FilePath)
Aug 20 21:36:56 localhost GeekTool[2386]: GTPreferencePaneConnector Disconnected


Specifically, this line seemed to be when it was happening most:
Code: Select all
Aug 20 21:32:56 localhost GeekTool[2386]: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: FilePath)
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am

Re: images, erros, properties window, caches, etc

Postby ybizeul » Tue Aug 24, 2010 9:30 pm

Thanks I'll try to fix it
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: images, erros, properties window, caches, etc

Postby ybizeul » Wed Aug 25, 2010 7:49 am

ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: images, erros, properties window, caches, etc

Postby electricmetric » Mon Sep 27, 2010 2:34 am

Here is a grep from my logs of errors I have been getting lately. Not sure if they are related, but thought this was a good thread to reference them in:
http://pastie.org/1183541
Code: Select all
Sep 25 06:10:55 macbook GeekTool[6275]: GeekTool 3 version 298 running
Sep 25 14:28:25 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1009 UserInfo=0x10029eb20 "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=0x1002d86a0 "This computer’s Internet connection appears to be offline.")
Sep 26 01:46:49 macbook GeekTool[6275]: Error: Embedded profile header length is greater than data length.
Sep 26 01:46:49 macbook GeekTool[6275]: Error: Embedded profile signature is not valid.
Sep 26 01:46:49 macbook [0x0-0x156156].org.tynsoe.geektool3[6275]: Sun Sep 26 01:46:49 macbook.local GeekTool[6275] <Error>: Error: Embedded profile header length is greater than data length.
Sep 26 01:46:49 macbook [0x0-0x156156].org.tynsoe.geektool3[6275]: Sun Sep 26 01:46:49 macbook.local GeekTool[6275] <Error>: Error: Embedded profile signature is not valid.
Sep 26 03:28:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113cadb10 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113c2bc40 "The request timed out.")
Sep 26 04:21:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113ca5280 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113c547b0 "The request timed out.")
Sep 26 04:22:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113cc93f0 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113c51220 "The request timed out.")
Sep 26 04:23:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x100544c00 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x1002dc6e0 "The request timed out.")
Sep 26 04:24:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113cf60b0 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113c34350 "The request timed out.")
Sep 26 04:25:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113cc9ae0 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113cae070 "The request timed out.")
Sep 26 04:26:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113c95d70 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113c547b0 "The request timed out.")
Sep 26 04:27:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x1002dae00 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x100239420 "The request timed out.")
Sep 26 04:28:57 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x1002f6190 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x1002998e0 "The request timed out.")
Sep 26 05:27:21 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x113c9c4d0 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x113cb87c0 "The request timed out.")
Sep 26 05:55:21 macbook GeekTool[6275]: Error while loading image : Error Domain=NSURLErrorDomain Code=-1001 UserInfo=0x1002a9900 "The request timed out." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1001 UserInfo=0x1141ab7e0 "The request timed out.")
Sep 26 19:26:39 macbook GeekTool[6275]: Error: Embedded profile header length is greater than data length.
Sep 26 19:26:39 macbook GeekTool[6275]: Error: Embedded profile signature is not valid.
Sep 26 19:26:39 macbook [0x0-0x156156].org.tynsoe.geektool3[6275]: Sun Sep 26 19:26:39 macbook.local GeekTool[6275] <Error>: Error: Embedded profile header length is greater than data length.
Sep 26 19:26:39 macbook [0x0-0x156156].org.tynsoe.geektool3[6275]: Sun Sep 26 19:26:39 macbook.local GeekTool[6275] <Error>: Error: Embedded profile signature is not valid.
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am

Re: images, erros, properties window, caches, etc

Postby electricmetric » Mon Sep 27, 2010 2:35 am

ybizeul wrote:Try this :

http://tr.im/uhAn


Hmm, that link ends up at TechCrunch, are you sure you posted the correct link? I can't find a reference to GeekTool on that page anywhere. Slip of a copy and paste url perhaps?
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am

Re: images, erros, properties window, caches, etc

Postby ybizeul » Mon Oct 04, 2010 8:24 pm

ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: images, errors, properties window, caches, etc

Postby electricmetric » Tue Oct 12, 2010 2:40 am



Thanks. I am now running 3.0 (134) and will let you know. I can run an image testing sample easily and report back if the scaling is correct for arbitrary resolutions.

In the meantime, I changed the way my script works to simply call via http the image I want, and return that image. I am pulling a random image from flickr's "Interesting" page of the day. I used to grab all the images and store them locally in batches of about 20 at a time. GT could then show a random image from the pool of downloaded images. Of course, this ran into issues with resolution and scaling. I was able to work around that with the awesome command `sips`:

Code: Select all
sips --setProperty dpiHeight 72.000 --setProperty dpiWidth 72.000 'file.jpg'


I abandoned that method because of race condition issues, and now simply parse the flickr page, using a regex to get all the url's that are image resources, and return a random image from the url list. I can then return that image by passing it through apache. I have not ran into any scaling issues with this method.

* This code has no error checking but for it's purpose, seems to work well enough to show me a random interesting image from Flickr.

Code: Select all
   
    // Url of flickrs page that shows top interesting images of the day
    $flickr_url = 'http://www.flickr.com/explore/interesting/7days/';

    // Fetch the data from the above page   
    $http_data  = file_get_contents($flickr_url);                     
   
    // regex to fish out the url's from the http_data, returns $out as an array
    $img_src = preg_match_all('/http:\/\/farm[0-9]{1,5}\.static\.flickr\.com\/[0-9]{1,6}\/[0-9a-zA-z]+_m.(jpg|JPG|jpeg|JPEG)/', $http_data, $out);
   
    // Random number from 0 to size of the array minus 1 - (0 based arrays)
    $rand_image_number = rand(0, count($out[0])-1);
   
    // Grab a random image out of the array
    $get = $out[0][$rand_image_number];

    // Show the image
    $im = file_get_contents($get);
    header('content-type: image/jpg');
    echo $im;


* Edit: spelling and grammar.
electricmetric
 
Posts: 6
Joined: Fri Aug 06, 2010 3:34 am


Return to GeekTool

Who is online

Users browsing this forum: No registered users and 8 guests

cron