Copy/Paste Text From The Tool-tip Of Google Sheets Cell - database

I want to capture the tooltip text of the URLs that Google sheet shows.
I've this link in the Google sheet:
https://www.vingle.net/
When I hover over this URL, this text is shown:
Create an account or log in - Vingle is an interest-based community platform available via mobile and web, where users can connect with people who love what they love!
Like this:
This is what I want to do:
Copy whatever text is shown in the popup/tooltip of the URL and paste it in the cell next to it. From this:
To this:
FYI, this is actually the meta tag. Most of you might offer IMPORT functions but the I don't want to use import function for some reason. I just want the text that Google sheet is already capturing. Is it possible?

Copy whatever text is shown in the popup/tooltip of the URL and paste it in the cell next to it.
I do not think that can be done in Google Sheets. There are no methods in the Sheets API nor in SpreadsheetApp to capture contents of a pop-up info panel. You would have to retrieve the meta tag through an importdata() formula or a script that uses UrlFetchApp().

Related

Can I download an image if it's in base64 format?

I'm developing a React App, and I have a backend in NodeJS.
In my Mongo Schema I have an array that stores multiple strings, these strings are some images.
I saved them as base64. Now I want to display them in my app, works perfectly fine with src from img tag, but I want to create a button that allows the user to download those pictures, is there any solution to this? Can I convert back that string and make it downloadable? Thank you very much for you time, I'm waiting for your ideas!
Note: The examples in the snippets will not work live because Stack Overflow sandboxes snippets without allow-downloads, but they should work on your page.
Depending on your exact use case, you have different options. The easiest one would be using an <a> tag with the download attribute instead of a button, like this:
<a download="myImage.gif" href="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2CmV1unU4zPgISg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQPbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7">Download GIF</a>
If you need to keep using a button and you want to trigger the download programmatically, you can create an <a> tag (without displaying it) and trigger a click:
const a = document.createElement('a')
a.download = 'myImage.gif'
a.href = 'data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2CmV1unU4zPgISg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQPbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7'
a.click()
(If you need to support older browsers, you may have to temporarily insert the tag into the DOM and trigger the click in a setTimeout(..., 0).)
You can also use object URLs like it's shown here but it's probably easier to go the data URI route since you already have such a URI.

AutoCad - one layout to multiple pages PDF

My project is made with all pages (sheets) in one layout (screenshots in attachment).
I tried everything to export (or plot) the project in PDF with every page on different sheet (ready for printing) with no luck.
P.S. It looks like project is already organized in some grid system, but can anyone help me with solution on how to export every of those cells to one PDF sheet?
Try to create a command tool that executes a print to pdf command sequence.
Here's a ready command sequence for printing Landscape A4 PDF.
*^C^C-PLOT;Y;Model;autocad pdf (general documentation).pc3;ISO A4 (297.00 x 210.00 MM);M;L;N;Window;\RESUME;Fit;Center;Y;acad.ctb;Y;;\;Y;
but you will have to manually select the printing window for each cell and assign a new name for each file.
you will end with multiple pdf files which you can join them later in one file if you like.
Here's a picture for a similar custom command I used before

GAE serving images through links

I wrote a gae python script that would put in different ticker symbols to stockcharts.com and it will grabe the chart image by link using urllib2.
I'm successful in grabbing a list of the chart image links, however, when i try to feed them through a page stockcharts.com won't let me.
Instead of the chart image, it will show "Please visit stockcharts.com to view this chart"
This is an example link:
http://stockcharts.com/c-sc/sc?s=FUN&p=D&yr=1&mn=0&dy=0&i=p97813671848&r=1395885608674
How do i go around that? I want to be able to view the charts i want in 1 single page by loading all the images.
If i take the links and put them in the browser one by one it would work.
for i in range(0,len(charts)):
self.response.out.write('<img src="' + charts[i] + '"><BR>')
thanks!

How can I easily export content from Sitecore 6?

I need to find a simple way to export Sitecore 6 content to a file for translation. I tried using Control Panel | Globalization | Export Languages to a File. However I get odd results. For some reason it seems like it is only exporting the __Source field and no other fields. So the XML file that I get back isn't very helpful - it doesn't include all of the fields in the content item.
Does anyone know how I can either get the Export Languages feature to work properly or if there is some other easy way to export content from Sitecore 6?
To serialize the content item
Navigate to the item in the Content Editor
Select the "Developer" tab at the top
Hit "Serialize Item" in the "Serialize" chunk
Navigate to your /data/serialization/itempath such as... "/data/serialization/master/sitecore/content/home.item"
There's your file
Now that you've made edits to the file for localization
Overwrite the file in serialization step #4 with new copy
Navigate to the item in the Content Editor
Select the "Developer" tab at the top
Hit "Update Item" in the "Serialize" chunk
You're all done
You can fully export a database using the serialization admin tool at http://yoursite.com/sitecore/admin/serialization.aspx

Drupal Attachments (FileField) file path

What function in Drupal gets file attachment path?
Edit: the attachments provided by Upload module in system section. But since you mentioned there may be another way around it. Maybe I could achieve may goals using FileField module so if you could tell me how to get a direct link of a file uploaded by FileField module that may also be very helpful.
Edit 2:
Ok I will start from my main and final objective:
It is to get an image linking to a file which visibility I could be managed using CCK module.
I am doing this step by step. So now I have written a code which generates the needed image and I have added that image to one of content types teaser. I found a way to warp my image in a tag and I had dug up simple attachments url. So my next step is to advance from simple upload attachment to the one added by FileFields and from odd looking HTML pace in all PHP document into beautifully managed CCK field.
How to fetch file path of a file uploaded FileFields?
Some plain and at the same time rich tutorials for making custom fields for CCK module.
Assuming you know how to get the $node object for a node containing a file attachment, this is super easy:
Upload (core)
$file = upload_load($node);
echo $file[1]->filepath;
Where 1 is the index of the file. Upload can let you upload more than one file, so file 2 would have an index of 2 and so on. If there's only one file, it'll always be 1.
More info: upload_load() API reference.
FileField
echo $node->field_fieldname[0]['filepath'];
Where field_filename is the short name you've used for the field, and 0 is the index of the field. CCK fields let you have multiple values in one field, so 0 would be the first, 1 would be the second, etc. If you only have one value, it'll always be 0.
Note: if you want to get the rendered output of the FileField using its formatters, you can just use $field_fieldname in your node template, or if you want to store the rendered output, you can use:
echo content_format('field_fieldname', $node->field_fieldname[0]);
More info: content_format() API reference.
Upload is a sad little module, and has been completely replaced with a core implementation of FileField in Drupal 7. If you have the option to use FileField, you should.
Don't direct links of file attachments appear below the uploaded file for the core Upload module?
Since you are trying to use images, you should use http://drupal.org/project/imagefield CCK module in order to add images to specified content type. After that using the Display fields tab in Content type configuration you can specify how image would be presented (as a link, image, image with link to node...) both in teaser and body view.

Resources