------------------------------------------------------------
commit 042b8a27e27f36bfbcc3b43cc61d113bd5b7a952
Author: ffff:12.51.221.141 <ffff:12.51.221.141@wifind.hub.scroll.pub> Date: Tue Oct 8 17:19:20 2024 +0000 Updated table.scroll diff --git a/table.scroll b/table.scroll index 6ed0790..351b7cc 100644 --- a/table.scroll +++ b/table.scroll @@ -1,20 +1,3 @@ -title WiFind - -header.scroll -container 960px - -data.csv - select name download upload tester lat long - orderBy -download - compose nameLink https://www.openstreetmap.org/?mlat={lat}&mlon={long}#map=19/{lat}/{long} - rank - select rank name nameLink download upload tester - printTable - -tableSearch - -expander Full table -data.csv - printTable - -footer.scroll +buildHtml + +redirectTo https://wifinder.wiki ------------------------------------------------------------
commit 19b83223e3344b17b0c89255c6125f91cc7d747a
Author: ffff:12.51.221.141 <ffff:12.51.221.141@wifind.hub.scroll.pub> Date: Tue Oct 8 17:19:18 2024 +0000 Updated test.scroll diff --git a/test.scroll b/test.scroll index 8185215..351b7cc 100644 --- a/test.scroll +++ b/test.scroll @@ -1,13 +1,3 @@ -title WiFind - Add test - -header.scroll -container 600px -data.parsers - -// expander Add test -scrollForm breck7+coffeetest@gmail.com,matt@coffeetest.net Submit - -// classicForm breck7+coffeetest@gmail.com,matt@coffeetest.net Submit - -test.js -footer.scroll +buildHtml + +redirectTo https://wifinder.wiki ------------------------------------------------------------
commit 983e1d13abcb1b8505e85229816e246c340a8d2e
Author: ffff:12.51.221.141 <ffff:12.51.221.141@wifind.hub.scroll.pub> Date: Tue Oct 8 17:19:13 2024 +0000 Updated leaderboard.scroll diff --git a/leaderboard.scroll b/leaderboard.scroll index 83dab0b..351b7cc 100644 --- a/leaderboard.scroll +++ b/leaderboard.scroll @@ -1,20 +1,3 @@ -title WiFind Leaderboard - -header.scroll -container 500px - -# Most Tests - -data.csv - groupBy tester - orderBy -count - printTable - -# Fastest Finds -data.csv - orderBy -download - select name download tester - limit 0 3 - printTable - -footer.scroll +buildHtml + +redirectTo https://wifinder.wiki ------------------------------------------------------------
commit 8dcd145c6fd21bbb95479450e25b17e53ed0bf9c
Author: ffff:12.51.221.141 <ffff:12.51.221.141@wifind.hub.scroll.pub> Date: Tue Oct 8 17:19:09 2024 +0000 Updated about.scroll diff --git a/about.scroll b/about.scroll index 54ec957..351b7cc 100644 --- a/about.scroll +++ b/about.scroll @@ -1,17 +1,3 @@ -title About WiFind - -header.scroll -container 500px - -WiFind was created by two frequent travellers over our shared love for cafes with great wifi. - -Wifi was invented in Hawai'i so it is fitting that WiFind was created in Hawai'i too. - https://pldb.io/concepts/alohanet.html invented in Hawai'i - -WiFind is a joint creation of Cowork Coffee founder Matt Eeles and Scroll founder Breck Yunits. - https://coworkcoffee.com/ Cowork Coffee - https://www.linkedin.com/in/mattheweeles/ Matt Eeles - https://scroll.pub/ Scroll - https://twitter.com/breckyunits Breck Yunits - -footer.scroll +buildHtml + +redirectTo https://wifinder.wiki ------------------------------------------------------------
commit 8871b2edab48756c60d10da2d5793bd40994ada4
Author: ffff:12.51.221.141 <ffff:12.51.221.141@wifind.hub.scroll.pub> Date: Tue Oct 8 17:19:06 2024 +0000 Updated header.scroll diff --git a/header.scroll b/header.scroll index 81be7c4..351b7cc 100644 --- a/header.scroll +++ b/header.scroll @@ -1,19 +1,3 @@ buildHtml -favicon favicon.png -openGraphImage og.png -homeButton -metaTags -theme gazette -css - html { - font-family: "SF Pro", "Helvetica Neue", "Segoe UI", "Arial"; - font-size: var(--base-font-size, 18px); - } - a { - color: rgba(59,86,93,0.8); - } - -printTitle -coworkButton.scroll -links.scroll +redirectTo https://wifinder.wiki ------------------------------------------------------------
commit 2e9863ddc19eb732b0cb45f1255055013f8a2641
Author: ffff:173.164.135.253 <ffff:173.164.135.253@wifind.hub.scroll.pub> Date: Tue Oct 8 15:28:20 2024 +0000 Updated data.scroll diff --git a/data.scroll b/data.scroll index 3ec791d..eb34e66 100644 --- a/data.scroll +++ b/data.scroll @@ -1,257 +1,257 @@ -buildConcepts data.json data.csv data.tsv - -data.parsers - -// Put new tests up top - -name Peet's -lat 37.6015452 -long -122.3928027 -download 17 -upload 3 -tester breck - -name Safeway -lat 37.60355571085978 -long -122.39499105794175 -download 27 -upload 2 -tester breck - -name SFO -lat 37.61699311093693 -long -122.38389250079841 -download 201 -upload 157 -tester breck - -name LAX Wifi -lat 33.94659545528131 -long -118.40421163318656 -download 29 -upload 83 -tester breck - -name Delta Sky Club -lat 33.9454098 -long -118.4055553 -download 98 -upload 103 -tester breck - -name HNL Free Wifi -lat 21.329383 -long -157.9237374 -download 93 -upload 13 -tester breck - -name Delta Sky Club -lat 21.3316334 -long -157.9185754 -download 44 -upload 28 -tester breck - -name McDonald's -lat 21.285187 -long -157.708062 -download 175 -upload 70 -tester breck - -name Island Brew Coffeehouse -lat 21.284062 -long -157.707187 -download 94 -upload 20 -tester breck - -name Hawaiʻi Kai Towne Center -lat 21.283213 -long -157.711078 -download 23 -upload 4 -tester breck - -name Starbucks -lat 21.283313 -long -157.710797 -download 12 -upload 3 -tester breck - -name Island Brew Coffeehouse -lat 21.2936287 -long -157.8526952 -download 230 -upload 3 -tester breck - -name Our Kaka'ako -lat 21.2980939 -long -157.8622883 -download 95 -upload 37 -tester kevinlim - -name Morning Brew - Kaka'ako -lat 21.297688 -long -157.860448 -download 79 -upload 73 -tester kevinlim - -name Box Jelly -lat 21.2928312 -long -157.8519111 -download 70 -upload 24 -tester breck - -name Ward Village -lat 21.291979382020900 -long -157.85041345172600 -download 25 -upload 4 -tester breck - -name Wholefoods -lat 21.2946436 -long -157.8524053 -download 79 -upload 10 -tester breck - -name Hiking Hawaii Cafe -lat 21.285504409523900 -long -157.83446110838800 -download 160 -upload 17 -tester matt - -name Sheraton Waikiki -lat 21.2768656 -long -157.8303232 -download 98 -upload 95 -tester matt - -name McDonald's -lat 21.2853928 -long -157.8379656 -download 13 -upload 10 -tester breck - -name Starbucks -lat 21.2777786 -long -157.833186 -download 9 -upload 4 -tester breck - -name Coconut Waikiki Hotel -lat 21.28268755 -long -157.8275950103480 -download 26 -upload 4 -tester breck - -name McDonald's -lat 21.276131312101300 -long -157.8257973665040 -download 57 -upload 96 -tester breck - -name McDonald's -lat 21.28046355 -long -157.82762611968200 -download 17 -upload 1 -tester breck - -name Starbucks -lat 21.2796028 -long -157.8266621 -download 11 -upload 4 -tester breck - -name Hula Grill Waikiki -lat 21.27715 -long -157.8276707 -download 23 -upload 4 -tester breck - -name Stay Hotel Waikiki -lat 21.276332500000000 -long -157.82445297298300 -download 3 -upload 2 -tester breck - -name Kai Coffee @ Hyatt Regency -lat 21.276067000000000 -long -157.82509011592000 -download 14 -upload 9 -tester breck - -name McDonald's -lat 21.2746455 -long -157.8242588 -download 237 -upload 96 -tester breck - -name Starbucks -lat 21.2719973 -long -157.82240798207800 -download 13 -upload 2 -tester breck - -name Aloh Cafe -lat 21.280457 -long -157.82671250000000 -download 60 -upload 32 -tester matt - -name The Beach Waikiki Hostel -lat 21.27230241748230 -long -157.82105363104400 -download 12 -upload 4 -tester matt - -name Marriott Courtyard Waikiki Beach -lat 21.28155615 -long -157.82727085 -download 30 -upload 31 -tester matt - -name Marriott Renaissance Honolulu Hotel & Spa -lat 21.293756538904200 -long -157.8437846834390 -download 19 -upload 17 -tester matt - -name Marriott Vacation Club -lat 21.328941 -long -158.118743 -download 14 -upload 13 -tester matt - -name Seaside Hawaiian Hostel -lat 21.280769222222200 -long -157.82641055555600 -download 61 -upload 35 -tester matt +buildConcepts data.json data.csv data.tsv + +data.parsers + +// Put new tests up top + +name Peet's +lat 37.6015452 +long -122.3928027 +download 17 +upload 3 +tester breck + +name Safeway +lat 37.60355571085978 +long -122.39499105794175 +download 27 +upload 2 +tester breck + +name SFO +lat 37.61699311093693 +long -122.38389250079841 +download 201 +upload 157 +tester breck + +name LAX Wifi +lat 33.94659545528131 +long -118.40421163318656 +download 29 +upload 83 +tester breck + +name Delta Sky Club +lat 33.9454098 +long -118.4055553 +download 98 +upload 103 +tester breck + +name HNL Free Wifi +lat 21.329383 +long -157.9237374 +download 93 +upload 13 +tester breck + +name Delta Sky Club +lat 21.3316334 +long -157.9185754 +download 44 +upload 28 +tester breck + +name McDonald's +lat 21.285187 +long -157.708062 +download 175 +upload 70 +tester breck + +name Island Brew Coffeehouse +lat 21.284062 +long -157.707187 +download 94 +upload 20 +tester breck + +name Hawaiʻi Kai Towne Center +lat 21.283213 +long -157.711078 +download 23 +upload 4 +tester breck + +name Starbucks +lat 21.283313 +long -157.710797 +download 12 +upload 3 +tester breck + +name Island Brew Coffeehouse +lat 21.2936287 +long -157.8526952 +download 230 +upload 3 +tester breck + +name Our Kaka'ako +lat 21.2980939 +long -157.8622883 +download 95 +upload 37 +tester kevinlim + +name Morning Brew - Kaka'ako +lat 21.297688 +long -157.860448 +download 79 +upload 73 +tester kevinlim + +name Box Jelly +lat 21.2928312 +long -157.8519111 +download 70 +upload 24 +tester breck + +name Ward Village +lat 21.291979382020900 +long -157.85041345172600 +download 25 +upload 4 +tester breck + +name Wholefoods +lat 21.2946436 +long -157.8524053 +download 79 +upload 10 +tester breck + +name Hiking Hawaii Cafe +lat 21.285504409523900 +long -157.83446110838800 +download 160 +upload 17 +tester matt + +name Sheraton Waikiki +lat 21.2768656 +long -157.8303232 +download 98 +upload 95 +tester matt + +name McDonald's +lat 21.2853928 +long -157.8379656 +download 13 +upload 10 +tester breck + +name Starbucks +lat 21.2777786 +long -157.833186 +download 9 +upload 4 +tester breck + +name Coconut Waikiki Hotel +lat 21.28268755 +long -157.8275950103480 +download 26 +upload 4 +tester breck + +name McDonald's +lat 21.276131312101300 +long -157.8257973665040 +download 57 +upload 96 +tester breck + +name McDonald's +lat 21.28046355 +long -157.82762611968200 +download 17 +upload 1 +tester breck + +name Starbucks +lat 21.2796028 +long -157.8266621 +download 11 +upload 4 +tester breck + +name Hula Grill Waikiki +lat 21.27715 +long -157.8276707 +download 23 +upload 4 +tester breck + +name Stay Hotel Waikiki +lat 21.276332500000000 +long -157.82445297298300 +download 3 +upload 2 +tester breck + +name Kai Coffee @ Hyatt Regency +lat 21.276067000000000 +long -157.82509011592000 +download 14 +upload 9 +tester breck + +name McDonald's +lat 21.2746455 +long -157.8242588 +download 237 +upload 96 +tester breck + +name Starbucks +lat 21.2719973 +long -157.82240798207800 +download 13 +upload 2 +tester breck + +name Aloh Cafe +lat 21.280457 +long -157.82671250000000 +download 60 +upload 32 +tester matt + +name The Beach Waikiki Hostel +lat 21.27230241748230 +long -157.82105363104400 +download 12 +upload 4 +tester matt + +name Marriott Courtyard Waikiki Beach +lat 21.28155615 +long -157.82727085 +download 30 +upload 31 +tester matt + +name Marriott Renaissance Honolulu Hotel & Spa +lat 21.293756538904200 +long -157.8437846834390 +download 19 +upload 17 +tester matt + +name Marriott Vacation Club +lat 21.328941 +long -158.118743 +download 14 +upload 13 +tester matt + +name Seaside Hawaiian Hostel +lat 21.280769222222200 +long -157.82641055555600 +download 61 +upload 35 +tester matt ------------------------------------------------------------
commit 940e3e3c23203dd0ed679bd9018badcab00a4efd
Author: root <root@hub.scroll.pub> Date: Tue Oct 8 15:27:38 2024 +0000 a diff --git a/map.scroll b/map.scroll index f84a00a..33ef508 100644 --- a/map.scroll +++ b/map.scroll @@ -1,3 +1,4 @@ buildHtml + map -// Hack to get map files until scroll fix \ No newline at end of file +// Hack to get map files until scroll fix diff --git a/test.html b/test.html index 6028d84..3bc6c7b 100644 --- a/test.html +++ b/test.html @@ -1,96 +1,613 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Location and WiFi Speed</title> - <style> - body { - font-family: Arial, sans-serif; - text-align: center; - margin-top: 50px; - } - .info { - margin-bottom: 20px; - } - </style> -</head> -<body> - - <h1>Current Location and WiFi Speed</h1> - - <div class="info"> - <h2>Your Location</h2> - <p>Latitude: <span id="latitude">Loading...</span></p> - <p>Longitude: <span id="longitude">Loading...</span></p> - </div> - - <div class="info"> - <h2>WiFi Speed Test</h2> - <p>Download Speed: <span id="downloadSpeed">Testing...</span></p> - <p>Upload Speed: <span id="uploadSpeed">Testing...</span></p> - </div> - - <script> - // Geolocation API to get the current location - function getLocation() { - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(showPosition); - } else { - alert("Geolocation is not supported by this browser."); - } - } - - function showPosition(position) { - document.getElementById('latitude').textContent = position.coords.latitude; - document.getElementById('longitude').textContent = position.coords.longitude; - } - - // Function to calculate download and upload speed - function speedTest() { - const downloadUrl = "https://pldb.io/pldb.json?r=" + Math.random(); // A sample file to test download speed - const uploadUrl = "https://pldb.io/pldb.json"; // A dummy API to test upload speed - - // Test download speed - const startTimeDownload = new Date().getTime(); - fetch(downloadUrl) - .then(response => response.blob()) - .then(() => { - const endTimeDownload = new Date().getTime(); - const durationDownload = (endTimeDownload - startTimeDownload) / 1000; // in seconds - const fileSizeInMB = 100; // the size of the test file in MB - const downloadSpeed = (fileSizeInMB / durationDownload).toFixed(2); // in MB/s - document.getElementById('downloadSpeed').textContent = downloadSpeed + ' MB/s'; - }) - .catch(() => { - document.getElementById('downloadSpeed').textContent = 'Error'; - }); - - // Test upload speed - const startTimeUpload = new Date().getTime(); - const data = new Blob(["Test Data"], { type: "text/plain" }); - fetch(uploadUrl, { - method: "POST", - body: data - }) - .then(response => response.json()) - .then(() => { - const endTimeUpload = new Date().getTime(); - const durationUpload = (endTimeUpload - startTimeUpload) / 1000; // in seconds - const uploadSizeInMB = 0.0001; // an approximation of the upload size - const uploadSpeed = (uploadSizeInMB / durationUpload).toFixed(2); // in MB/s - document.getElementById('uploadSpeed').textContent = uploadSpeed + ' MB/s'; - }) - .catch(() => { - document.getElementById('uploadSpeed').textContent = 'Error'; - }); - } - - // Call the functions on page load - window.onload = function() { - getLocation(); - speedTest(); - }; - </script> -</body> -</html> +<!DOCTYPE html> +<html lang="en"> +<style>.abstractIconButtonParser {position:absolute;top:0.25rem; }.abstractIconButtonParser svg {fill: rgba(204,204,204,.8);width:1.875rem;height:1.875rem; padding: 0 7px;} .abstractIconButtonParser:hover svg{fill: #333;}</style><a href="index.html" class="doNotPrint abstractIconButtonParser" style="left:2rem;"><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.7166 3.79541C12.2835 3.49716 11.7165 3.49716 11.2834 3.79541L4.14336 8.7121C3.81027 8.94146 3.60747 9.31108 3.59247 9.70797C3.54064 11.0799 3.4857 13.4824 3.63658 15.1877C3.7504 16.4742 4.05336 18.1747 4.29944 19.4256C4.41371 20.0066 4.91937 20.4284 5.52037 20.4284H8.84433C8.98594 20.4284 9.10074 20.3111 9.10074 20.1665V15.9754C9.10074 14.9627 9.90433 14.1417 10.8956 14.1417H13.4091C14.4004 14.1417 15.204 14.9627 15.204 15.9754V20.1665C15.204 20.3111 15.3188 20.4284 15.4604 20.4284H18.4796C19.0806 20.4284 19.5863 20.0066 19.7006 19.4256C19.9466 18.1747 20.2496 16.4742 20.3634 15.1877C20.5143 13.4824 20.4594 11.0799 20.4075 9.70797C20.3925 9.31108 20.1897 8.94146 19.8566 8.7121L12.7166 3.79541ZM10.4235 2.49217C11.3764 1.83602 12.6236 1.83602 13.5765 2.49217L20.7165 7.40886C21.4457 7.91098 21.9104 8.73651 21.9448 9.64736C21.9966 11.0178 22.0564 13.5119 21.8956 15.3292C21.7738 16.7067 21.4561 18.4786 21.2089 19.7353C20.9461 21.0711 19.7924 22.0001 18.4796 22.0001H15.4604C14.4691 22.0001 13.6655 21.1791 13.6655 20.1665V15.9754C13.6655 15.8307 13.5507 15.7134 13.4091 15.7134H10.8956C10.754 15.7134 10.6392 15.8307 10.6392 15.9754V20.1665C10.6392 21.1791 9.83561 22.0001 8.84433 22.0001H5.52037C4.20761 22.0001 3.05389 21.0711 2.79113 19.7353C2.54392 18.4786 2.22624 16.7067 2.10437 15.3292C1.94358 13.5119 2.00338 11.0178 2.05515 9.64736C2.08957 8.73652 2.55427 7.91098 3.28346 7.40886L10.4235 2.49217Z"/></svg></a> +<head> + <meta charset="utf-8"> + <title>WiFind - Add test</title> + <script>/* This HTML was generated by 📜 Scroll v137.3.0. https://scroll.pub */</script> + <style>@media print {.doNotPrint {display: none !important;}}</style> + <link rel="canonical" href="/test.html"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <meta name="description" content="Test nbsp;nbsp; Submit nbsp;nbsp; Table nbsp;nbsp; Leaderboard nbsp;nbsp; About nbsp;nbsp;"> + <meta name="generator" content="Scroll v137.3.0"> + <meta property="og:title" content="WiFind - Add test"> + <meta property="og:description" content="Test nbsp;nbsp; Submit nbsp;nbsp; Table nbsp;nbsp; Leaderboard nbsp;nbsp; About nbsp;nbsp;"> + <meta property="og:image" content="/og.png"> + <link rel="icon" href="favicon.png"> + <link rel="source" type="application/git" title="Source Code Repository" href="test.scroll"> + + <meta name="twitter:card" content="summary_large_image"> +</head> +<body> +<link rel="stylesheet" type="text/css" href="gazette.css"> +<style>html { +font-family: "SF Pro", "Helvetica Neue", "Segoe UI", "Arial"; +font-size: var(--base-font-size, 18px); +} +a { +color: rgba(59,86,93,0.8); +}</style> +<div class="scrollSection"><h1 class="scrollTitle"><a href="test.html">WiFind - Add test</a></h1> +<center><p class="scrollParagraph"></p> +<figure class="scrollCaptionedFigure" style="width:200pxpx; margin: auto;"><a href="https://coworkcoffee.com/" target="_blank" ><img src="cowork.png" width="200px" height="undefined" loading="lazy"></a></figure> +</div></center> +<div class="scrollSection"><h2 class="scrollParagraph"><a href="test.html">Test</a> &nbsp;&nbsp; <a href="/edit.html?folderName=wifind.hub.scroll.pub&fileName=data.scroll">Submit</a> &nbsp;&nbsp; <a href="table.html">Table</a> &nbsp;&nbsp; <a href="leaderboard.html">Leaderboard</a> &nbsp;&nbsp; <a href="about.html">About</a> &nbsp;&nbsp; <a href="data.json">JSON</a></h2> +</div> +<div style="width: 100%; box-sizing: border-box; max-width: 600px; margin: 0 auto;" class="scrollContainerParser"> +<link rel="stylesheet" href="codeMirror.css"> +<script src="scrollLibs.js"></script> + +<script> +sendFormViaEmail = form => { + const mailto = new URL("mailto:") + const params = [] + const { value, title } = form.querySelector('button[type="submit"]') + params.push(`subject=${encodeURIComponent(value)}`) + params.push(`to=${encodeURIComponent(title)}`) + const oneTextarea = form.querySelector('textarea[title="oneTextarea"]') + const body = oneTextarea ? codeMirrorInstance.getValue() : Array.from(new FormData(form)).map(([name, value]) => `${name} ${value}`).join("\n") + params.push(`body=${encodeURIComponent(body)}`) + mailto.search = params.join("&") + window.open(mailto.href, '_blank') +} +</script><style> .scrollFormParser { + font-family: "Gill Sans", "Bitstream Vera Sans", sans-serif; + } +.scrollFormParser input , .scrollFormParser textarea{ +padding: 10px; +margin-bottom: 10px; +width: 100%; +box-sizing: border-box; +} .scrollFormParser label { + display: block; + margin-bottom: 5px; +} +</style><form onsubmit="sendFormViaEmail(this); return false;" class="scrollFormParser"><textarea title="oneTextarea" rows="14" placeholder="See example below..." id="scroll" name="scroll"></textarea> + <script id="scrollParsers" type="text/plain">// Basic atom types +blankAtom +anyAtom + +// Enum atom types +enumAtom + paint constant.language +booleanAtom + enum true false + extends enumAtom + +// String atom types +stringAtom + paint string + +atomAtom + paint string + description A non-empty single atom string. + regex .+ + +columnNameAtom + extends stringAtom + +semanticVersionAtom + paint string + description A 3 part sem version string like 1.2.1 + +// Date atom types +dateAtom + paint string + +// Numeric atom types +numberAtom + paint constant.numeric +integerAtom + extends numberAtom + paint constant.numeric.integer +floatAtom + extends numberAtom + paint constant.numeric.float +percentAtom + paint constant.numeric.float + extends stringAtom + // todo: this currently extends from stringAtom b/c scrollsdk needs to be fixed. seems like if extending from number then the hard coded number typescript regex takes precedence over a custom regex +countAtom + extends integerAtom +yearAtom + extends integerAtom + +// Scroll atom types +cueAtom + description A atom that indicates a certain parser to use. + paint keyword + +preBuildCommandAtom + extends cueAtom + description Give build command atoms their own color. + paint constant.character.escape + +commentAtom + paint comment + +delimiterAtom + description String to use as a delimiter. + paint string + +codeAtom + paint comment + +bulletPointAtom + description Any token used as a bullet point such as "-" or "1." or ">" + paint keyword + +comparisonAtom + enum < > <= >= = != includes doesNotInclude empty notEmpty + paint constant + +personNameAtom + extends stringAtom + +// Link atom types +urlAtom + paint constant.language +absoluteUrlAtom + paint constant.language + regex (ftp|https?)://.+ + +emailAddressAtom + extends stringAtom + +// File system atom types +permalinkAtom + paint string + description A string that doesn't contain characters that might interfere with most filesystems. No slashes, for instance. + +filePathAtom + extends stringAtom + +// HTML atom types +tagOrUrlAtom + description An HTML tag or a url. + paint constant.language + +htmlAttributesAtom + paint comment + +htmlTagAtom + paint constant.language + enum div span p a img ul ol li h1 h2 h3 h4 h5 h6 header nav section article aside main footer input button form label select option textarea table tr td th tbody thead tfoot br hr meta link script style title code + +classNameAtom + paint constant + +htmlIdAtom + extends anyAtom + + +abstractScrollParser + atoms cueAtom + javascript + compileEmbeddedVersion(compileSettings) { + return this.compile(compileSettings) + } + compileTxt() { + return "" + } + getHtmlRequirements(compileSettings) { + const {requireOnce} = this + if (!requireOnce) + return "" + const set = compileSettings?.alreadyRequired || this.root.alreadyRequired + if (set.has(requireOnce)) + return "" + + set.add(requireOnce) + return requireOnce + "\n\n" + } + +abstractScrollWithRequirementsParser + extends abstractScrollParser + cruxFromId + javascript + compile(compileSettings) { + return this.getHtmlRequirements(compileSettings) + this.compileInstance() + } + +metaCommandAtom + extends cueAtom + description Give meta command atoms their own color. + paint constant.numeric + // Obviously this is not numeric. But I like the green color for now. + We need a better design to replace this "paint" concept + https://github.com/breck7/scrollsdk/issues/186 + +abstractTopLevelSingleMetaParser + description Use these parsers once per file. + extends abstractScrollParser + inScope slashCommentParser + cruxFromId + atoms metaCommandAtom + javascript + isTopMatter = true + isSetterParser = true + compile() { + return "" + } + +scrollParser + extensions scroll + description Scroll is a language for scientists of all ages. Refine, share and collaborate on ideas. + root + inScope abstractScrollParser blankLineParser + catchAllParser errorParser + compilesTo html + javascript + setFile(file) { + this.file = file + return this + } + compile(compileSettings) { + this.sectionStack = [] + return this.map(subparticle => subparticle.compile(compileSettings)).filter(i => i).join("\n") + this.clearSectionStack() + } + sectionStack = [] + clearSectionStack() { + const result = this.sectionStack.join("") + this.sectionStack = [] + return result + } + bodyStack = [] + clearBodyStack() { + const result = this.bodyStack.join("") + this.bodyStack = [] + return result + } + get hakonParser() { + if (this.isNodeJs()) + return require("scrollsdk/products/hakon.nodejs.js") + return hakonParser + } + readSyncFromFileOrUrl(fileOrUrl) { + if (!this.isNodeJs()) return localStorage.getItem(fileOrUrl) || "" + const isUrl = fileOrUrl.match(/^https?\:[^ ]+$/) + if (!isUrl) return this.root.readFile(fileOrUrl) + return this.readFile(this.makeFullPath(new URL(fileOrUrl).pathname.split('/').pop())) + } + async fetch(url, filename) { + const isUrl = url.match(/^https?\:[^ ]+$/) + if (!isUrl) return + return this.isNodeJs() ? this.fetchNode(url, filename) : this.fetchBrowser(url) + } + makeFullPath(filename) { + return require("path").join(this.file.folderPath, filename) + } + async fetchNode(url, filename) { + filename = filename || new URL(url).pathname.split('/').pop() + const fullpath = this.makeFullPath(filename) + if (require("fs").existsSync(fullpath)) return this.readFile(fullpath) + return this.downloadToDisk(url, fullpath) + } + async fetchBrowser(url) { + const content = localStorage.getItem(url) + if (content) return content + return this.downloadToLocalStorage(url) + } + async downloadToDisk(url, destination) { + const { writeFile } = require('fs').promises + const response = await fetch(url) + const fileBuffer = await response.arrayBuffer() + await writeFile(destination, Buffer.from(fileBuffer)) + return this.readFile(destination) + } + async downloadToLocalStorage(url) { + const response = await fetch(url) + const blob = await response.blob() + localStorage.setItem(url, await blob.text()) + return localStorage.getItem(url) + } + readFile(filename) { + const path = require("path") + const fs = require("fs") + const fullPath = path.join(this.file.folderPath, filename) + if (fs.existsSync(fullPath)) + return fs.readFileSync(fullPath, "utf8") + console.error(`File '${filename}' not found`) + return "" + } + alreadyRequired = new Set() + compileEmbeddedVersion(compileSettings) { + this.sectionStack = [] + return this.map(subparticle => (subparticle.compileEmbeddedVersion ? subparticle.compileEmbeddedVersion(compileSettings) : subparticle.compile(compileSettings))) + .filter(i => i) + .join("\n") + .trim() + this.clearSectionStack() + } + get footnotes() { + if (this._footnotes === undefined) this._footnotes = this.filter(particle => particle.isFootnote) + return this._footnotes + } + async build() { + await Promise.all(this.filter(particle => particle.build).map(async particle => particle.build())) + } + file = {} + get title() { + return this.file.title || this.get("title") + } + get permalink() { + return this.get("permalink") || this.file.permalink || "" + } + example + # Hello world + ## This is Scroll + * It compiles to HTML. + + code + // You can add code as well. + print("Hello world") + +abstractUrlSettingParser + extends abstractTopLevelSingleMetaParser + atoms metaCommandAtom urlAtom + cruxFromId + + +buildCommandAtom + extends cueAtom + description Give build command atoms their own color. + paint constant + +abstractBuildCommandParser + extends abstractScrollParser + cruxFromId + atoms buildCommandAtom + catchAllAtomType filePathAtom + inScope slashCommentParser + javascript + isTopMatter = true + compile() { + return "" + } + +commentLineParser + catchAllAtomType commentAtom + +abstractCommentParser + description Prints nothing. + catchAllAtomType commentAtom + atoms commentAtom + extends abstractScrollParser + baseParser blobParser + javascript + compile() { + return `` + } + catchAllParser commentLineParser + +commentParser + popularity 0.000193 + extends abstractCommentParser + cruxFromId + boolean suggestInAutocomplete false + +slashCommentParser + popularity 0.005643 + extends commentParser + crux // + boolean isPopular true + description A comment. Prints nothing. + boolean suggestInAutocomplete false + +blankLineParser + popularity 0.308149 + description Print nothing. Break section. + atoms blankAtom + boolean isPopular true + javascript + compile() { + return this.parent.clearSectionStack() + } + pattern ^$ + tags doNotSynthesize + +measureNameAtom + extends cueAtom + // A regex for column names for max compatibility with a broad range of data science tools: + regex [a-zA-Z][a-zA-Z0-9]* + +buildMeasuresParser + popularity 0.000024 + cruxFromId + description Write measures to csv+ files. + extends abstractBuildCommandParser + sortByParser + cruxFromId + atoms cueAtom anyAtom + boolean suggestInAutocomplete false + +// The main measure parser. All measures should extend from this. +abstractMeasureParser + atoms measureNameAtom + cruxFromId + boolean isMeasure true + float sortIndex 1.9 + boolean isComputed false + string typeForWebForms text + extends abstractScrollParser + javascript + compileEmbeddedVersion() { + return "" + } + compile() { + return "" + } + get measureValue() { + return this.content ?? "" + } + get measureName() { + return this.getFirstAtomPath().replace(/ /g, "_") + } + +// String Measures +abstractAtomMeasureParser + description A measure that contains a single atom. + atoms measureNameAtom atomAtom + extends abstractMeasureParser + +abstractStringMeasureParser + catchAllAtomType stringAtom + extends abstractMeasureParser + +abstractTextareaMeasureParser + string typeForWebForms textarea + extends abstractMeasureParser + baseParser blobParser + javascript + get measureValue() { + return this.subparticlesToString().replace(/\n/g, "\\n") + } + +abstractEmailMeasureParser + string typeForWebForms email + atoms measureNameAtom emailAddressAtom + extends abstractAtomMeasureParser + +// URL Parsers +abstractUrlMeasureParser + string typeForWebForms url + atoms measureNameAtom urlAtom + extends abstractAtomMeasureParser + +// Required ID measure which denotes a concept +abstractIdParser + crux id + description What is the ID of this concept? + extends abstractStringMeasureParser + float sortIndex 1 + boolean isMeasureRequired true + boolean isConceptDelimiter true + javascript + getErrors() { + const errors = super.getErrors() + let requiredMeasureNames = this.parent.file.measures.filter(measure => measure.isMeasureRequired).map(measure => measure.Name).filter(name => name !== "id") + if (!requiredMeasureNames.length) return errors + let next = this.next + while (requiredMeasureNames.length && next.firstAtom !== "id" && next.getIndex() !== 0) { + requiredMeasureNames = requiredMeasureNames.filter(i => i !== next.firstAtom) + next = next.next + } + requiredMeasureNames.forEach(name => + errors.push(this.makeError(`Concept "${this.content}" is missing required measure "${name}".`)) + ) + return errors + } + +// Numeric Measures +abstractNumericMeasureParser + string typeForWebForms number + extends abstractMeasureParser + javascript + get measureValue() { + const {content} = this + return content === undefined ? "" : parseFloat(content) + } + +abstractIntegerMeasureParser + atoms measureNameAtom integerAtom + extends abstractNumericMeasureParser + +abstractFloatMeasureParser + atoms measureNameAtom floatAtom + extends abstractNumericMeasureParser + +abstractPercentageMeasureParser + atoms measureNameAtom percentAtom + extends abstractNumericMeasureParser + javascript + get measureValue() { + const {content} = this + return content === undefined ? "" : parseFloat(content) + } + +// Enum Measures +abstractEnumMeasureParser + atoms measureNameAtom enumAtom + extends abstractMeasureParser + +// Boolean Measures +abstractBooleanMeasureParser + atoms measureNameAtom booleanAtom + extends abstractMeasureParser + javascript + get measureValue() { + const {content} = this + return content === undefined ? "" : content == "true" + } + + +errorParser + baseParser errorParsertitle WiFind - Add test + +buildHtml +favicon favicon.png +openGraphImage og.png + +homeButton +metaTags +theme gazette +css + html { + font-family: "SF Pro", "Helvetica Neue", "Segoe UI", "Arial"; + font-size: var(--base-font-size, 18px); + } + a { + color: rgba(59,86,93,0.8); + } + +printTitle +center +cowork.png + width 200px + https://coworkcoffee.com/ + +## Test &nbsp;&nbsp; Submit &nbsp;&nbsp; Table &nbsp;&nbsp; Leaderboard &nbsp;&nbsp; About &nbsp;&nbsp; JSON + test.html Test + link /edit.html?folderName=wifind.hub.scroll.pub&fileName=data.scroll Submit + table.html Table + leaderboard.html Leaderboard + about.html About + link data.json JSON + + +container 600px + + +// expander Add test +scrollForm breck7+coffeetest@gmail.com,matt@coffeetest.net Submit + +// classicForm breck7+coffeetest@gmail.com,matt@coffeetest.net Submit + +test.js +**** + +br + +scrollVersionLink + +</script> + <script>{ + let {width, height} = document.getElementById('scroll').getBoundingClientRect(); + const scrollParser = new HandParsersProgram(document.getElementById("scrollParsers").textContent).compileAndReturnRootParser() + codeMirrorInstance = new ParsersCodeMirrorMode("custom", () => scrollParser, undefined, CodeMirror).register().fromTextAreaWithAutocomplete(document.getElementById("scroll"), { + lineWrapping: false, + lineNumbers: false + }) + codeMirrorInstance.setSize(width, height) }</script><button value="Submit" title="breck7+coffeetest@gmail.com,matt@coffeetest.net" class="scrollButton" type="submit">Submit via email</button><h3>Example form:</h3> + <pre>name +address +lat +long +download +upload +tester </pre></form> +<script src="test.js"></script> +<div class="dinkus"><span>⁂</span></div> +<br> +<div class="abstractTextLinkParser"><a href="https://scroll.pub">Built with Scroll v137.3.0</a></div></div> +</body> +</html> \ No newline at end of file diff --git a/add.scroll b/test.scroll similarity index 100% rename from add.scroll rename to test.scroll ------------------------------------------------------------
commit 73e737a515d79fe15f5a34da1c2de9b8dd565e5e
Author: Breck Yunits <breck7@gmail.com> Date: Tue Oct 8 08:25:59 2024 -0700 diff --git a/data.parsers b/data.parsers index c05bf4b..d7c3cd5 100644 --- a/data.parsers +++ b/data.parsers @@ -6,12 +6,6 @@ nameParser float sortIndex 1.001 boolean isMeasureRequired true -addressParser - description Where is it located? - extends abstractStringMeasureParser - float sortIndex 1.002 - boolean isMeasureRequired true - downloadParser description What is the download speed in Mbps? extends abstractIntegerMeasureParser diff --git a/data.scroll b/data.scroll index 59afacd..3ec791d 100644 --- a/data.scroll +++ b/data.scroll @@ -19,7 +19,6 @@ upload 2 tester breck name SFO -address SFO lat 37.61699311093693 long -122.38389250079841 download 201 @@ -27,7 +26,6 @@ upload 157 tester breck name LAX Wifi -address LAX lat 33.94659545528131 long -118.40421163318656 download 29 @@ -35,7 +33,6 @@ upload 83 tester breck name Delta Sky Club -address LAX lat 33.9454098 long -118.4055553 download 98 @@ -43,7 +40,6 @@ upload 103 tester breck name HNL Free Wifi -address HNL Airport lat 21.329383 long -157.9237374 download 93 @@ -51,7 +47,6 @@ upload 13 tester breck name Delta Sky Club -address Honolulu, HI 96819 lat 21.3316334 long -157.9185754 download 44 @@ -59,7 +54,6 @@ upload 28 tester breck name McDonald's -address 377 Keahole St, Honolulu, HI 96825 lat 21.285187 long -157.708062 download 175 @@ -67,7 +61,6 @@ upload 70 tester breck name Island Brew Coffeehouse -address 377 Keahole St, Honolulu, HI 96825 lat 21.284062 long -157.707187 download 94 @@ -75,7 +68,6 @@ upload 20 tester breck name Hawaiʻi Kai Towne Center -address 333 Keahole St, Honolulu, HI 96825 lat 21.283213 long -157.711078 download 23 @@ -83,7 +75,6 @@ upload 4 tester breck name Starbucks -address 377 Keahole St, Honolulu, HI 96825 lat 21.283313 long -157.710797 download 12 @@ -91,7 +82,6 @@ upload 3 tester breck name Island Brew Coffeehouse -address 1108 Auahi St, Honolulu, HI 96814 lat 21.2936287 long -157.8526952 download 230 @@ -99,7 +89,6 @@ upload 3 tester breck name Our Kaka'ako -address 660 Ala Moana Blvd, Suite #148 lat 21.2980939 long -157.8622883 download 95 @@ -107,7 +96,6 @@ upload 37 tester kevinlim name Morning Brew - Kaka'ako -address 685 Auahi St Ste 113, Honolulu, HI 96813 lat 21.297688 long -157.860448 download 79 @@ -115,7 +103,6 @@ upload 73 tester kevinlim name Box Jelly -address 1200 Ala Moana Blvd, Honolulu, HI 96814 lat 21.2928312 long -157.8519111 download 70 @@ -123,7 +110,6 @@ upload 24 tester breck name Ward Village -address 1240 Ala Moana Blvd #200, Honolulu, HI 96814 lat 21.291979382020900 long -157.85041345172600 download 25 @@ -131,7 +117,6 @@ upload 4 tester breck name Wholefoods -address 388 Kamakee St Street 100, Honolulu, HI 96814 lat 21.2946436 long -157.8524053 download 79 @@ -139,7 +124,6 @@ upload 10 tester breck name Hiking Hawaii Cafe -address 1956 Ala Moana Blvd, Honolulu, HI 96815 lat 21.285504409523900 long -157.83446110838800 download 160 @@ -147,7 +131,6 @@ upload 17 tester matt name Sheraton Waikiki -address 2255 Kalakaua Ave lat 21.2768656 long -157.8303232 download 98 @@ -155,7 +138,6 @@ upload 95 tester matt name McDonald's -address 1778 Ala Moana Blvd lat 21.2853928 long -157.8379656 download 13 @@ -163,7 +145,6 @@ upload 10 tester breck name Starbucks -address 2169 Kālia Rd, Honolulu, HI 96815 lat 21.2777786 long -157.833186 download 9 @@ -171,7 +152,6 @@ upload 4 tester breck name Coconut Waikiki Hotel -address 450 Lewers St, Honolulu, HI 96815 lat 21.28268755 long -157.8275950103480 download 26 @@ -179,7 +159,6 @@ upload 4 tester breck name McDonald's -address 2476 Kalākaua Ave, Honolulu, HI lat 21.276131312101300 long -157.8257973665040 download 57 @@ -187,7 +166,6 @@ upload 96 tester breck name McDonald's -address 2237 Kūhiō Ave., Honolulu, HI lat 21.28046355 long -157.82762611968200 download 17 @@ -195,7 +173,6 @@ upload 1 tester breck name Starbucks -address 2255 Kūhiō Ave., Honolulu, HI 96815 lat 21.2796028 long -157.8266621 download 11 @@ -203,7 +180,6 @@ upload 4 tester breck name Hula Grill Waikiki -address 2335 Kalākaua Ave, Honolulu, HI 96815 lat 21.27715 long -157.8276707 download 23 @@ -211,7 +187,6 @@ upload 4 tester breck name Stay Hotel Waikiki -address 2424 Koa Ave, Honolulu, HI 96815 lat 21.276332500000000 long -157.82445297298300 download 3 @@ -219,7 +194,6 @@ upload 2 tester breck name Kai Coffee @ Hyatt Regency -address 2424 Kalākaua Ave #129, Honolulu, HI 96815 lat 21.276067000000000 long -157.82509011592000 download 14 @@ -227,15 +201,13 @@ upload 9 tester breck name McDonald's -address 2476 Kalākaua Ave, Honolulu, HI -lat 21.276131312101300 -long -157.8257973665040 +lat 21.2746455 +long -157.8242588 download 237 upload 96 tester breck name Starbucks -address 2586 Kalākaua Ave, Honolulu, HI lat 21.2719973 long -157.82240798207800 download 13 @@ -243,7 +215,6 @@ upload 2 tester breck name Aloh Cafe -address 407 Seaside Ave 1st floor, Honolulu, HI 96815 lat 21.280457 long -157.82671250000000 download 60 @@ -251,7 +222,6 @@ upload 32 tester matt name The Beach Waikiki Hostel -address 2569 Cartwright Rd, Honolulu, HI 96815 lat 21.27230241748230 long -157.82105363104400 download 12 @@ -259,7 +229,6 @@ upload 4 tester matt name Marriott Courtyard Waikiki Beach -address 400 Royal Hawaiian Ave, Honolulu, HI 96815 lat 21.28155615 long -157.82727085 download 30 @@ -267,7 +236,6 @@ upload 31 tester matt name Marriott Renaissance Honolulu Hotel & Spa -address 1390 Kapiolani Blvd, Honolulu, HI 96814 lat 21.293756538904200 long -157.8437846834390 download 19 @@ -275,7 +243,6 @@ upload 17 tester matt name Marriott Vacation Club -address 92 Waipahe Pl, Kapolei, HI 96707 lat 21.328941 long -158.118743 download 14 @@ -283,7 +250,6 @@ upload 13 tester matt name Seaside Hawaiian Hostel -address 419 Seaside Ave, Honolulu, HI 96815 lat 21.280769222222200 long -157.82641055555600 download 61 diff --git a/index.scroll b/index.scroll index ae46067..09a3d8e 100644 --- a/index.scroll +++ b/index.scroll @@ -3,10 +3,10 @@ title WiFind header.scroll data.csv - select name lat long download upload address tester + select name lat long download upload tester orderBy -download rank - compose nameLink https://www.google.com/maps/place/{address} + compose nameLink https://www.openstreetmap.org/?mlat={lat}&mlon={long}#map=19/{lat}/{long} compute fillOpacity Math.max(.3, {download}/150) map height full @@ -17,4 +17,4 @@ data.csv radius 15 tiles light color transparent - hover <b>{name} - #{rank}</b><br><a href="{nameLink}">{address}</a><br>Download: {download}<br>Upload: {upload}<br>Tester: {tester} + hover <b><a href="{nameLink}">{name}</a> - #{rank}</b><br>Download: {download}<br>Upload: {upload}<br>Tester: {tester} diff --git a/table.scroll b/table.scroll index 81ef93f..6ed0790 100644 --- a/table.scroll +++ b/table.scroll @@ -4,9 +4,9 @@ header.scroll container 960px data.csv - select name download upload address tester + select name download upload tester lat long orderBy -download - compose nameLink https://www.google.com/maps/place/{address} + compose nameLink https://www.openstreetmap.org/?mlat={lat}&mlon={long}#map=19/{lat}/{long} rank select rank name nameLink download upload tester printTable diff --git a/test.js b/test.js index bdc5045..a9bc8eb 100644 --- a/test.js +++ b/test.js @@ -47,11 +47,10 @@ class WiFinder { async particles() { const {latitude, longitude, downloadSpeed, uploadSpeed} = await this.runTests() return `name -address -lat ${latitude} -long ${longitude} -download ${downloadSpeed} -upload ${uploadSpeed} +lat ${latitude || ""} +long ${longitude || ""} +download ${downloadSpeed || ""} +upload ${uploadSpeed || ""} tester ` } } ------------------------------------------------------------
commit 178f4d32dfb836fb3d7369622a9e5af4f6510583
Author: ffff:173.164.135.253 <ffff:173.164.135.253@hub.scroll.pub> Date: Tue Oct 8 15:15:19 2024 +0000 Updated data.scroll diff --git a/data.scroll b/data.scroll index 5eedc77..59afacd 100644 --- a/data.scroll +++ b/data.scroll @@ -11,6 +11,13 @@ download 17 upload 3 tester breck +name Safeway +lat 37.60355571085978 +long -122.39499105794175 +download 27 +upload 2 +tester breck + name SFO address SFO lat 37.61699311093693 ------------------------------------------------------------
commit 4b8dcabd22bd803f6033c4426a1dfe3e91f476f0
Author: ffff:173.164.135.253 <ffff:173.164.135.253@hub.scroll.pub> Date: Tue Oct 8 15:15:09 2024 +0000 Updated data.scroll diff --git a/data.scroll b/data.scroll index 163e59b..5eedc77 100644 --- a/data.scroll +++ b/data.scroll @@ -4,6 +4,13 @@ data.parsers // Put new tests up top +name Peet's +lat 37.6015452 +long -122.3928027 +download 17 +upload 3 +tester breck + name SFO address SFO lat 37.61699311093693