Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Is there an easy way to download a file in to the workspace? #134

Closed
valdar opened this issue Jun 19, 2020 · 9 comments
Closed

Is there an easy way to download a file in to the workspace? #134

valdar opened this issue Jun 19, 2020 · 9 comments
Assignees
Labels
done Task completed

Comments

@valdar
Copy link

valdar commented Jun 19, 2020

I have found extensions to do so, or: didact://?commandId=vscode.didact.cliCommandSuccessful&text=download-a-file-from-url$$wget%20https://...&completion=downloaded but it is not cross platform and requires wget installed.

@apupier
Copy link
Member

apupier commented Jun 19, 2020

there is no commands out of the box in VS Code as far as I know.
You will need to implement it in yoru own extension, or in Didact or to reuse from an exisiting extension such as https://github.com/fuzinato/vscode-download-file/blob/e1c4019e78cbd7c233a08c2d72ddd28f0add4467/package.json#L35

@valdar
Copy link
Author

valdar commented Jun 19, 2020

Yep, the point of this and #135 was to reflect if, given these functionalities seem very commonly used in tutorials, it is better to implement them in didact or request the user to install an extension.

@bfitzpat
Copy link
Collaborator

bfitzpat commented Jun 23, 2020

Looking for something like this? https://marketplace.visualstudio.com/items?itemName=BishopCodes.vscode-pfw

We may be able to leverage the "pasteFromWeb.execute" command it provides to do what you're after -- if we have a url

@bfitzpat
Copy link
Collaborator

bfitzpat commented Jul 6, 2020

So doing some digging into BishopCodes.vscode-pfw, it's not quite going to work for us, but it does inform a possible approach.

@valdar , just so I understand what you're after... With a valid file URL, you want to be able to copy it to a location in the vscode explorer?

Something like:

didact://?commandId=vscode.didact.copyFileFromURLCommand&text=https://raw.githubusercontent.com/redhat-developer/vscode-didact/master/CHANGELOG.md&myfolder/CHANGELOG.md

Is that essentially what you're looking for?

@valdar
Copy link
Author

valdar commented Jul 6, 2020

Correct!

@bfitzpat
Copy link
Collaborator

bfitzpat commented Jul 6, 2020

Something like this:

download-file-from-url-into-project

@valdar
Copy link
Author

valdar commented Jul 6, 2020

awesome!

@bfitzpat
Copy link
Collaborator

bfitzpat commented Jul 6, 2020

Created #140

@bfitzpat
Copy link
Collaborator

Will appear in the next version of Didact!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
done Task completed
Projects
None yet
Development

No branches or pull requests

3 participants