This question pertains to this link:
http://aeronav.faa.gov/afd.asp?cycle=afd_26JUL2012&eff=07-26-2012&end=09-20-2012#results
To give you some background, I have no experience in Web Programming. I am however decently versed in C/C++, but I don't mind learning a Web language/s to do what I need to do.
The link above contains a form to select an airport. Once an airport is chosen and the search link is clicked, the page scrolls down and a link to download a pdf file containing information about the airport is populated.
Now, the task: I have an excel sheet that contains a list of airports (and of course the fields required to navigate to the airport with the form such as city, name and state).
I would like to implement a script/program that automatically populates the fields in the above link with the information in the excel sheet for each airport, and downloads the resulting pdf link to a specified location locally. If a tool for doing something like this already exists, I would obviously prefer to use that.
One scripting language you could use for this is AutoIt.
Using this, you can script where the mouse should move to, what the keyboard should type, and control it all. You would have to play around with the timing since some of the searches and downloading will take longer than others.
However, rather than typing in the different information into the web form each time, if you could determine what naming convention they use for the .pdf files, you could possibly save some time.
Or you could download each of the .pdf pages from the books, and then run a program to get the file you are interested in for a specific airport. (you could use auto-it to do the downloading. I would probably use c# and the WebBrowser object, but I'm use to c#).
For instance, according to the north-west legend, the table of contents list Idaho from pages 22 through 61 (inclusive).
which may mean that you could just pre-download:
http://aeronav.faa.gov/pdfs/nw_22_26JUL2012.pdf
http://aeronav.faa.gov/pdfs/nw_23_26JUL2012.pdf
http://aeronav.faa.gov/pdfs/nw_24_26JUL2012.pdf
...
http://aeronav.faa.gov/pdfs/nw_61_26JUL2012.pdf
then go on to Montana, etc.
Searching for a specific airport in Idaho, would involve searching through the Idaho .pdf files for the name of the airport.
Anyway, that's probably how I would go about it.
Related
I am looking to find out if it is POSSIBLE to restrict EDITORS from downloading, copying or printing a Google sheet or other documents in a Google Drive. We share sheets/documents with our customers so they can fill in the details. For that we need to make them EDITORS (so they can edit and even invite others to the party). I know that we can restrict COMMENTERS and VIEWERS from downloading, but in our case we need to prevent EDITORS.
We have a LOT of intellectual property in our sheets (custom formulas and approaches), and we would like to be able to prevent people from simply downloading it. As I understand it this SHOULD be possible using the Google Drive API, but I have not been able to figure out how to do it, yet. Looking at the API it obliquely says it MAY be possible, but it is not clear :-(
Direction, or sample code, would be VERY much appreciated.
TIA
It's not possible to restrict editors from downloading files. The documentation mentions that only commenters and viewers can be prevented from this. Then in the API docs concerning permissions and their definitions you will see that there's nothing controlling downloads either. This is just a UI change.
If you think about it, the reason is clear: Even if you manage to stop direct downloads, to anyone with at least read access to the file or API this is just a minor inconvenience. They can still read all the content and metadata from the API and replicate the file perfectly. Even viewers with copy disabled can still read the formulas from the formula bar. Sharing the Sheets file is inherently unsafe if you have confidential data in it, since a determined attacker can still get all your trade secrets easily. You're only supposed to share these files with trusted users.
My suggestion is to take a different approach. Do not share the Sheets file at all and use something else as intermediary to request data from your customers. For example:
Create a Google Form to save the responses to a Sheet. Your customers will only need to fill out the form and the sheet will be filled with data that you can handle on your side.
If you need the users to also view some information in the Sheet before filling out their info you can build an Apps Script Web App that displays only the plain data that you need to show them. With this you can hide the formulas and other sensitive information. Using templates and server functions you can allow the users to interface with the Sheet data similarly to how they do it now, but with a more restricted view. You could even allow them to edit only the data you want them to. This requires more work and is starting to delve into web development, but It's much easier than a fully fledged website since the hosting and interfacing with APIs is handled by Apps Script.
You could just create your own application and use the Sheets API to read and write data from the Sheet. This is pretty much the previous suggestion but much harder, though in the end it will give you more flexibility.
The bottom line is that sharing your Sheet in any way is akin to giving your users full database read or write access, and there's no single setting that can prevent that. Your best bet is to avoid sharing these files and use a different method to request user data.
I'm trying to download (or alternatively open and save) approximately 30,000 PDF documents. The documents that are only accessible through a 3rd party service provider's website/platform (there are no ethical dilemmas here).
The website is secure and needs to be logged into (I have access) and the table is generated via AJAX. The report I intend on reading from has a URL of the form https://sub.website.com/au/report/index?id=1001# that doesn't change when dates or other filters change. In total there are 180,000+ table entries, not all have an associated invoice and not all invoices are required.
Using Chrome DevTools I can see the elements; table name is #reportResults, invoice details are in a html element.
There also looks to be an API but I don't know where to start here either.
How do I scrape data from this using VBA? I have downloaded the JSON.bas module recommended in other solutions for scraping JSON and AJAX. But for this situation I don't know how to use it and where to go from here.
I'm handy with VBA but have no experience with any other languages.
I want to create an app that "types" into a text document in Drive. The goal is to have a document which is publicly viewable, if not editable, and a program which enters text into that document as though it were being typed by a person. If I use the following Drive API endpoint PUT https://www.googleapis.com/upload/drive/v2/files/fileId
will a viewer see the edits taking place a character at a time? (assuming I upload each version with one character difference). Or is there a function which would allow me to programmatically "type" each character?
My perusal of the Realtime API makes it look like this is what I want except that it involves setting up a separate page, where what I'm looking for is just the ability to write to a doc in Drive, in real time. Am I looking in the right place?
If you just want a background script that writes to a file, you probably don't need the realtime API. This is more designed for multiple users making changes at the same time.
However, it may be possible to accomplish what you want using the import/export functionality.
Use realtime.get to get the contents of the file as json. Then use realtime.update to post a modified version of the contents. This will cause the diff of the get and the update to be applied to the realtime model. Any active clients will see the changes come in as some new characters added to the document.
I recently made Google Chrome my default browser (mainly due to its bookmark and preferences syncing capabilities across multiple systems).
One thing I find increasingly annoying with it though is, that Chrome does not allow to directly open a downloaded file in an appropriate application!
In IE I was us to, that, when I clicked onto a link pointing to some document, e.g. a spreadsheet, to being asked, whether I wanted to save this document to a local file or to directly open it (in Excel in this example). This worked with all kinds of registered applications but also other formats, e.g. email addresses (mailto:-links) or Calendar entries (.ics-files) which directly opened Outlook's new email dialog with the email-address already filled int or created a new calendar entry from the .ics file, resp.
In Chrome one can only save such docs to a local file and then needs to locate that and has to open it manually. I find this always most cumbersome! Is there some plugin that allows to bring back the convenience I was used to?
And to spare me the usual comments on such feature requests right away: Yes, I am aware, that this is a potential security issue, if one opens docs from dubious sources, etc. I know, that one needs to understand what one is doing in such situations, but I think I do!
Click the little arrow beside the file, which is being downloaded and choose Always open files of this type. That will make it open automatically in the program the file type has been associated with in Windows after it finishes downloading.
I want to implement this use case found on the W3C File API document:
User agents should provide the ability to save a local file programmatically given an amount of data and a file name.
Example: A Spreadsheet App. User interacts with a form, and generates some input. The form then generates a CSV (Comma Separated Variables) output for the user to import into a spreadsheet, and uses "Save...". The generated output can also be directly integrated into a web-based spreadsheet, and uploaded asynchronously.
Source: http://www.w3.org/TR/file-upload/#requirements
From my understanding, it should be possible to create a completely offline Spreadsheet app with this, but I could not find a single example both in the W3C document or on the web that has this kind of use case implemented. At least not a completely offline one. Of course it doesn't need to be a spreadsheet application; a simple text editor or TODO manager would suffice. Am I missing something?
Also, would this make it possible to create one of the previously mentioned applications (text editor, todo manager or even spreadsheet app) from a single html5 file (with embedded JS and css)?
I seems I didn't search hard enough, here's an example of what I want http://html5-demos.appspot.com/static/a.download.html