[Feature Request] Follow XDG Base Directory Specification on Linux
background
Currently, yank-note put all user files in ~/yank-note, but it would be better to follow the XDG specification, see XDG Base Directory Specification.
There are few files in ~/yank-note, and they can be easily classified.
➜ yank-note ls
config.json extensions histories pandoc-reference.docx plugins themes
config.json should go to $XDG_CONFIG_HOME/yank-note (defaults to $HOME/.config/yank-note when the environment variable $XDG_CONFIG_HOME is undefined.)
And extensions pandoc-reference.docx plugins themes should go to $XDG_DATA_HOME/yank-note, which defaults
to $HOME/.local/share/yank-note,
Finally, histories should go to $XDG_CACHE_HOME/yank-note, which defaults to $HOME/.cache/yank-note.
suggested solution
Only the following lines need to be changed. You can follow https://github.com/rivy/js.xdg-portable,
https://github.com/purocean/yn/blob/4cfd1acf0fa5de7f80f8e4129686a84a4b4c97bf/src/main/constant.ts#L11-L20
https://github.com/purocean/yn/blob/4cfd1acf0fa5de7f80f8e4129686a84a4b4c97bf/src/main/server/convert.ts#L8