I need simple search-replace in doc file exported from google doc. and than upload it to google doc.
How do I do it in python ?
google doc also support pdf export. If editing pdf is easier , I will try that instead of doc.
I am using google app engine envrionment with python.
I am able to download and upload file easily. Just can't figure out how to edit the file programmatically.
You can use the Google Data APIs Python Client Library.
For example, you can write to a spreadsheet (for example) easily. "Matt Cuts" has a ticket on his blog about that : http://www.mattcutts.com/blog/write-google-spreadsheet-from-python
I think the Google Data API's will only allow you to export and upload documents. To manipulate the document itself, it will probably be easiest to export to OpenDocument format (.odt), and use a Python library for that. Search the Python Package Index for "opendocument" and you will find some. ezodf and lpod seem not too difficult at first sight.
Related
Is there any way i can automatically update my google sheets data Using appscripts or Python?
Right now, I have access(through Gmail) to download it using a link, It downloads a csv file which I later Update in google sheets.
Any Help? Suggestion ? Advice?
Tried using scripts, but doesnot update for some reason.
I was wondering whether there's any Python-based tool/script that I can use to visualize the OCR results, in JSON format, that I got after using Microsoft Azure Read API on a PDF document.
I've found this one but it's only available for MS Windows users.
Thank you!
There is a brand new online portal provided by Microsoft to test this service, among others, without developing (but it will use your own Azure resources): https://preview.vision.azure.com/demo/OCR
The advantage is that it will directly list your available resources so you just have to pick the right one, then you test, and there are also some samples.
I tested, it works with a PDF:
Here is the link to kiosk sample on github for computer vision explorer.
Document: https://github.com/microsoft/Cognitive-Samples-IntelligentKiosk/blob/master/Documentation/VisionAPIExplorer.md
Direct download: http://aka.ms/kioskapp
I couldn't find anything online so that's why I'm posting it despite the question being simple.
I'm writing a script that download an application's binary and puts it in a file. I would like the use the PyGitHub API to retrieve some information. The problem is that I don't want to enter any credentials when accessing GitHub. I don't need to modify anything, I just want to download the latest release and get information on it. I tried to do it with request, but it's very complicated to use, especially if I only want specific files in the repo. Is there any way I can access the repo using the API without needing credentials?
You can simply pass nothing to the main class, to use the API without authenticating.
from github import Github
g = Github()
r = g.get_repo("REPO_USER/REPO_NAME")
I am pretty new in this, so wanted to have code and process to load data from csv file (Placed in Google Storage) to BigQuery Table using the python code and DataFlow.
Thanks in advance.
There are different BigQuery libraries depending on the language. For Python you would find this one.
But if what you want is the exactly piece of code to upload CSV from Google Cloud Storage to Bigquery, this example might work for you: "Loading CSV data into a new table"
You can see also in the same documentation page "Appending to or overwriting a table with CSV data".
You can go also to the GitHub in order to check all the methods available for Python.
I have a python program which outputs JSON files. I want to get the JSON files into google sheets.
I looked for a way to upload JSON files directly to google sheets, and couldn't find a way.
This prompted me to look for a way to store my JSON files online, so google sheets could use an API to call the JSON data.
I have tried using Google Cloud Platform, but I could not find a way to call the JSON data from Google Cloud Platform to google sheets. I looked into a few other web based services that offer storage and api services at low-no cost, but I could not find any. I am fairly proficient Python, but that's the extent of my programming knowledge.
At this point, I am at a loss as far as a method of getting my JSON data into a google spreadsheet. Any and all advice/suggestions are welcome and appreciated, and I am glad to answer any questions.
I would use this https://pypi.org/project/tablib/0.9.3/
to convert if from JSON to xls. Then you can open it up directly in google sheets.
Edit: Found a video which shows how to write Dictionary structured data to CSV.
https://www.youtube.com/watch?v=s1XiCh-mGCA