This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var maxPage = 25; // calculate this using (activities/20 + 1) | |
var activityType = "Run"; // change to the workout type you want, or blank for all | |
var p = 1; | |
var done = 0; | |
var url; | |
var nw = window.open("workouts.html"); | |
nw.document.write("["); | |
while (p <= maxPage) { | |
url = "https://www.strava.com/athlete/training_activities" + | |
"?keywords=&activity_type=" + activityType + "&workout_type=&commute=&private_activities=" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
from datetime import datetime, date, timedelta | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
Row = namedtuple("Row", ["number", "network", "total", "left", "reset"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let items = await loadItems() | |
// if (config.runsInWidget) { | |
let widget = createWidget(items) | |
Script.setWidget(widget) | |
Script.complete() | |
// } else { | |
// let item = items[0] | |
// Safari.open(item.url) | |
// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shows latest news from MacStories in a table. | |
// The table shows an image from the article, if available, and the title of the article. | |
let inputStr = args.widgetParameter | |
// if exclude itrms, this meeds to be higger than vLimit | |
// logError(inputStr) | |
if ( inputStr == null ) { inputStr = "apollo@scriptable@1@pic@4" } | |
let vRedditLimit = 15 | |
let vItemCount = 1 | |
var res = inputStr.split("@") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shows latest news from MacStories in a table. | |
// The table shows an image from the article, if available, and the title of the article. | |
// let rReddit = "scriptable" | |
let inputStr = args.widgetParameter | |
// if exclude itrms, this meeds to be higger than vLimit | |
// logError(inputStr) | |
if ( inputStr == null ) { inputStr = "apollo@scriptable@1" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: black; icon-glyph: user-md; | |
var fm = FileManager.iCloud() | |
var imgLocation = fm.bookmarkedPath("WeightTracker.png") | |
var imgToShow = fm.readImage(imgLocation) | |
if (config.runsInWidget) { |