Add a settingsmeta.json.example creator heredoc.

pull/1570/head
jrwarwick 2018-05-04 09:04:19 -07:00
parent ad49a48d34
commit bb5676f353
1 changed files with 42 additions and 0 deletions

View File

@ -135,6 +135,48 @@ def create_skill():
return $class_name()
""" > "$skill_dir/__init__.py"
echo """{
\"name\": \"${capital_desc}\",
\"skillMetadata\": {
\"sections\": [
{
\"name\": \"Section Friendly Display Name for Home.Mycroft.AI\",
\"fields\": [
{
\"name\": \"internal_python_variable_name\",
\"type\": \"text\",
\"label\": \"Setting Friendly Display Name\",
\"value\": \"\",
\"placeholder\": \"demo prompt in the input box\"
}
]
},
{
\"name\": \"Login --Another Section But This One Has Two Values--\",
\"fields\": [
{
\"type\": \"label\",
\"label\": \"Just a little bit of extra info for the user to understand following settings\"
},
{
\"name\": \"username\",
\"type\": \"text\",
\"label\": \"Username\",
\"value\": \"\"
},
{
\"name\": \"password\",
\"type\": \"password\",
\"label\": \"Password\",
\"value\": \"\"
}
]
}
]
}
}
""" > "$skill_dir/settingsmeta.json.example"
echo -e "*.pyc\nsettings.json\n" > $skill_dir/.gitignore
for i in "dialog" "vocab"; do mkdir -p "$skill_dir/$i/$lang"; done
echo "$skill_desc" > "$skill_dir/vocab/$lang/$keyword.voc"