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

Exporting snippets improvement #48

Open
bantya opened this issue Feb 23, 2019 · 3 comments
Open

Exporting snippets improvement #48

bantya opened this issue Feb 23, 2019 · 3 comments
Labels
Feature request User requests for new feature

Comments

@bantya
Copy link
Contributor

bantya commented Feb 23, 2019

Current Behavior

image

Currently the Export JSON button exports the snippet in .json format and not really in the actual snippet filetype. The expoerted snippet json does contain the actual snippet however, it also holds the metadata such as created_date, updated_date, name, tags etc.

Demonstration

This is what an exported snippet looks like:

2019-02-23_18-38-32

I know it is pulled from the snippets.json file:

2019-02-23_18-38-39

Expected Behavior

Upon exporting a snippet, as per #46 (comment), only the snippet content (withput \n, metadata) should be exported as the snippet file name along with snippet file type.

e.g. Here a snippet name is git-issue-draft.md and filetype is markdown, thus the snippet should be exported as git-issue-draft.md filename.

2019-02-23_18-38-46

For multi-file snippets, user should be able to export desired files only.

System Info

image

References

#46 (comment) and #46 (comment)

@bantya
Copy link
Contributor Author

bantya commented Feb 23, 2019

If #46 (comment) is implemented before addressing this (#48) issue, then it will be a hell-lot easy to export the snippets as stated above.

@ZeroX-DG ZeroX-DG added the Feature request User requests for new feature label Mar 4, 2019
@ZeroX-DG
Copy link
Owner

ZeroX-DG commented Mar 4, 2019

I first intended the export feature is for transferring the exported snippet to other computer and import it using the import feature. I didn't make the export snippet content feature because I think people can always click the copy button.

@bantya
Copy link
Contributor Author

bantya commented Mar 4, 2019

I first intended the export feature is for transferring the exported snippet to other computer and import it using the import feature. I didn't make the export snippet content feature because I think people can always click the copy button.

Copy button is anytime useful. No doubt about that!
One may have his/her e.g. utility class/library(s) that they use in almost every project. Copying the snippet content, creating a new file and then pasting into it is somewhat inconvenient.

There is a middle way which can be best of both worlds:
Having a setting in (Interface section) which user can toggle to choose between the current export behavior or the newer proposed one may be a great help!

e.g.

    [x] Show snippet update time
    [ ] Show snippet copy count
👉 [x] Export the snippet content only (Export metadata also if unchecked)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature request User requests for new feature
Projects
None yet
Development

No branches or pull requests

2 participants