I've got a GA script library, which contains some Google Docs operations that I use a lot (such as specific formatting, heading numbers or specific searches). When I want to use these functions, I currently add a script to the document, that loads the menu builder (in the library), and then add the library to that script. That seems to be the shortest way of using the library across multiple files. I have these questions:
(1) Is there a way in which these library functions can be available to all my Google Docs, without having to load them per document? My understanding is that this is not possible.
(2) Is this correct: The best way to make these library functions available would be to build an extension, and publish this on the Chrome store. (Possibly as 'beta extension'?)
If this is correct, then could somebody point me to a simple step-by-step guide for turning scripts into docs extensions? I've looked around, but what I saw wasn't all that clear. Ideally I'd like to be able to update the extension frequently, as it's still under development.
Thanks!
Related
I am building an application with a Google App Script project that will be entirely housed within Google Sheets. I am using different tabs of a sheet for data storage and building HTML-based dialogs and sidebars to navigate the application. I am not going to deploy this as a library or web app, and I am not planning on utilizing any other web server of my own creation.
It is going well so far, but at this point I would like to added embedded resources, e.g. images that can be used as backgrounds of web pages. I can add .gs files and .html files fine to cover server-side coding, client-side coding, and styles, but I do not know of a way to add other files to the project. If this were a conventional web-based development process, I imagine I'd have something like an "img" folder at the root of my server entry point -- that's the functionality I am looking for in a GAS project.
Is it possible to add embedded resource files to a GAS project? Alternately, is there some way I can encode binary resources in an HTML file and then decode as needed to appear as usable content? I can certainly build adequate data-entry forms without additional resources, but things are going to look pretty spartan.
I did find a previous question that mentioned workarounds like placing resources in Google Drive alongside the Google Sheet w/ script, but that was from 4 years ago. Was wondering if there was a better/preferred methodology now that I am simply missing. That other question can be viewed here:
Elegant way to store resources...
Partial answer
If this were a conventional web-based development process, I imagine I'd have something like an "img" folder at the root of my server entry point -- that's the functionality I am looking for in a GAS project.
Google Apps Script doesn't have a root folder. Non-code resources should be hosted somewhere else.
See also
http://www.google.com/script/start
This question already has answers here:
Does Google Apps Script support external IDEs?
(7 answers)
Closed 7 years ago.
I have to to work on a project in Google Apps Script (GAS), and using their built-in IDE/editor is not satisfactory for a number of reasons. Before I list these, my question is whether I can use a different editor/development environment that the one Google provides (without having to copy/paste my code from that editor, of course).
I use NeoVim for everyday work, so I would like to be able to use something with at least Vim emulation or, better yet, to be able to sync my GAS files to my project being hosted online, without having to leave my normal editor.
The built-in IDE for GAS is weak, with no obvious documentation/keyboard shortcuts that I've come across, which makes even switching between script files a small chore.
This all goes without mentioning the difficulty with debugging (although betterlog makes this almost tolerable).
I feel like I must be missing something huge (a tutorial maybe) because I feel like Google would be one of the first to acknowledge developer comfort/laziness when building their tools.
If you can also use Eclipse, there is a helpful example guide of how to do so for GAS projects within the Google Apps Script documentation
https://developers.google.com/eclipse/docs/apps_script
perhaps there is something in there for you to adapt.
How to programmatically — through the API or through a maintenance script — do an action on every page from a specified namespace?
I would for example like to add every page of the main namespace into a specified category, for maintenance purpose.
I've had to do this on a few occasions.
It looks like the way to do things now is through the Pywikibot scripts. These are tools written in Python for automating tasks on MediaWiki sites. Unlike most of the MediaWiki documentation, the PWB docs are actually pretty thorough.
When I last had to add some text to every page, I couldn't find a bot that worked with my private instance running on my intranet, since most bots were written to work with Wikipedia.
What I ended up doing was just generating a list of page URLs, and then fed them to a custom script that utilized Selenium to automate a browser running on my machine. You can use Selenium from Java, Python, C#, and Ruby.
It's a pretty heavyweight approach though, since you actually have to be running a realtime browser to do the work.
Take a look at Pywikibot.
Is it possible to create apps script using Dart and the Dart->JS translator?
I'm guessing the answer is no, but I'd be interested in learning of any plans to integrate the two development environments.
You guessed right, the answer is no indeed. You can't write Apps Scripts in Dart.
Although your second question can only be answered by a Googler, but as a Top Contributor, I can say that if such plans exist they're probably not for the near future. I'd guess that it will not be here within a year.
Google Apps Script have a very specific set of libraries and usage that I imagine not to be Dart's team goal. I think such integration does not have much "appeal" for either teams (Apps Script and Dart).
A Googler has shown in DartConf 2018 lightning talk for using Dart in App Script. He promised it will be open sourced. The demonstrated solution includes App Script library in Dart, automated build and deployment through Google Drive.
Is it possible to convert a standard PHP based widget integrated with google maps API to a flash based widget? If yes, what are the ways?
I expect it will generally be a manual process, because the code styles are so different, code-to-code conversion would be likely to be difficult/fragile/error-prone. The only automatic way that I could conceive of is a html-to-flash-ui conversion, which would get you a static look or prototype to start with, but wouldn't help you in the creation of the active/reactive/dynamic elements of the new flash widget.
A quick google search brings up a few paid references to html to flash conversion, as well as a few pages mentioning some libraries that might be worth pursuing, if just as a shortcut to creating a prototype that you would have to refine:
http://drawlogic.com/2008/01/11/as3-flash-to-html-conversion-library-htmlwrapper/
and here:
http://osflash.org/flashml
Since there is one free library, there may quite likely be others as well.