IvanMathy / Boop

A scriptable scratchpad for developers. In slow yet steady progress.
https://boop.okat.best
MIT License
3.77k stars 346 forks source link

Basic open/save functionality (revised) #371

Open tinyg opened 1 year ago

tinyg commented 1 year ago

Port nobecutan's changes from "Basic open/save functionality" to the latest version of Boop and then make the errors show in the status view.

Original pull request comments:

With this merge request I propose basic file handling functionality. Open any file type and try to parse it as String via String(contentsOf: pathUrl) – silently ignore the file if it cannot be parsed. This works also via CMD+O and by dragging the file on the app icon. This addresses https://github.com/IvanMathy/Boop/issues/256 and https://github.com/IvanMathy/Boop/issues/227.

Save the content as file (via CMD+SHIFT+S). There is no notion of an open file, it's always "Save As…". This addresses https://github.com/IvanMathy/Boop/issues/278.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

luckman212 commented 10 months ago

This would be an awesome merge! ✨

I'd love to be able to set Boop as my default handler for the public.json UTI for quick manipulation of JSON files.

JanStorm commented 4 months ago

I just compiled your version of the code. Seems that this breaks the editor. In my case (Macbook Pro M1 Max) the line numbers were on the right and i cannot see any text i tried to write: Bildschirmfoto 2024-04-24 um 14 53 21 (But its somehow there, because when pressing enter, the line numbers increases, feels like the editor moved to the right, out the window)