Skip to content

Commit

Permalink
Merge pull request #74 from IvanMathy/feat/addContent
Browse files Browse the repository at this point in the history
Feat/add content
  • Loading branch information
IvanMathy authored Jun 23, 2020
2 parents 2213a0a + ec06890 commit 93c2c98
Show file tree
Hide file tree
Showing 26 changed files with 164 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-collapse.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions Boop/Boop/Assets.xcassets/Icons/icons8-dice.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-dice.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-filtration.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-identification_documents.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions Boop/Boop/Assets.xcassets/Icons/icons8-term.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-term.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions Boop/Boop/Assets.xcassets/Icons/icons8-type.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-font_size.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "icons8-website.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
12 changes: 11 additions & 1 deletion Boop/Boop/Controllers/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ class MainViewController: NSViewController {

}
@IBAction func openHelp(_ sender: Any) {
guard let url = URL(string: "https://github.com/IvanMathy/Boop/blob/master/Boop/Documentation/Readme.md") else {
open(url: "https://github.com/IvanMathy/Boop/blob/master/Boop/Documentation/Readme.md")
}


@IBAction func openScripts(_ sender: Any) {
open(url: "https://github.com/IvanMathy/Boop/tree/main/Scripts")
}


func open(url: String) {
guard let url = URL(string: url) else {
assertionFailure("Could not generate help URL.")
return
}
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"Collapse lines",
"description":"Removes all linebreaks from your text",
"author":"Dennis",
"icon":"table",
"icon":"collapse",
"tags":"strip,remove,collapse,join"
}
**/
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/Downcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"Downcase",
"description":"Converts to lowercase",
"author":"Dan2552",
"icon":"metamorphose",
"icon":"type",
"tags":"downcase,lowercase"
}
**/
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/JWTDecode.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"JWT Decode",
"description":"Converts JWTs to JSON",
"author":"Nils Sonemann",
"icon":"metamorphose",
"icon":"identification",
"tags":"decode,jwt,token"
}
**/
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/JsonToQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"JSON to Query String",
"description":"Converts JSON to URL query string",
"author":"Ota Mares <[email protected]>",
"icon":"table",
"icon":"website",
"tags":"url,query,params,json,convert,encode"
}
**/
Expand Down
6 changes: 3 additions & 3 deletions Boop/Boop/scripts/MarkdownQuote.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
{
"api":1,
"name":"Quote (Markdown style)",
"description":"Prepends > characters for each line, to match the style of a Markdown quote",
"name":"Markdown Quote",
"description":"Adds > to the start of every line of your text",
"author":"Dan2552",
"icon":"metamorphose",
"icon":"term",
"tags":"quote,markdown"
}
**/
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/QueryToJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"Query String to JSON",
"description":"Converts URL query string to JSON",
"author":"Ota Mares <[email protected]>",
"icon":"table",
"icon":"website",
"tags":"url,query,params,json,convert,decode"
}
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"name":"Remove Duplicate Lines",
"description":"Ensures each line of your text is unique",
"author":"andipaetzold",
"icon":"metamorphose",
"icon":"filtration",
"tags":"unique,duplicate"
}
**/

function main(input) {
let lines = input.text.split('\n')
let out = unique(lines)

input.text = unique(input.text.split('\n')).join('\n')
input.text = out.join('\n')

input.postInfo(`${lines.length - out.length} lines removed`)

}

Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/ShuffleLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"Shuffle Lines",
"description":"Randomize each line of your text",
"author":"@Clarko",
"icon":"unknown",
"icon":"dice",
"tags":"shuffle,random"
}
**/
Expand Down
2 changes: 1 addition & 1 deletion Boop/Boop/scripts/Upcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name":"Upcase",
"description":"Converts to uppercase",
"author":"Dan2552",
"icon":"metamorphose",
"icon":"type",
"tags":"upcase,uppercase,capital,capitalize,capitalization"
}
**/
Expand Down
9 changes: 8 additions & 1 deletion Boop/UI/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,13 @@ Gw
<action selector="reloadScripts:" target="Voe-Tx-rLC" id="Rmu-D9-Xm5"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="Tfr-N1-YjS"/>
<menuItem title="Get more scripts…" id="oS5-Vj-4JY">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openScripts:" target="unv-pE-gme" id="zHQ-km-1Mi"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
Expand Down Expand Up @@ -499,7 +506,7 @@ Gw
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<value key="minSize" type="size" width="480" height="360"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
Expand Down
24 changes: 24 additions & 0 deletions Scripts/ShuffleCharacters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
{
"api": 1,
"name": "Shuffle characters",
"description": "Shuffles characters randomly",
"author": "Christian Petersen",
"icon": "dice",
"tags": "shuffle,random,character,char"
}
**/
function shuffleString(string) {
const chars = string.split("");

for (let i = chars.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[chars[i], chars[j]] = [chars[j], chars[i]];
}

return chars.join("");
}

function main(input) {
input.text = shuffleString(input.text);
}

0 comments on commit 93c2c98

Please sign in to comment.