Is there a way to specify the destination folder when you use the /copy parameter in a google docs URL? - google-docs

Google docs has a great feature that replacing the /edit with /copy in a google docs/sheets/slides URL prompts the user to make a copy.
I'd like the copy to remain in the document's original folder rather than making a copy in the users gdrive.
Any way to either specify the 'copy in place' behavior or the destination folder?
thanks!

I figured it out - posting to help others.
https://docs.google.com/spreadsheets/d/<UUID OF FILE TO COPY>/copy?copyDestination=<UUID OF DESTINATION FOLDER>
for example (non working example)
To make a copy of 1xdd6pDLlid2loRcyyuhwULkycQnfcyr4r2q4bLTJVM
into folder ls1l28BLf1eD3mrP9llMbIkSMH0XLTu1k
https://docs.google.com/spreadsheets/d/1xdd6pDLlid2loRcyyuhwULkycQnfcyr4r2q4bLTJVM/copy?copyDestination=ls1l28BLf1eD3mrP9llMbIkSMH0XLTu1k
(tip of the hat to the comments here)
enjoy!

Related

How to get shareable links for edit and view on the subfolder in Google drive?

I am in the situation, where I want to provide a link (obtained via Share option) to view all the project (i.e. folder structure with files inside). This is working without any problem. Now, I want to also provide a link to edit the particular subfolder. Again, I got link and through it I can edit files inside the subfolder. But the problem is that if I use 1st link (the view one) I am able to edit the subfolder even though I do not have permissions to do that (I suppose permissions are given by the 2nd link).
root folder (view link)
subfolder 1 (edit link; can edit with the view link)
file 1
file 2
subfolder 2
file 3
file 4
Is it a feature or I am doing something wrong?
Thank you,
Jirka
I think you want to use the "Share..." pop-up menu option, not the "Get sharable link" option; on the next dialog click on "advanced":
So I have found an answer here https://productforums.google.com/forum/#!topic/docs/fpxbFbxj2SQ.
According to that post it is not possible to have multiple share links with different permissions. The only option is to use email addresses.

Referencing repository files at a given commit in gitlab wiki

Gitlab Markdown has support for references to files in the repository structure, like:
[README](doc/README)
or
[README](doc/README#L13)
But are there ways to reference files and lines in these files, but from a given commit, at least in the Wiki ?
Maybe something like:
[README](1ab3fa71:doc/README#L13)
or using the file hash id like:
[README](9a27b101#L13)
To use relative links from wiki to the repository (or wise versa) is not supported officially according to Gitlab's documentation (cited from v11.5, still valid for v15.3):
Note: Relative links do not allow referencing project files in a wiki page or wiki page in a project file. The reason for this is that, in GitLab, wiki is always a separate Git repository. For example, I'm a reference-style link will point the link to wikis/style when the link is inside of a wiki markdown file.
There is, however, a syntax which seems to work currently:
[[README|/../blob/1ab3fa71/doc/README#L13]]
But be aware: all text of the same paragraph will just be lost!
I work around that by phrasing like this, which renders like expected for Gitlab CE v11.3.0 at least:
Here you see xyz:
* [[README|/../blob/1ab3fa71/doc/README#L13]]
The root-anchored link (/../blob/<version>/<path-to-file>) ensures that it works from every Wiki page independently from their nesting depth.
For sure this syntax also works for branch names or any other relative link like /../tree/1ab3fa71/doc for example.
Maybe long after the battle, but I found a workaround : Simply make a link to a page where the README.md is. And that's it !
To get the link simply go to a page which displays the document, copy the URL, make a link to that address, append #L with the line number.
Exemple :
[Readme Pelargos](http://192.168.80.250:10080/project-root/android/Pelargos/blob/develop/README.md#L47)
One way I've found that, for the most part, works is to mouseover the line of code that you want to reference in the relevant file. While doing that, click the link icon that appears in the lefthand-side gutter to copy the line reference. With it copied, you then use a slightly revised version of the path in the copied URI.
Here is an example of a link copied using the gutter icon:
https://gitlab.com/settermjd/mezzio-sms-sender-api/-/blob/main/src/App/src/Handler/SMSReplyHandler.php#L23
This is the revised path that I used in a commit. Note the parent directory reference prior to main/:
/../main/src/App/src/Handler/SMSReplyHandler.php#L23
I realize that the file reference in the gitlab wiki, references files from the wiki repository itself and not from the project repository (source code repository).
However, when you make a reference to a hash, it knows if the hash refers to a commit or a file, so you can make references to a specific file from the project repository.

How to link to local images on Node.js version of Tiddlywiki?

I'm using the Node.js version of TiddlyWiki, and I'd like to link to images on my filesystem.
The documentation listed here doesn't work; in the [img[path]] tag, for the path part I put something like /Users/documents/ken/path_to_image.jpg yet nothing shows up in the tiddler.
My wiki exists in /Users/documents/ken/wiki.
I know this is an old post, but zacts stated that you can use a macro plugin or simply use the [img] tag to point to the relative path of the image from the tiddlywiki.html file, but the op is using the node.js version, and zacts apparently didn't read that. There is no tiddlywiki.html file for TiddlyWiki on node.js. That only works with the static .html version of tiddlywiki, not the node.js version.
Currently there is no way to point to a local file through the node.js version of Tiddlywiki as node.js is not a webserver, therefore it does not see subfolders like /images/ off of the root url. The only way is to run a parallel web server on the same machine and use the full web url to the images served up from the web server.
In case someone else stumbles across this problem:
I could not find this documented anywhere, but what seems to work is to just copy the image in the tiddlers directory, then restart the nodejs server, and search for the image title from tiddlywiki. There will be a tiddler that contains that image, that you can edit at your leisure.
Alternatively, copy the image as image_name.png (or image_name.jpg) into the tiddlers directory, and create a image_name.png.meta text file with the following contents:
title: image_name
type: image/jpeg
Upon restart of the tiddlywiki nodejs server, a tiddler with title image_name which contains the image will be there.
If you are using the Node.js version, you can simply put it in the ./files folder, and then use [img[. /files/xxx.jpg]] to reference it.
I had this same issue recently, and I found a neat little solution for it. Let me send you the links, and I'll post the snippets here.
I happened to stumble across this tiddlywiki image gallery homepage that linked to a macro plugin that lets you link in local images. Here is the link to the tiddler for the plugin: http://www.richshumaker.com/tw5/tw-photo.html#External%20Image%20Path. Here is the original TiddlyWiki google groups post of the plugin for this: https://groups.google.com/forum/#!msg/tiddlywiki/ChRV6sjQpn4/bCm35_XhGmkJ.
I hope this helps! =) (note: when I get more time I may clean up the formatting of this post).
It is very simple, you use _canonical_uri field
_canonical_uri field
The field value is something like "./wiki/path_to_image.jpg" (mine is "./files") in the same level as the tiddlers folder. I did not experimented with files outside the root folder of the wiki. The dot in the path might be ommited.
The content type might be "audio/mp3" "image/jpg" look at the "parser" shadow tiddlers. Your Browser might support more content types like "audio/wav" but you would have to add this line to "$:/core/modules/parsers/audioparser.js" For example. Might be the same thing for images. Check your browser support.
I really do not know why this fact is so obscure, but it work wonders.

How to retrieve file from folder on on another subdomain without using full url

I have a file "area1.mysite.com/gallery/settings.php" that I need to include in "area2.mysite.com/index.php". The issue is that I cannot use the full url I need to go backwards from /area2/www/index.php to /area1/www/gallery/setting.php... Does that make scents?
Surely this could be done using relative links? so you would include
../../../area1/www/gallery/setting.php
As long as that is your correct file setup in the question... But yeah basically each ../ moves you up one folder, and then you can dive back down just like you would with a non-relative link

dreamweaver templates keep putting absolute addresses in script src

I moved a set of templates to a new folder also named Templates so the instructional designer can see them in her "New page from Template" window. For some reason, I as the programmer can see the list if I try to make a new page from template, but the ID couldn't. While moving them allowed her to see them, it broke all the relative links to the js script src files. And when she tries to save the template page, it tells her to try and copy files and the absolute links don't get reset to their relative paths.
Is there a way to reset the relative links to those .dwt files? When I open the .dwt files, the relative links look correct; but when the ID makes a new page and then chooses a template to use, the links break at that point.
What do I need to do make the templates retain the relative links again?
Thanks in advance!
Carlos
When I moved the templates, it wasn't just in a new folder, but on a new level in the folder structure, so the old script src address "../../scripts/nav.js" wouldn't work because in its new location, it overshot the folder by one level and hence couldn't find the js file in question. Readjusting the relative links to compensate for its new location and structure level fixed this issue.
Carlos

Resources