Is there any way using google app script to add file to zip archive with zero compression? I only found class Utilities with method zip. However there is no parameters which allows to control compression levels or any other parameters of archive.
Google App Script is a light-weight JavaScript based cloud scripting language to automate certain tasks and build web applications. Stressing on the word, "light-weight". Hence, it does not provide certain (or should say, all) functionalities as JavaScript does(or at least made possible through importing libraries) and unfortunately, ability to control compression ratio is one of them. However, you can file this as a Feature Request on the Public Issue Tracker.
Related
I am working on a windows store app, one of the workflows within the app would allow the user to export a report in html format. The html report relies on a css file so I would like to ensure that the install process could deploy the file in a local folder. If not I would need to read out the file from the assets folder (within the install bundle) and manually write it out but that seems pretty kludgy
https://learn.microsoft.com/en-us/uwp/api/Windows.Storage.KnownFolders?view=winrt-22000
mentions that "The Documents library is not intended for general use." so would require use through file picker but I would prefer to be able to export the document without user intervention without additional store approval headaches (apparently adding Documents library capability to manifest requires additional Microsoft store approval).
Questions
When I create files within the store app it seems the location options are limited and I can only write to Localfolder (which is actually hidden and users cannot easily get to it) - There must be a way to create a file within the MyDocuments directory that is easily accessible by users but looks like that is off limits to a windows store app? So what is the best approach to write reports to storage that can be easily accessed by users
How can one deploy files to a specific directory during install time? Assuming there are some installer commands/manifest directives that would allow this capability?
Or maybe there is a entirely different mechanism to allow for this functionality within the store app and I am just looking in all the wrong places...
I've an question about libraries usage within Google Sheets.
I developed a standalone Apps Script published as Library. This library is used by 150 Google Sheets files (I did that to centralize and hide some code from users).
Today, I need to update the library code to add some functionalities.
I'd like to know if you know a solution to remotely update the 150 Sheets Clients to match the new Library version on client side (I don't use the "dev" mode).
It seems that the Apps Script API can change do changes on the library itself but not on the client side (sheets).
Has someone else had this issue and how did you deal with it ?
Nope. You'll have to do it yourself. Libraries not in dev mode never auto-update, and can't be updated to the latest version by the library developer, because they are libraries -- it is expected that there is code in the destination that uses it, and thus it is not guaranteed that changing the version does not break the interface code.
If you want your deployed code to be auto-updated to the latest version, you should be using the add-on model, or (when you know that you will have backwards compatibility for your library interface) accessing your libraries from your scripts in dev mode.
You can collect the requisite Script IDs (File -> Project Properties) that need to have the library updated, and you can update the Script Project contents (including the appsscript.json manifest file that specifies the library version) via the Apps Script API. You may find clasp helpful for this.
Lets say I have a web URL to a file on a cloud storage (like Dropbox, Google Drive, etc). How do I convert that to the corresponding file path on my pc? On Android? On iOS?
Assuming of course I have the utilities/apps installed locally.
EDIT: I interested in file name the reverse direction too. (I.e. when I have the local file path, what is the web path?)
EDIT 2: #Greg just made me realize that the problem with file name is much worse on Google Drive than on Dropbox.
And that is very bad. :-(
The reason? Google has good search capabilities on Drive and therefor I and many, many others have put their documents on Drive. However, once I found it I must locate it on my on computer/device. (If I want to edit a pdf for example.)
EDIT 3: #Dan McGrath kindly asked what parts remain unsolved.
Short answer: All. ;-)
Long answer: My actual use case, see below.
My actual use case is a Zotero web app. Zotero is a reference database where you store references to scientific articles, web pages, etc. The items stored in Zotero may include PDF files or - which I prefer - links to PDF files.
I just want to be able to easy access (read) this PDF files from any computer through the web app. And on my own computer I want to be able to edit the files with my local PDF editor. (Be it Android, Windows or whatever.)
By using a cloud storage I do not have to download/upload the files myself. The cloud storage takes care of that part.
For the "reverse" scenario, that is, you have a file and you want the Dropbox shared link, you can use this API endpoint, assuming you're connected to the account via the API:
https://www.dropbox.com/developers/core/docs#shares
I have a webapp, mywebapp.com, that successfully gets user permission to access Google Drive, mostly following examples for server-side flow here:
https://developers.google.com/drive/web/auth/web-server
I successfully upload, then access those SAME files.
However, what I really want to do is access OTHER files, in particular Google Docs docs. Can this be done, and how?
If not, can it be done with client-side flow using regular JavaScript (not Google's hosted scripts)?
What your app can and cannot see is determined by the scope. The possible values are enumerated here https://developers.google.com/drive/web/scopes
I have a Chrome Packaged App that I want to be able to graph data for the user. I would ideally like to interface with something along the lines of the Charts/Visualization API, but I'm trying to find a solution that will work offline, possibly through integration with other apps or within my app specifically. Is there a way to insert a Google Chart or something very similar into my packaged app? Is there an API or feature I am unaware of that would make this feasible?
Unfortunately the Google Charts library cannot be downloaded for inclusion in a packaged app due to their terms and conditions:
Sorry; our terms of service do not allow you to download and save or host the google.load or google.visualization code.
- Google Charts FAQ
That said, there are many excellent Javascript libraries that are available for download which you could include with your packaged app and use as if they were included from a remote source.
This stack overflow question should help you decide between the various options. You should then download the Javascript files for the library you chose and place them within the folder of your packaged app and then use them like any local Javascript that you've written.