How does it work?
By running this shortcut, you can access the project settings. This will allow you to generate a user ID, set your home location or see how much contribution has been made to the project.
ID generation is based on https://routinehub.co/shortcut/1163.# Integration within the Humin ecosystem
This shortcut is meant to be used within the Humin ecosystem, as part of our Data Research & Development project. The other shortcuts for this project can be found here:
To know more about the project or get involved, don’t hesitate to reach out to us!
About Humin
We are building a Fitbit for mental health: bringing objective, passive, personalised symptom tracking for mood.
Our mission is to bring deep and personalised insights to support people to understand their mood symptoms. We are doing this using AI and anonymised data. Our vision is to bring quality mental health insights to everyone, to help them get the right care at the right time.
- LinkedIn: https://www.linkedin.com/company/huminltd/
- Instagram: @humin.uk
- Website: https://humin.uk/
News
We are currently developing our MVP. If you wish to reach out to us and/or help us in our research, please reach out to us by visiting our website at https://humin.uk/.
Go and check out our podcast on mental health:
Что нового
Changed a few prompts
Что делает
Действий: 221-
Dictionary
-
Text
-
Set Variablelast_date_filename
-
Text
-
Set Variablefirst_date_filename
-
Get File
-
If
-
Adjust Date
-
Text
-
Save File
-
Save File
-
Text
-
Set Variableuser_id_filename
-
Dictionary
-
Set Variableinput_options_dict
-
If
-
Choose from MenuWelcome to Humin's main menu. This shortcut allows you to see and modify all your settings. What setting do you want to see?
-
Choose from MenuMy ID
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
Choose from MenuMy home location
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
Choose from MenuMy data
-
Run ShortcutHumin Menu
-
Stop This Shortcut
-
Get Dictionary from Input
-
Set Variableinput_dict
-
Get Dictionary Value
-
Set Variablemode
-
If
-
Get File
-
Get Text from Input
-
Get Dates from Input
-
Set Variablelast_date_saved
-
Get File
-
Get Text from Input
-
Get Dates from Input
-
Set Variablefirst_date_saved
-
Get Time Between Dates
-
Set Variabledays_already_processed
-
Get Time Between Dates
-
Calculate
-
Set Variabledays_left_to_process
-
If
-
Number
-
Set Variabledays_left_to_process
-
Text
-
Choose from Menu…
-
Choose from Menu⬅️ Back
-
Run ShortcutHumin Menu
-
Stop This Shortcut
-
If
-
Get File
-
If
-
Dictionary
-
Save File
-
Set Variableold_homes_list
-
If
-
Dictionary
-
Set Variableold_homes_address_to_index
-
Get Dictionary from Input
-
Set Variableold_homes_list
-
Repeat with Each
-
Set Dictionary Value
-
Set Variableold_homes_address_to_index
-
Text
-
Get File
-
Get Dictionary from Input
-
Set Variablehome_dict
-
If
-
If
-
Choose from MenuYour current home location is ….
-
Choose from MenuChange home to a previous location
-
If
-
Text
-
Show AlertWarning
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
If
-
List
-
Choose from List
-
If
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
Get Dictionary Value
-
Set Variableto_pass
-
Dictionary
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
Choose from MenuDefine a new home location
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
Choose from MenuDelete previous location(s) from records
-
If
-
Text
-
Show AlertWarning
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
If
-
Choose from List
-
Repeat with Each
-
If
-
List
-
Set Variableold_homes_list_new
-
Dictionary
-
Set Variablefinal_dict_old_homes
-
If
-
Set Dictionary Value
-
Set Variablefinal_dict_old_homes
-
Save File
-
Text
-
Show Result
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
Choose from Menu⬅️ Back
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
If
-
Text
-
Show AlertInformation
-
Get Dictionary Value
-
If
-
Set Variablehome_data
-
Repeat with Each
-
If
-
List
-
Set Variableold_homes_list_new
-
Set Variableold_homes_list
-
If
-
Location
-
Show in Maps
-
Choose from MenuIs it the right address?
-
Choose from MenuYes
-
Text
-
Set Variablehome_data
-
Choose from MenuNo, let’s try again
-
Run ShortcutShow in Maps
-
Stop This Shortcut
-
If
-
Get Dictionary Value
-
Set Variableprev_home_data
-
Count
-
If
-
Set Variableold_homes_list
-
If
-
If
-
List
-
Set Variableold_homes_list
-
Dictionary
-
Set Variablefinal_old_homes_dict
-
If
-
Set Dictionary Value
-
Set Variablefinal_old_homes_dict
-
Save File
-
Get Dictionary from Input
-
Save File
-
Text
-
Show AlertInformation
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
If
-
Get File
-
Get Dictionary from Input
-
Set Variableuser_id_dict
-
If
-
If
-
Text
-
Show Result
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
If
-
Choose from MenuYou current user ID is ….
-
Choose from Menu⬅️ Back
-
Run ShortcutShow in Maps 1
-
Stop This Shortcut
-
Dictionary
-
Set VariableIntToHex
-
List
-
Set VariableOutput
-
List
-
Set VariableN
-
Repeat
-
Random Number
-
Add to Variable
-
Number
-
Set VariableLast
-
Repeat with Each
-
Calculate
-
Calculate
-
Set VariableLast
-
Get Dictionary Value
-
Set VariableN
-
Repeat
-
Random Number
-
Get Dictionary Value
-
Set VariableRandom
-
Get Item from List
-
Combine Text
-
Add to Variable
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/text'
#include 'actions/documents'
#include 'actions/calendar'
#define color violet
#define glyph sliders
@last_date_filename = "Humin/lastDateSaved.txt"
@first_date_filename = "Humin/firstDateSaved.txt"
const File = getFileFromFolder(, @first_date_filename, false)
if !File {
adjustDate(CurrentDate, "Subtract")
const Text = "{}"
saveFile("Humin/lastDateSaved.txt", Text, true)
saveFile("Humin/firstDateSaved.txt", Text, true)
}
@user_id_filename = "Humin/user_id.json"
@input_options_dict = {
"input data": {
"mode": "3"
},
"input home": {
"mode": "2"
},
"input home new location": {
"data": "Set location",
"mode": "2"
},
"input id": {
"mode": "1"
},
"input id new id": {
"data": "Set ID",
"mode": "1"
}
}
if !ShortcutInput {
menu "Welcome to Humin's main menu. This shortcut allows you to see and modify all your settings. What setting do you want to see?" {
item "My ID":
runSelf(@input_options_dict)
stop()
item "My home location":
runSelf(@input_options_dict)
stop()
item "My data":
runSelf(@input_options_dict)
stop()
}
}
getDictionary(ShortcutInput)
@input_dict
@mode = @input_dict['mode']
if @mode == "3" {
const File1 = getFile(@last_date_filename)
const Text1 = getText(File1)
getDates(Text1)
@last_date_saved
const File2 = getFile(@first_date_filename)
const Text2 = getText(File2)
getDates(Text2)
@first_date_saved
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{@last_date_saved}",
"WFTimeUntilFromDate": "{@first_date_saved}",
"WFTimeUntilUnit": "Days"
})
@days_already_processed
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{CurrentDate}",
"WFTimeUntilFromDate": "{@last_date_saved}",
"WFTimeUntilUnit": "Days"
})
@days_left_to_process = TimeBetweenDates - 2
if @days_left_to_process < 0 {
@days_left_to_process = 0
}
menu {
item "⬅️ Back":
runSelf()
stop()
}
}
if @mode == "2" {
const old_homes_file = getFile("Humin/old_homes.json", false)
if !old_homes_file {
const Dictionary = {
"old_homes": null
}
saveFile("Humin/old_homes.json", Dictionary, true)
@old_homes_list = Dictionary['old_homes']
} else {
@old_homes_address_to_index = {}
getDictionary(old_homes_file)
@old_homes_list = ['old_homes']
for _ in @old_homes_list {
setValue(@old_homes_address_to_index, @RepeatItem['address'], @RepeatItem)
@old_homes_address_to_index
}
}
const filename = "Humin/home.json"
const home_file = getFile(filename, false)
getDictionary(home_file)
@home_dict
if @input_dict !contains "data" {
if @home_dict {
menu "Your current home location is {@home_dict['address']}." {
item "Change home to a previous location":
if !@old_homes_list {
alert(, "Warning")
runSelf(@input_options_dict)
stop()
} else {
const List = list(@old_homes_address_to_index['Keys'], "⬅️ Back")
const ChosenItem = chooseFromList(List, "Here are your previous locations. Which one do you want to set?")
if ChosenItem == "⬅️ Back" {
runSelf(@input_options_dict)
stop()
}
@to_pass = @old_homes_address_to_index[ChosenItem]
const Dictionary1 = {
"data": "{@to_pass}",
"mode": "{@mode}"
}
runSelf(Dictionary1)
stop()
}
item "Define a new home location":
runSelf(@input_options_dict)
stop()
item "Delete previous location(s) from records":
if !@old_homes_list {
alert(, "Warning")
runSelf(@input_options_dict)
stop()
} else {
const ChosenItem1 = chooseFromList(@old_homes_address_to_index, "Which locations would you like to delete?", true)
for _ in @old_homes_list {
if ChosenItem1 !contains @RepeatItem['address'] {
list(@old_homes_list_new, @RepeatItem)
@old_homes_list_new
}
}
@final_dict_old_homes = {
"old_homes": null
}
if @old_homes_list_new {
setValue(@final_dict_old_homes, "old_homes", @old_homes_list_new)
@final_dict_old_homes
}
saveFile("Humin/old_homes.json", @final_dict_old_homes, true)
show()
runSelf(@input_options_dict)
stop()
}
item "⬅️ Back":
runSelf()
stop()
}
} else {
alert(, "Information")
}
}
const input_data = getValue(@input_dict, "data")
if input_data contains "latitude" {
@home_data = input_data
for _ in @old_homes_list {
if @RepeatItem !contains @home_data['address'] {
list(@old_homes_list_new, @RepeatItem)
@old_homes_list_new
}
}
@old_homes_list = @old_homes_list_new
} else {
const Location = location(Ask: "What is your home location?")
openInMaps(Location)
menu "Is it the right address?" {
item "Yes":
@home_data = "{\\"latitude\\": \\"{Location['Latitude']}\\", \\"longitude\\": \\"{Location['Longitude']}\\", \\"address\\": \\"{Location['Street']}, {Location['City']}, {Location['ZIP Code']}, {Location['Country']}\\"}"
item "No, let’s try again":
runSelf(@input_options_dict)
stop()
}
}
if @home_dict {
@prev_home_data = @home_dict['address']
const Count = count(@old_homes_list)
if Count == 0 {
@old_homes_list = @prev_home_data
} else {
if @old_homes_list !contains @prev_home_data['address'] {
list(@old_homes_list, @prev_home_data)
@old_homes_list
}
}
@final_old_homes_dict = {
"old_homes": null
}
if @old_homes_list {
setValue(@final_old_homes_dict, "old_homes", @old_homes_list)
@final_old_homes_dict
}
saveFile("Humin/old_homes.json", @final_old_homes_dict, true)
}
const Dictionary2 = getDictionary(@home_data)
saveFile(filename, Dictionary2, true)
alert(, "Information")
runSelf()
stop()
}
if @mode == "1" {
const File3 = getFile(@user_id_filename, false)
getDictionary(File3)
@user_id_dict
if @input_dict !contains "data" {
if !@user_id_dict {
show()
runSelf(@input_options_dict)
stop()
} else {
menu "You current user ID is {@user_id_dict['userID']}." {
item "⬅️ Back":
runSelf()
stop()
}
}
}
@IntToHex = {
"1": "1",
"10": "a",
"11": "b",
"12": "c",
"13": "d",
"14": "e",
"15": "f",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9"
}
list()
@Output = nil
list("1", "0")
@N
repeat _ for 2 {
randomNumber(0, 1)
@N
}
@Last = 0
for _ in @N {
const CalculationResult = @Last * 2
@Last = CalculationResult + @RepeatItem
}
@N = @IntToHex[@Last]
repeat _ for 30 {
randomNumber(1, 15)
getValue(@IntToHex)
}
@Random
const ItemFromList = getListItems(@Random, 0, 8)
joinText(ItemFromList, "Custom")
@Output
const ItemFromList1 = getListItems(@Random, 9, 12)
joinText(ItemFromList1, "Custom")
@Output
const ItemFromList2 = getListItems(@Random, 13, 15)
joinText(ItemFromList2, "Custom")
@Output += "4{}"
const ItemFromList3 = getListItems(@Random, 16, 18)
joinText(ItemFromList3, "Custom")
@Output += "{@N}{}"
const ItemFromList4 = getListItems(@Random, 19, 30)
joinText(ItemFromList4, "Custom")
@Output
joinText(@Output, "-")
const Dictionary3 = {
"userID": "{}"
}
saveFile(@user_id_filename, Dictionary3, true)
show()
runSelf()
stop()
}
Оценки и отзывы
Написать отзывПока нет отзывов. Поделись мнением первым!