Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
extratone committed Sep 29, 2023
1 parent a17997f commit 6e61536
Show file tree
Hide file tree
Showing 4 changed files with 583 additions and 0 deletions.
Binary file added shortcuts/OpeninRoadStr.shortcut
Binary file not shown.
229 changes: 229 additions & 0 deletions shortcuts/source/OpeninRoadStr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
<!DOCTYPE html><html><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no,date=no">
<title>Open in RoadStr</title>
<style>
body {
font-family: system-ui;
font-size: 0.95em;
margin-top: 1rem;
margin-bottom: calc(1rem + env(safe-area-inset-bottom));
word-break: break-word;
}

button {
color: #000;
background-color: #e4e4ff;
width: 100%;
font-size: 1em;
font-weight: normal;
line-height: 1.8;
text-align: left;
margin: 4px 0;
padding: 1px 8px;
border: 1px #aaa;
border-style: solid;
border-radius: 8px;
cursor: initial;
touch-action: manipulation;
}

.button {
margin-bottom: 0;
border-bottom-style: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
cursor: auto;
}
.button::after {
content: '\25A1';
float: right;
font-weight: bold;
margin-left: 10px;
}

.closed {
margin-bottom: 4px;
border-bottom-style: solid;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
.closed::after { content: '\2212'; }

.nonbottom {
margin-bottom: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-bottom-style: none;
}
.nontop {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

.gGray { background-color: #e0e0e0; }
.gGreen { background-color: #ddffdd; }
.gYellow { background-color: #ffeebb; }
.gOrange { background-color: #ffddcc; }
.gRed { background-color: #ffccdd; }
.gBlue { background-color: #aaccff; }
.gUnknown { background-color: #bbffff; }
.gParams {
text-align: center;
background-color: #f8f8f8;
}

.content {
overflow: hidden;
margin-bottom: 4px;
padding: 3px 0 3px 8px;
border: 1px #aaa;
border-style: none solid solid solid;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}

.contentloop {
margin-bottom: 0;
padding-top: 4px;
padding-bottom: 4px;
border-bottom-style: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

.dashed { border-left-style: dashed; }

.inside {
border-right-style: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.commentcontent { background-color: #ffeebb; }

.row {
display: flex;
padding-right: 2px;
}

.col1 {
margin-right: 3px;
padding-right: 3px;
border-right-style: double;
}
.col2 { white-space: pre-wrap; }

span.box {
display: inline;
white-space: pre-wrap;
margin: 0 2px;
padding: 2px 4px;
border-radius: 6px;
background-color: #fff;
}
span.var { font-style: italic; }
span.magic {
cursor: pointer;
font-style: italic;
text-decoration: underline;
}

hr {
width: 0px;
height: 2px;
border: 1px solid #aaa;
margin: -4px auto;
}

@media (prefers-color-scheme: dark) {
body { background: #000; color: #eee; }
button { background: #514c72; color: #eee; }
.gGray { background-color: #555555; }
.gGreen { background-color: #3a6441; }
.gYellow { background-color: #716d33; }
.gOrange { background-color: #76523f; }
.gRed { background-color: #674044; }
.gBlue { background-color: #384c67; }
.gUnknown { background-color: #377172; }
.gParams { background-color: #181818; }
.commentcontent { background-color: #716d33; }
span.box { background-color: #000; }
}
</style></head><body>
<button class="button gParams"><b>Open in RoadStr</b> (7 actions, 6 KB)</button>
<div class="content"><div class="col2">"WFQuickActionSurfaces": [],
"WFWorkflowClientVersion": "2038.0.1.10",
"WFWorkflowHasOutputFallback": false,
"WFWorkflowHasShortcutInputVariables": true,
"WFWorkflowIcon": {
"WFWorkflowIconStartColor": 255,
"WFWorkflowIconGlyphNumber": 61444
},
"WFWorkflowImportQuestions": [],
"WFWorkflowInputContentItemClasses": [
"WFLocationContentItem"
],
"WFWorkflowMinimumClientVersion": 900,
"WFWorkflowMinimumClientVersionString": "900",
"WFWorkflowOutputContentItemClasses": [],
"WFWorkflowTypes": [
"ActionExtension",
"Watch"
]
</div></div>

<button class="button gYellow" id="m0">
0 Comment</button>
<div class="content commentcontent">
<div class="col2">Open an Apple Maps location in RoadStr from the share sheet.

GitHub Issue: https://github.com/extratone/i/issues/311

𝗠𝘆 𝗰𝗼𝗻𝘁𝗮𝗰𝘁 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Email: [email protected]
Contact card: https://davidblue.wtf/db.vcf
Mastodon: https://mastodon.social/@DavidBlue
RoutineHub Profile: https://routinehub.co/user/blue
GitHub: https://github.com/extratone
iOS-specific Repository: https://github.com/extratone/i
Telegram: https://t.me/DavidBlue
Telegram Channel: https://t.me/extratone
Discord: https://davidblue.wtf/discord
Twitter: https://twitter.com/NeoYokel
Reddit: https://reddit.com/u/asphaltapostle
EVERYWHERE: https://davidblue.wtf/socialdrop</div></div>
<button class="gGreen" data-uuid="CAF42636-AAF4-49B1-8FFB-4AD6F530B664" id="m1">
1 Get <span class="box">Latitude</span> of Locations <span class="box"><span class="var"><b>[Shortcut Input]</b></span></span> » <span class="magic" onclick="magictap(3)">3</span></button>
<button class="gGreen" data-uuid="44874F5E-D218-4A42-ABAA-6B14049B1ABB" id="m2">
2 Get <span class="box">Longitude</span> of Locations <span class="box"><span class="var"><b>[Shortcut Input]</b></span></span> »</button>
<hr><button class="button gYellow" data-uuid="20D5FE65-5ADC-412A-916F-7539DDAB22EF" id="m3">
3 Text »</button>
<div class="content">
<div class="col2"><span class="var"><b>[2 Longitude]</b></span>,<span class="magic" onclick="magictap(1)"><b>[1 Latitude]</b></span></div></div>
<hr><button class="gBlue" data-uuid="CC980954-FC42-4F6B-B34A-02EBFA5A5991" id="m4">
4 URL <span class="box">https://app.roadstr.io/custom?screen=map&amp;location=<span class="var"><b>[3 Text]</b></span></span> <b> ➔ roadstrurl</b> » <i>5</i> <span class="magic" onclick="magictap(6)">6</span></button>
<hr><button class="gBlue" data-uuid="B167ABF9-0E8C-419F-85BC-4AAA0BBED5DE" id="m5">
5 Open URL <span class="box"><span class="var"><b>[4 roadstrurl]</b></span></span></button>
<button class="gBlue" data-uuid="CA0D7F06-B5FC-4334-93A3-9FD4AE1BF82A" id="m6">
6 Copy <span class="box"><span class="magic" onclick="magictap(4)"><b>[4 roadstrurl]</b></span></span> to Clipboard</button>
<script>
for (b of document.getElementsByClassName('button')) {
b.addEventListener('click', function() {
this.classList.toggle('closed');
let s = this.nextElementSibling;
s.style.display = getComputedStyle(s).display==='none' ? 'block' : 'none';
})}

function magictap(id) {
event.stopPropagation();
let e = document.getElementById('m'+id);
let p = e;
while ((p = p.parentNode).tagName.toLowerCase() === 'div') {
p.style.display = 'block';
p.previousElementSibling.classList.remove('closed');
}
setTimeout(function(){ e.scrollIntoView({block:'nearest',behavior:'smooth'}); }, 10);
}
</script></body></html>
127 changes: 127 additions & 0 deletions shortcuts/source/OpeninRoadStr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"WFWorkflowMinimumClientVersionString": "900",
"WFWorkflowMinimumClientVersion": 900,
"WFWorkflowIcon": {
"WFWorkflowIconStartColor": 255,
"WFWorkflowIconGlyphNumber": 61444
},
"WFWorkflowClientVersion": "2038.0.1.10",
"WFWorkflowOutputContentItemClasses": [],
"WFWorkflowHasOutputFallback": false,
"WFWorkflowActions": [
{
"WFWorkflowActionIdentifier": "is.workflow.actions.comment",
"WFWorkflowActionParameters": {
"WFCommentActionText": "Open an Apple Maps location in RoadStr from the share sheet.\n\nGitHub Issue: https://github.com/extratone/i/issues/311\n\n𝗠𝘆 𝗰𝗼𝗻𝘁𝗮𝗰𝘁 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:\nEmail: [email protected]\nContact card: https://davidblue.wtf/db.vcf\nMastodon: https://mastodon.social/@DavidBlue\nRoutineHub Profile: https://routinehub.co/user/blue\nGitHub: https://github.com/extratone\niOS-specific Repository: https://github.com/extratone/i\nTelegram: https://t.me/DavidBlue\nTelegram Channel: https://t.me/extratone\nDiscord: https://davidblue.wtf/discord\nTwitter: https://twitter.com/NeoYokel\nReddit: https://reddit.com/u/asphaltapostle\nEVERYWHERE: https://davidblue.wtf/socialdrop"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.properties.locations",
"WFWorkflowActionParameters": {
"WFInput": {
"Value": {
"Type": "ExtensionInput"
},
"WFSerializationType": "WFTextTokenAttachment"
},
"WFContentItemPropertyName": "Latitude",
"UUID": "CAF42636-AAF4-49B1-8FFB-4AD6F530B664"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.properties.locations",
"WFWorkflowActionParameters": {
"WFInput": {
"Value": {
"Type": "ExtensionInput"
},
"WFSerializationType": "WFTextTokenAttachment"
},
"WFContentItemPropertyName": "Longitude",
"UUID": "44874F5E-D218-4A42-ABAA-6B14049B1ABB"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.gettext",
"WFWorkflowActionParameters": {
"WFTextActionText": {
"Value": {
"string": "\uFFFC,\uFFFC",
"attachmentsByRange": {
"{2, 1}": {
"OutputUUID": "CAF42636-AAF4-49B1-8FFB-4AD6F530B664",
"Type": "ActionOutput",
"OutputName": "Latitude"
},
"{0, 1}": {
"OutputUUID": "44874F5E-D218-4A42-ABAA-6B14049B1ABB",
"Type": "ActionOutput",
"OutputName": "Longitude"
}
}
},
"WFSerializationType": "WFTextTokenString"
},
"UUID": "20D5FE65-5ADC-412A-916F-7539DDAB22EF"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.url",
"WFWorkflowActionParameters": {
"CustomOutputName": "roadstrurl",
"WFURLActionURL": {
"Value": {
"string": "https://app.roadstr.io/custom?screen=map&location=\uFFFC",
"attachmentsByRange": {
"{50, 1}": {
"OutputUUID": "20D5FE65-5ADC-412A-916F-7539DDAB22EF",
"Type": "ActionOutput",
"OutputName": "Text"
}
}
},
"WFSerializationType": "WFTextTokenString"
},
"UUID": "CC980954-FC42-4F6B-B34A-02EBFA5A5991"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.openurl",
"WFWorkflowActionParameters": {
"WFInput": {
"Value": {
"OutputUUID": "CC980954-FC42-4F6B-B34A-02EBFA5A5991",
"Type": "ActionOutput",
"OutputName": "roadstrurl"
},
"WFSerializationType": "WFTextTokenAttachment"
},
"UUID": "B167ABF9-0E8C-419F-85BC-4AAA0BBED5DE"
}
},
{
"WFWorkflowActionIdentifier": "is.workflow.actions.setclipboard",
"WFWorkflowActionParameters": {
"WFInput": {
"Value": {
"OutputUUID": "CC980954-FC42-4F6B-B34A-02EBFA5A5991",
"Type": "ActionOutput",
"OutputName": "roadstrurl"
},
"WFSerializationType": "WFTextTokenAttachment"
},
"UUID": "CA0D7F06-B5FC-4334-93A3-9FD4AE1BF82A"
}
}
],
"WFWorkflowInputContentItemClasses": [
"WFLocationContentItem"
],
"WFWorkflowImportQuestions": [],
"WFWorkflowTypes": [
"ActionExtension",
"Watch"
],
"WFQuickActionSurfaces": [],
"WFWorkflowHasShortcutInputVariables": true
}
Loading

0 comments on commit 6e61536

Please sign in to comment.