Closed majkinetor closed 9 months ago
@majkinetor, @lostintangent, this is what I have so far:
In every case the user needs to select the destination folder where to save the files. When downloading a gist, the gist name is used as the name of a folder to contain the gist's files. Since gist names can contain special characters (e.g. slash, pund sign, greater or smaller than etc.), I am currently replacing those characters with an underscore (you can see the result in the second video below): is this ok or do you have other suggestions?
Also, I am thinking to add a setting to control folder/file overwrites, e.g. gistpad.downloadOverwrite
Comments? @lostintangent I can submit a draft PR with what I have so far if you want to take a look at the code.
I have named the command Download...
to download both one (or more) gist and file(s), we can be more specific (e.g. Download gist...
, Download file...
) if you think that can be confusing.
Awesome work. I don't think anything is confusing or requires more work.
It would be nice to have Download all tho, that would work on the current filter (you select a tag, or nothing at all, and issue download all).
Do you mean something like this, when I click on a user?
If that includes my own gists and not just people I follow, then yes.
I need to handle a few edge cases I found in my testing, but this is how Download all...
looks like:
At this point, even if we don't group followed users in a "folder" (like Your Gists
or Starred Users
), is a command to download all gists from all followed users and from Scratch Nodes
Great work.
This solves backup and read, but batch write is still a problem - lets say I do search and replace downloaded gists using vscode, operation that touches 20 gists, how would I save that upstream? It is briefly mentioned in original description of this issue (called local cache and sync), but it probably deserves its own ticket if you would like to tackle that (I do have few ideas in mind).
Agreed, that would be better tracked in its own issue, do you mind opening one with the description and ideas you mentioned? We can continue the discussion there
OK, I will do it. Thanks :)
I haven't had a use for this feature, and I've not heard any other requests for it. So due to the low priority, and the fact that I couldn't naturally test/maintain in as part of my personal usage, I'm going to close this as "not planned".
If folks would like this feature, they can check out this alternative extension: https://marketplace.visualstudio.com/items?itemName=CarloCardella.vscode-virtualgists
Is your feature request related to a problem? Please describe.
I would like to have all gists locally for various purposes - advanced search, processing, backup...
Describe the solution you'd like
At least command that would allow one to download all gists (both private and public) into local folder. One time event, you explicitly call it, and specify folder where gists will be downloaded to.
Much better option would be to add GistPad options to specify local cache folder that should always contain latest downloaded versions and we should be able to periodically sync it completely either manually or automatically in case there are some edits outside of GistPad (e.g. using the Github UI or some other tool).
We probably need few options for this such as:
but even the first simplest solution with sane defaults would suffice.
Describe alternatives you've considered
There are no alternatives right now apart from using various CLI tools to achieve that.
I would prefer GistPad be my only gist interface and its most important to have your stuff offline.
Also, I believe that this is easy to implement feature.