Is it possible to prevent modifications to the title of a Google Doc yet allow the contents of the Google Doc to be edited - google-docs

My Problem
I want to be able to migrate my Google Docs to a regular website while maintaining the links I had created between my Google Docs. Frequently I link one Google Doc to another Google Doc. As a result, I have created something that is similar to a wiki. For example let’s suppose I had created two Google Docs: Google Doc #1 and Google Doc #2.
Subsequently let’s suppose I had created a link (a hyperlink) in Google Doc #1 to Google Doc #2. Of course that's an extremely simple example. Let’s make it more complex. Imagine I had created a couple of thousand Google Docs with many links (hyperlinks) between them.
Of course backing up those Google Docs would be trivial either by using Google Takeout or rsync. However, what would happen if I wanted to move those Google Docs to a regular website? Then the myriad hyperlinks I had created would fail to point to the documents on my regular website.
That is, on my regular website, if I were to click on the link on the page which contained the contents which had been contained in Google Doc #1 (https://my_regular_website.com/google_doc_001) then instead of opening a link on my regular website to the page which contained the contents which had been contained in Google Doc #2 (https://my_regular_website.com/google_doc_002) , the link would point to the original Google Doc #2 (https://drive.google.com/drive/folders/google_doc_002)
My Technical Question
I read that, “You can use the 'contentRestrictions.readOnly' field on a `file' resource to lock a file and prevent modifications to the title, uploading a new revision, and addition of comments.” Source: Protect file content from modification
However, I would like to prevent modifications to the title file yet allow the contents of the file to be edited. For example, I might name a file something like, “1cn2OX4U67mY925GzG80hRBYjpqq2conSi9xgYikgwIM” which is the unique portion of a Google Docs URL.
That way, on my regular website, by using a simple regex, I could “relink” documents that pointed to https://docs.google.com/document/d/1cn2OX4U67mY925GzG80hRBYjpqq2conSi9xgYikgwIM
Final Thoughts
I like using Google Docs as, dare I say it, a word processor. Sometimes I use Google Docs to write essays. Sometimes I use Google Docs to create documentation. Sometimes I use Google Docs to collaborate with others (instead of emailing). Furthermore, I often use Google Docs’ outline format, styles, and voice typing.
Sure, I suppose I could use an actual wiki. But although I’ve tried many different wikis over the years, I never enjoyed using them. I found them to be clunky and overly simplistic. Furthermore, I didn’t enjoy installing them and needing to back them up. At this point In time, I don't want to have to install and maintain any software on a VPS (virtual private server).

I checked the documentation you are referring to and what you are trying to achieve is not possible, making a document read only will prevent a new revision of the file to be created.
For instance that won't allow you to change comments, content and title. At this time it is not possible to prevent some modifications, just all or none.
Regards.

Related

Requesting removal of stored website data from search engines

Greetings fellow developers,
I would like to ask for help regarding the following problem: Is there a way to request removal of stored website data from search engines? Most of the links that show up when searching my domain are old and non-existent.
What I've found from personal research regarding this question/problem:
From my personal research I have found that removal requests can be made individually to the well-known search engines such as Google, Yahoo and Bing, but this is not what I am looking for, since I am well-aware that it would take a lot of time for the requests to be processed and the removal of the data to be done. Also, I wasn't able to find this "removal-request" webpage for the other search engines.
To be more precise/clear...
... I want to request this website-data-removal to all (most) search engines at once, so that when I upload my new website (to the same domain), working and functional links (URLs) would be displayed. Can this be anyhow achieved and, if so, how? Also, how much time would it take for this removal to be finished?
Hope my question is clear enough, and any answer/help would be very much appreciated.
No, there is not a way to do this for all search engines at once. You will have to request it from each site individually. As for the smaller search engines you can try and find any contact information or customer support however their is a chance they will ignore your request (heck, some sites ignore the robot.txt file and just search your site anyways... it's just a part of being on the web).

Creating a github dashboard on portfolio site

Thank you for giving me a piece of your time. This question really isn't a "how to", but more of a "is this possible or am I just insane?". I've recently looked at some portfolio pages and found a really great idea from https://flexdinesh.github.io/, but in the "portfolio" section instead of having just the characteristics of the project, is it possible to somehow use the Github API or some other equivalent to extract and present data like number of commits (or the table that github shows on your project page) and what project type it is (i.e. Java, Javascript, etc.) and maybe even some more related information. For background I am using React with Node.js. Again, this is probably useless to everyone out there, but I think it could be something cool if A) it actually exists, and B) it's not too much of a pain to implement. I've tried reading up on the documentation from Github, looking online, and looking at different source code, but no luck there. If anyone has any information or feedback I'm always open to help!
Thank you and have a good day
from what I understand, you want to display statistical information about the projects on your portfolio website.
Github provides an API that can get almost all the information you see on their website
so, to get all the languages being used in repository you can do a GET request on https://api.github.com/repos/:owner/:repo/languages,
To get the number of commits you can do a GET request on https://api.github.com/repos/:owner/:repo/commits
and so on
By default, these will get you the data of the public repositories, if you want to display info from your Private repositories, you need to provide an authentication token with each request.
You can read more about the API calls available here
let me know if you need any more help

Google Documents: Is it possible to replace a shared file?

I would like to have students send me some Stata (.do) code by sharing it with me on Google Docs.
Is it possible to replace the shared with an updated version?
I don't see any option to do that in the File menu, just renaming and editing the file description.
Google Docs works well to share and correct papers, but I'm finding it difficult to share and correct anything else. Thanks for any help!
You can upload multiple versions of the same file. All the versions will be available for review later. To upload a new version, Just click on manage revisions (from where you are in your image) and a dialog will appear. Click on "upload new revision" and navigate to your updated file.
I believe gmail now let's you attach/share updated files to email via Google Drive, and it always keeps the most up-to-date version available. So you can simply update your .do file on your desktop, keep the updated version on your Google Drive, and your students should get them.
http://gmailblog.blogspot.com/2012/11/gmail-and-drive-new-way-to-send-files.html
You can also consider Google Code (http://code.google.com; if you have a gmail account, you also have the Code account, or at least you can transparently create one from the main Google account), and work with your code using the standard code sharing, development and maintenance tools like Mercurial and its various interfaces. I have developed Stata code pretty much professionally, trust me that this is a much better tool than Google Docs (and any other real programmer here on SO would confirm that).

Add search feature to simple website without mySQL database

I have a simple HTML site with 100+ pages or so. I want to add a search bar at the top so the user can search the site. I know about Google Custom Search, but it shows ads unless you pay at least $100. Obviously I'd like ad-less search on my site for free if at all possible!
I've also heard about Lucene/Solr, but they do not actually crawl the site. For that I would apparently need Nutch.
Anyway, the site I have runs on a Microsoft IIS6 server, but I have basically no knowledge as to how Solr, Nutch, etc. gets "installed" on the server.
Also: I'd like to point out that I do have a local copy of the site. Perhaps I can do one big initial nutch "crawl" locally that will create an .xml for Solr?? That would help me get "up and running", but probably wouldn't be a good long-term solution.
..so should I just use Google Custom Search? or is there a not-extremely-painful-to-implement alternative? The brain hurts folks.
You did not mention how many search requests you want to handle but if you use the json-rest-api of google's custom search you have 100 searchqueries a day for free and you can display them without any ads on your page.
An simple example request can be found here.
Here is an easy way that works pretty well, although you may be looking for something more than this.
http://sitecomber.com/getsitecomber/
You can create code to paste into your site in about 2 minutes. It doesn't get easier than that. Search is powered by Google, but results are isolated to your website.
EDIT: This no longer works.

google image search: search similar images

I want to write a mobile app which takes a picture and searches google images for similar pictures and then displays the results.
However, with google image search I can only search for text strings, and with the search API it seems there's no possibility to search for similar pictures; this feature seems to be available only through the web interface.
Any idea how I can solve this problem?
thanks,
Christoph
There is a way you can do this now, but its not officially supported, and there are probably some restrictions on the number of queries you can perform. Update
http://images.google.com/searchbyimage?hl=en&biw=1060&bih=766&gbv=2&site=search&image_url={{URL To your image}}&sa=X&ei=H6RaTtb5JcTeiALlmPi2CQ&ved=0CDsQ9Q8
There is also a google image search API, which is being officially deprecated, but it will work for now.
http://code.google.com/apis/imagesearch/
The Google Vision API.
https://cloud.google.com/vision/
This is very simple and easy and powerful.
I had done something like that recently for a mobile app, this is the code for it, it uses google search by image feature, and returns the "best guess" or the whole page
you could use that and modify it to do what you want, but once you get the best guess of the image you could search for any image with that title, etc
https://github.com/hbattat/search-by-image
I don't think it's possible. If you click the link to find similar images from the images result page you get a link with the original query included:
google.com/images?q=ORIGINAL_QUERY&imgtype=i_similar&sa=...
If you remove that GET param manually, the search does not work, it only shows the images search form.
I dont think it is possible to find similar images with google if you do not know what's on it.
I was looking for an answer to this some time ago, and found tineye. You have to pay for it, though. Currently (Jan 2012) USD300 for 5K searches, USD1.5K for 30K searches...
SerpAPI enables to search through Google Images and returns a clean JSON.
URL example:
https://serpapi.com/search.json?q=Apple&tbm=isch&ijn=0
Documentation:
https://serpapi.com/images-results
This service is integrated with most of the programming languages: python, php, java, golang, nodejs...
Google limit the number of search per day. but this service provides unlimited searches...

Resources