From 6183ce65f20068a7ff7a532115a6e3d84cdfe139 Mon Sep 17 00:00:00 2001 From: Lastofthefirst <47003973+Lastofthefirst@users.noreply.github.com> Date: Sat, 27 Mar 2021 13:22:03 -0400 Subject: [PATCH 1/4] Custom Script for tsv to json. boop. --- Scripts/tsvToJson.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Scripts/tsvToJson.js diff --git a/Scripts/tsvToJson.js b/Scripts/tsvToJson.js new file mode 100644 index 00000000..8a175b9b --- /dev/null +++ b/Scripts/tsvToJson.js @@ -0,0 +1,28 @@ +/** + { + "api":1, + "name":"TSV to JSON", + "description":"Converts TSV to JSON", + "author":"Quddus George", + "icon":"table", + "tags":"tab, tsv, json, table" + } +**/ + +//credit for tsv function: https://gist.github.com/iwek/7154706#gistcomment-3369283 + +function main(state) { + function tsvJSON(tsv) { + return tsv + .split("\n") + .map((line) => line.split("\t")) + .reduce((a, c, i, d) => { + if (i) { + const item = Object.fromEntries(c.map((val, j) => [d[0][j], val])); + return a ? [...a, item] : [item]; + } + }, []); + } + let json = JSON.stringify(tsvJSON(state.fullText)); + state.fullText = json; +} From 932e3adce891f9f69564ec1e17829b5a74ff027d Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Sat, 27 Mar 2021 20:24:41 -1000 Subject: [PATCH 2/4] Adding Scripts/CalculateSize.js which does a postInfo of the size of input.text --- Scripts/CalculateSize.js | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Scripts/CalculateSize.js diff --git a/Scripts/CalculateSize.js b/Scripts/CalculateSize.js new file mode 100644 index 00000000..62c0e365 --- /dev/null +++ b/Scripts/CalculateSize.js @@ -0,0 +1,48 @@ +/** +{ + "api": 1, + "name": "Calculate Size (Bytes)", + "description": "Calculates size of text in Bytes", + "author": "zzz", + "icon": "counter", + "tags": "calc,size,bytes,storage" +} +**/ + +//From https://stackoverflow.com/a/12206089 +function getUTF8Length(s) { + var len = 0; + for (var i = 0; i < s.length; i++) { + var code = s.charCodeAt(i); + if (code <= 0x7f) { + len += 1; + } else if (code <= 0x7ff) { + len += 2; + } else if (code >= 0xd800 && code <= 0xdfff) { + // Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2 + // (Assume next char is the other [valid] half and just skip it) + len += 4; i++; + } else if (code < 0xffff) { + len += 3; + } else { + len += 4; + } + } + return len; + } + +function main(input) { + let bytes = getUTF8Length(input.text); + if (bytes > 1000000) + { + bytes /= 1000000; + input.postInfo(`${bytes.toFixed(2)} Mb`) + } + if (bytes > 100000) { + bytes /= 1000; + input.postInfo(`${bytes.toFixed(2)} Kb`) + } + else { + input.postInfo(`${bytes} bytes`) + } +} \ No newline at end of file From 2a6038ecdd0f9ff91669389c1db9fb99271ff036 Mon Sep 17 00:00:00 2001 From: Ivan Mathy Date: Tue, 30 Aug 2022 22:35:38 -0700 Subject: [PATCH 3/4] Added DOING.md --- DOING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 DOING.md diff --git a/DOING.md b/DOING.md new file mode 100644 index 00000000..fa2de7d8 --- /dev/null +++ b/DOING.md @@ -0,0 +1,35 @@ +# DOING.md + +This document, inspired by [this tweet](https://twitter.com/drwave/status/1564063331341590529), contains the currently in progress or planned features for Boop. + +This document was last updated *August, 30th 2022*. Work may be happening in other repositories or branches making this one appear stale, but Boop is still very much an active project. + +## In progress + +### Multi Cursor Editing + +The ability to have more than one active cursor to type and edit content. + +### Split Scripts + +Separating scripts from the main Boop Github repository, into a dedicated one. + +## Planned + +### Color Settings + +The ability to customize colors beyond light and dark mode. Maybe themes? + +### Font Settings + +The ability to change font, and more importantly font-size. + +## Not Planned + +### Load / Save + +There is no plan to support files within Boop. + +### Tabs + +There is no plan to support tabs or multiple windows within Boop. \ No newline at end of file From 5cf6914381f6ed6ef004c3a7d470f241a248fcb6 Mon Sep 17 00:00:00 2001 From: Ivan Mathy Date: Fri, 12 May 2023 17:54:41 -0700 Subject: [PATCH 4/4] Fixed build failing on newer machines. Yes, this means development is becoming more active again. --- Boop/Boop.xcodeproj/project.pbxproj | 4 +- .../xcshareddata/swiftpm/Package.resolved | 42 +++++++++---------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Boop/Boop.xcodeproj/project.pbxproj b/Boop/Boop.xcodeproj/project.pbxproj index 7085f0a8..41258aca 100644 --- a/Boop/Boop.xcodeproj/project.pbxproj +++ b/Boop/Boop.xcodeproj/project.pbxproj @@ -912,8 +912,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/IvanMathy/savannakit"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.14.2; + branch = main; + kind = branch; }; }; 2C8BE186249EBB3D00099B73 /* XCRemoteSwiftPackageReference "fuse-swift" */ = { diff --git a/Boop/Boop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Boop/Boop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index b8edfad9..263450c3 100644 --- a/Boop/Boop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Boop/Boop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,25 +1,23 @@ { - "object": { - "pins": [ - { - "package": "Fuse", - "repositoryURL": "https://github.com/IvanMathy/fuse-swift", - "state": { - "branch": null, - "revision": "acb9a2ec2789ce1dcca4d01872a20da801e7ac55", - "version": "2.0.0" - } - }, - { - "package": "SavannaKit", - "repositoryURL": "https://github.com/IvanMathy/savannakit", - "state": { - "branch": null, - "revision": "bb51ee074152a7361e7085d10723f699c79fe673", - "version": "0.15.1" - } + "pins" : [ + { + "identity" : "fuse-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/IvanMathy/fuse-swift", + "state" : { + "revision" : "acb9a2ec2789ce1dcca4d01872a20da801e7ac55", + "version" : "2.0.0" } - ] - }, - "version": 1 + }, + { + "identity" : "savannakit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/IvanMathy/savannakit", + "state" : { + "branch" : "main", + "revision" : "bb51ee074152a7361e7085d10723f699c79fe673" + } + } + ], + "version" : 2 }