Create Google document with pictures and descriptions - google-apps-script

I am fairly new to Google Apps Script for something complex like this. I am attempting this small project to investigate and improve my understand of Google Apps Script. I have spent a lot of time off and on on this task. I feel like I'm approaching this task all wrong and I need a some guidance. BTW, the end user is my brother.
Overview:
The end user performs inspections and he takes pictures of issues that he discovered. I would like to create a Google Apps solution that will allow the end user to upload the pictures, make notations, then generate a PDF report to print/email. The solution would allow him to upload his pictures and make notations or provide descriptions.
Problems:
The pictures are high resolution pictures that can be about 5-6 Megabtyes each, but the final report usually does not need this high resolution of pictures. I think I would need to reduce the picture resolution to an appropriate level for the reports.
I would like the end user to be able to perform all the tasks within the custom Google Apps Script workflow solution without having to jump to this, that, or the other application (like using Picasa).
Would I create a UiApp to create a form to use for uploading the pictures and making notations?
Thanks for all the help. Just let me know if I need to provide any more clarification on my request.
Sincerely,

Have you seen this post where I suggest a complete workflow to handle image upload with automatic resize. You should only add a textArea widget to type the comments wich would be a good GAS practice exercise :-)
The post has a couple of links to online demo form , doc and spreadsheet, feel free to have a look, many people have already posted a lot of images of all kind !!
Following your comments - this script does not modify the original file, it would be possible to upload multiple files in one submission, Picasa is probably a good idea, have a look at this tuto to see how to integrate it in gas, have a look also to Romain Vialard and James Ferreira website (easy to find in a google search)

Related

Making a dynamic schedule view that brings data from remote webpage

I'm trying to make a view with Swift on Xcode that shows the schedule of an event day.
The problem is that, while I'm trying to make the schedule dynamic, so that it changes depending on the data from a website, the way to do so is elusive.
For example, if there already is a schedule posted on website, what could I do so that the schedule showed on the app changes depending on the schedule on the website?
Or, as an alternative, could I maybe bring data from a google doc that lists a schedule to be shown on the schedule view of my app?
Merely using a webview and linking the website page isn't good enough, as it would be no better than posting a link on the app.
I know these are very broad questions, but I was wondering if the community has better ideas to offer, or some efficient ways to carry out those two aforementioned procedures.
Yes. Using WebView is a lazy method and is not efficient.
The best solution to do this is by scrapping the data from that website. There are lots of scrapping libraries available for many languages. Usually called HTML DOM parsers. I prefer this one: http://simplehtmldom.sourceforge.net/ It's built on PHP. Though its name says "simple", it's very powerful. Read their docs. These scrappers read data from HTML code and parse based on certain rules like id, class etc. You can then convert this data to JSON/XML and then use it in your app
Before doing this, check whether that website has any sort of API

Display a league table on a webpage?

Me and a few of my mates are doing a FIFA league between us. I have a server I could upload the league table to. At the minute I'm using a spreadsheet with formulas to work out the points, and the goal difference. Very simple stuff, but saves me having to change everything and I instead just change the wins, draws, losses and goals scored, conceded. The problem is, a lot of the guys use their phones to participate in our chat online, and can't view the spreadsheet on the phone.
So what I'm looking help with is, I know I can create a html table, but is there anyway I can include formulas in it?
For something this simple, I would recommend Google Docs. You can just upload your spreadsheet It's very easy to use, you can share your spreadsheet with others and it can be viewed in any web browser, or via the Google Docs app available on android and ios.
Otherwise, you can learn Javascript to do the calculations for you in your html table. Which is also very easy to do, but if you've never used Javascript, it can be a little overwhelming at first. If you need help with some Javascript, let me know and I can walk you through it (if you decide to choose this route)

Is there any possible way to give share programs not code in Google Apps Script

I am going make some programs in Google Apps Script for a non-profit organization. I don't want give them my code. Is there any possible way to give them programs not code. Actually, I don't want anyone to see or change my code.
And I also don't want to use Web App. My script will access their contacts and Spreadsheets.
You may want to investigate Libraries. You can put the segments of the code you want to protect into a library, and then give them code (macros, scripts, whatever) that just calls that library - they will be able to see the code you gave, but not the library. However I don't know how "foolproof" this is if someone was really determined to dig.
https://developers.google.com/apps-script/guide_libraries?hl=en

Advice on Where to Start with My App

I'm a relative beginner using Google Apps Script and JavaScript, but I've been playing around with bot for days now and I've created a few simple programs and I'd really like to try and get started on my dream project, even if it takes me forever. I'd like some advice on what I should use in terms of making the UI and what database I should use to hold the information (and if this app is even possible).
The App
I'd like to create an online novel management app that utilizes Google Drive as it's source for files. The UI would have a tree that showcases all the google drive files in the novel. When a scene is clicked, the scene opens up for editting.
Questions
Is this app a possibility?
If so, in terms of a UI, what do you think I should use? The google
provided UIbuilder? The HTML service - for example, can I have a
frame on the right that the google doc that needs to be editted
can open up in on the right?
Lastly, what database should I use? The database would have to store
chapter names and positions, as well as scene names, positions,
and the google doc ID that the scene corresponds to. I've got a
handle on ScriptDB and Spreadsheets... And if either of these two
aren't the best option, would some other database work better? And
why?
This app will, hopefully, be able to give an overview of a novel in tree form, allow you to open a particular scene and edit it, create new scenes, and also change the order in which the scenes are displayed. And then when the person finishes their novel, the app will compile all the scenes into one novel (also in google Drive).
Any insight or suggestions would be greatly appreciated!
Having a look at the questions you recently posted I think I have a pretty good idea of what you are trying to do and it looks like an exciting project... I can only encourage you to start it as soon as you can even if you're not comfortable with all the tools you will need to use, the best learning method is probably to work on something important to you.
Now your 3 questions : 1 - This is perfectly doable in the GAS environment and shouldn't be too hard to go through.
2 - the GUI builder is an easy way to start with UI but it lacks a number of features and tools that you will be needing (tree for example ) and is not so easy to expand if you ever need to. Depending on your knowledge in html, the choice is mainly between UiApp and html service... I would choose UiApp because I'm not good at all in html (but that's not relevant here ;-) but both are capable of building what you want, are easily expandable and not too hard to debug. The advantage could go to html service if you are going to look for 'nice looking features' because it opens the door to 3rd party tools... but again, this is a matter of personal choice.
3 - A recent post from Mogsdad showed that spreadsheet are faster than scriptDb for data storage and manipulation. I find it also easier since I can have a global view on data in the spreadsheet when debugging. Of course Spreadsheet must be considered as a container and data manipulated at array level to benefit from maximum performance. I use that in a lot of database application with full satisfaction.
Sorry for these "general considerations" that don't comply to sto standards ;-)
Yes, it seems that all of the things you are requesting are not too ridiculous. I recommend sticking to Google services because they are all easily integrated. To start off, you may want to use the UI builder/UI services. There may be a point in this project where you may want some functionality that the UiApp doesn't provide. At that point, you might want to switch over to HtmlService.
My answer is the same for the databases question. You might want to use a spreadsheet for your database so that you will be able to easily edit it by hand if you need to. You may not have the performance that another database would give you, but it will be fairly easy to test and mess around with your spreadsheet "database."
You could start out with getting the basics down. There's a serious amount of data out there. I would suggest you research on an "as-needed" basis. Design some work-/dataflow patterns for your app, for which you could try to use the Fluid UI extension for Chrome. Have a look at this from Mozilla on the designing of apps.
When you've gone through this you might want to have a look at Phonegap and the basics of web development and how you could combine the two.
There's also several ways of using/storing data. You could try WebSQL though it they no longer develop it. You could look at IndexedDB. You could try to use cookies.
Seriously, have a look around. You might also like the books of Wrox. They're very informative and have great work with reading demo's. Though the books are huge ;)

Google Search Sitemaps

Does anyone know of any good tutorials that would show me how to create a sitemap similar to the image below. I can't figure out how to add the different sections underneath like the Your Account, FAQs, etc.
Any help would be extremely helpful. Thank you.
google search for instagram
What you want is what Google calls Sitelinks.
The process is automated and it's not possible right now to create them but you can manage them with the Google's web master tools. The algorithm used by Google to generate them is not public.
You can try this: http://www.xml-sitemaps.com/, or just google 'xml sitemap generator'
I remember that what happened (in my 'previous' life, when I had to take care of all the gory details of our company site) I just followed google's recommended seo suggestions. It was painstaking and slow, but over time when we started turning up at the top of sear results, that exactly how google presented us. It pulled relevant information on it's own and created that nice display. Looking at my old codebase I don't even see a sitemap file there. But I do remember using one of those online generators and then hand turning it a bit.