Using dynamically generated pages in Rainmeter Webparser - rainmeter

I am trying to make a Rainmeter plugin to download the daily image from http://miniature-calendar.com/
When I give the daily site statically, it downloads and displays the image, however if I try to get the daily site by using variables, it fails and does not download anymore.
The code I am using now:
[Rainmeter]
Update=1000
[MyMeter1]
Measure=Time
Format=%y%m%d
[MeasureImage]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=120000
MeasureName=MyMeter1
DynamicVariables=1
Url=http://miniature-calendar.com/%1/
RegExp=(?siU)<div class="post-body">\s*<p><img src="(.*)" alt="" title="(.*)"
StringIndex=1
Download=1
DownloadFile=daily.jpg
This way the About tab says that WebParser has an empty Url and does not download the image. However if I say Url=http://miniature-calendar.com/160113/ then it downloads the appropriate image.
What should I change to make it working?

Related

How to locate HTML elements in SpreadJS

My company uses SpreadJS to embed an Excel like sheet into a web page. I'm trying to find a way to create automation tests for this, but I'm unable to locate any of the document information due to the following error:
"You need a browser which full supports HTML5 Canvas to run SpreadJS". I've tried several different browsers, all of which are up to date, and yet I still run into the same issue.
Does anyone know a way around this?
Here is an online example. Let say I just want to modify cell A1 and then retrieve its value:
driver = webdriver.Chrome(paht_to_driver_variable) driver.get("grapecity.com/spreadjs/designer/index.html")

How to get a copy of all uploaded images from a Plone site

I am working on a plone site with version 4. I want to have a copy of all the uploaded images. What is the way to get it? I couldn't get appropriate documentation for it.
If you are comfortable with the Linux command line and want something quick and dirty to get ALL images locally, you can add a script (Python) via the zmi into the portal_skins/custom folder on the Plone site, with the following code:
from Products.CMFCore.utils import getToolByName
base = 'http://example.com/'
pc = getToolByName(context, 'portal_catalog')
query = {'portal_type': 'Image'}
brains = pc(query)
for brain in brains:
path = brain.getObject().absolute_url()[len(base):]
dire = '/'.join(path.split('/')[:-1])
print "mkdir -p '%s';wget %s%s -O '%s'" % (dire, base, path, path)
return printed
(Replace example.com with your site domain name)
Call the script 'image_links'.
Then go to to http://example.com/image_links
You should see a whole bunch of bash shell script commands on the web page. Copy and paste those into a terminal, and your machine should download the images.
Alternatively, put those commands into a shell script and download them all at once.
This produces a directory structure with all images on the site.
I used something similar a few weeks ago to download 3500 images from a client site. Took an hour or 2, but without involvement from me.
Keep in mind that this is quick and dirty: Images get the Plone object name, so might not have the correct extension, etc. YMMV.
A simple (but manual) way is to connect to your Plone site using a webdav client and authenticating using Plone credentials.
In this way you can move inside Plone folders and drag & drop images from remove site to your local machine.

Google App Engine : Wrong Serving Url

I have created a Google App Engine project where it's possible to upload photos. Uploading part is working fine and all the photos are uploaded in proper size. But when I try getting images.get_serving_url , it returns me serving_url appended with lh3.googleusercontent.com but according to GoogleAppEngine documentation it must return serving_url something like lh3.gghpt.com . Also, the problem which comes is that the photos on that serving_url is 4-6 times smaller than the uploaded ones and when I view in the GoogleAppEngine console, all those photos have same size as the uploaded ones. I don't know why GoogleAppEngine is not returning the actual sized images.
Try specifying size=0 in the images.get_serving_url method call.
eg. images.get_serving_url(blob_key, size=0)

Provide url and store image from the url in a file in file system in groovy

I am doing a project in grails using groovy to upload an image. I have been able to fetch a file from my-computer and store it in a location and display it from there. I wish to accept a url from the user during run time and store the image in the locaion and display from there. Help please
Please consider Gregg's comment, but if you stay with your idea, this is the way I would do it:
new File("path/to/local/image.jpg").bytes = new java.net.Url("http://url.from.user/image.jpg").bytes

Trying to use image from URL with Kohana Image class

I'm trying to use an image from a URL with Kohana image class. http://kohanaframework.org/3.0/guide/api/Image
Is this possible or does the image always have to be local to the project?
I'm accessing the image like this:
http://www.mysite.com/temp/myimage.jpg
from the same site.
However the temp folder in the above URL is actually an Alias in Apache so is outside of the document root.
Can anyone shed any light on a solution?
The kohana image library says its not an image because it either fails
realpath($file);
or
getimagesize($file);
Cheers.
The image does have to be local to the project.
What you can do is grab a copy off the remote and save it to your project and serve that.
$offsite_path = 'http://example.com/images/steve-buscemi.jpg';
$local_copy = Remote::get($offsite_path);
$local_path = 'images/steve-buscemi.jpg';
file_put_contents($local_path, $local_copy);
echo HTML::image($local_path);
There is a feature request to allow for remote image access using the Image module.

Resources