What is the difference between Google Apps Scripts and Gadgets in Google Sites - google-gadget

I am getting familiar with Google Sites. What I want is, building a Site front-end for a Google Spreadsheet.
I want to Display data from the Spreadsheet in the Google Site, later maybe some graphics as well. To my knowledge there are two ways to accomplish this, Apps Scripts and Gadgets. Building a Gadget seemed much more easy in the beginning, however gives me some trouble. After reading more about Apps Scripts I finally found a way to access the Spreadsheet and display data.
But reading a lot of google documentation, I wonder what really is the difference? In what cases should one use Gadgets and in what case Apps Scripts?
Maybe I am just a little overwhelmed but it would be nice to get some feedback from experiences developers in that field!
Thanks a lot.
Cheers,
Daniel

Google Apps Script is javascript, but run in server side. So it is not client side javascript like javascript Gadget or any HTML.
Google Apps Script use GWT, which generate client side Javascript.

Gadget is XML code containing HTML inside
which means gadget is text.
Google Apps Script is kinda JavaScript
which means GAS is code.
Might be the main difference.

Related

What is the most efficient way to automate your Instagram?

Over the past few weeks, I've spent some time researching about Instagram automation the goal being to have a program that can like and comment for me. I've come up with the following solutions:
Use a browser automation library like selenium to navigate through Instagram's website.
Cons: really botchy code that becomes useless as soon as Instagram renames their css classes which they do from time to time
Have a Android emulator running and automate that.
Cons: every instance of that emulator would require like 2 gigs of storage and would be really inefficient.
So how do for example apps on the play-/app store do it? They only have the small processing power of the phone available and still run effortless in the background.
Is there another solution that I'm missing?
The most efficient way to automate Instagram is to use the Instagram API. Using that API you can publish photos with users, tags and locations [1]. I don't find any immediate mention of Stories etc., but most likely if you work more with the API you find where/how to do that.
The also linked Instagram Platform API seems to be in a state of discontinuation.
As you tagged your question "Selenium", no, Selenium does not provide a reasonable approach for interfacing with Instagram as Selenium provides no way to make POST requests. You could try to automate the website through Selenium, but using the API is far more straightforward, less prone to layout changes and the officially sanctioned way.
[1] https://developers.facebook.com/docs/instagram-api/content-publishing
The way I did it at the end was that I used the Instagram Private API for Instagram on GitHub:
https://github.com/ping/instagram_private_api
That way I didn't have to emulate an entire device actually browsing through Instagram.

Kimono Desktop Stopped Working?

Anyone having trouble building API's with the new Kimono Desktop app. When I click create API the browser just stays on create API screen loading but nothing happens.
I even tried building an API that is the same as one I built when Kimono was still in business and no luck.
My existing api's still run and pull data fine.
Working just fine here.
Just a shot in the blue...did you install the new extension specifically for the desktop app? The old one can't work anymore since Kimono disabled the online service.
You can't build new APIs I think - only existing ones. :( Said something like it was not the acquiring company's policy to provide this publiclu available service but since they did not know how many businesses depended on their APIs they decided to allow existing APis to run.
You can also use their software for replace the online API. But it's an abandonware.
It's working great but on some website I can create new API because of an error.
I just find a possible (free) product that can replace Kimono : Datascraping.co.
They will include an REST FULL API within few days / weeks, as they said here.
It's a good software, but comparing to Kimono Desktop it's a little much more complicated.
Kimono got bought out and it's not working anymore.
Import.io is good but it kinda expensive for me. I've tried the free trial before but see the price starts from $249, so... https://www.import.io/standard-plans/
I don't have any progamming skills so I know very little about some web scraping frameworks like Scrapy.
You may want to look at this new web scraping software called Octoparse.
In case you want to know, here is the link:http://www.octoparse.com/
It takes a little time to begin. But they have rich tutorials on the website. Plus it doesn't require programming skills.
They provide cloud-based scraping service and API access.
You can use it to create API but you have to pay for the service. Free version doesn't have the API and cloud service.
I've been using it for 2 month with the Standard plan $89, which a lot cheaper than import.io. So far so good.
Hope it would be helpful for you.

Can you create Google Forms from Google Docs in an application?

I am thinking about app that will use google form and I need to create forms from that app. Is there a way how can I create form in google docs without using website but through some api or some other way?
I can offer an idea for a solution using Google App Script.
Since the beginning of 2013 you can create new forms using the App Script Forms Service API quite easily.
var form = FormApp.create(title)
.setDescription(description)
.setConfirmationMessage('Thanks for responding!')
;
The problem now is how to get that App Script running from your non App Script code.
You can use App Script to create a Web App that reacts to HTTP GET requests.
So putting it together, you may be able to create an App Script Web App that reacts to a GET request and when it gets the right URL parameters, it creates the form.
(Nov 2020) Yes, it is possible to programmatically create Google Forms. You can do it with Google Apps Script using its Forms service. You can also extend the code to read in the contents from Google Docs (with Apps Script's Document service) and use it for the creation of Google Forms.
I created a Google Workspace (formerly G Suite) Add-on, which you can think of as a Google Docs extension, called GFormIt. Its original purpose was intended for teachers to write exams/quizzes, possibly with answers, in Google Docs, then automatically convert them to Google Forms to distribute to students who submit their answers into Google Sheets (the destination for Google Forms submissions).
Furthermore, if you (the teacher) provided answers to your test questions, GFormIt would also auto-submit your answers to the Sheet as if you were a student. If you do that, and use a tool like Flubaroo to grade the exam, you could designate your row in the Sheet as “the answer key.” You can learn more about how it works, including viewing a short video, at the GFormIt page linked above.
This Google Docs add-on, along with others for Google Docs, Sheets, Slides, Forms, etc., are all certified/validated by Google and available for free to anyone from the Google Workspace Marketplace. (However, your admins may have to grant permissions for you to try to install them to your corporate Workspace account.) If interested in building your own add-on, please see the developer documentation and perhaps some of my introductory videos to get started, the most relevant being the one linked to at the top of this answer.
Apps Script is a serverless Google technology, meaning you write your code (using JavaScript) in the browser, and it is hosted by & executed on Google servers. If you wanted to create your own web app (and hosted anywhere), you would have to wait for a Google Forms REST API which does not exist at the time of this writing. (If we ever launch one, you'll find its documentation at https://developers.google.com/forms along with the others like Sheets https://developers.google.com/sheets, Gmail https://developers.google.com/gmail, Drive https://developers.google.com/drive, etc.)
Earlier this year (Mar 2022) the new Google Forms Api graduated from Beta. It is more powerful that the previous versions and caters for two main use cases:
Automated form creation and editing: Enables automated form creation
and editing. Enables rapid form generation from large volume question
banks or other data backends.
Reaction to Form responses: The API also enables developers to build
automations for acting on incoming responses. Examples include
developing real-time dashboards or visualizations and triggering
business workflows based on response data.
We have used it to build an integration that Creates documents and slides each time a form is completed: www.portant.co/google-forms-to-docs and it works really well.
I think the other key use case looks like it would be a good fit for you and others looking for a solution like this.
Cheers, James
Sorry, the API doesn't support programmatically creating forms.

What's a good web-based analytics package that'll work without requiring javascript?

My understanding is that Google Analytics (the tool I'd normally use for website analytics) cannot be used on a MySpace page, because MySpace doesn't allow you to embed javascript.
But my client wants to track usage of her MySpace page.
Has anyone found away around this? I'm looking for a different web-based, third-party analytics toolset, I guess. One that doesn't depend on javascript, is at least close to as feature-rich as Google Analytics, and is preferably cheap (or free!).
(I picture a 1x1 image-based solution.)
StatCounter is a pretty good alternative to Google Analytics that provides an image-based tracking tool for this sort of situation. It does only keep track of the last 500 requests for the free plan, however.
You also have to understand that the only way to do this without Javascript (the image based approach) will not be able to collect nearly as much data as the Javascript-based tracking tools.
AwStats is a server-side that processes based on your server logs.
GetClicky uses an image and/or a script to track visitors.

Set instant messenger display message programmatically

Would a script that sets display messages for instant messengers be simple or complex? After some searching, there doesn't seem to be any information about this at all.
For the sake of an example, if I had a text file of quotations, would it be possible to have the google talk display message change to a different quotation hourly?
Depends on which client you're using. As far as I know, Google's client doesn't offer any interface for plugins, but the open source instant messenger Pidgin does. I think there already is a plugin for what you want to do, but you can write your own using the documentation and examples they give you.
The complexity of writing something like this is based on how much C or Perl you know, since you can program in either of those for Pidgin. Reading code from other people's plugins, you should be able to figure out the Pidgin API.
You can use Kik API to programmatically send rich content and files between mobile applications. It is available for iPhone and Android platforms and takes only about 5 lines of code to integrate into your app. There is more info at the API website: http://www.kik.com/dev
Disclaimer: I'm on of the developers behind Kik API :)