2019-11-11 03:46:12 +00:00
|
|
|
|
>
|
|
|
|
|
{# Twitter Promos #}
|
2020-04-10 16:41:46 +00:00
|
|
|
|
{%- macro getRandomIntro() -%}
|
|
|
|
|
{{- [
|
|
|
|
|
"Do you want your house to be a #smarthome? ",
|
|
|
|
|
"Your house can be a #smarthome too. ",
|
|
|
|
|
"Transform your home into a #smarthome. ",
|
|
|
|
|
"You get a #smarthome and you get a smarthome and you get a smarthome. ",
|
|
|
|
|
"Looking to automate your house? ",
|
|
|
|
|
"Want to get into Home Automation? "
|
|
|
|
|
] | random -}}
|
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
{%- macro getRandomLead() -%}
|
|
|
|
|
{{- [
|
2020-12-03 03:56:02 +00:00
|
|
|
|
"All you need is #homeassistant, and these config files ->",
|
|
|
|
|
"Just grab #homeassistant and checkout ",
|
|
|
|
|
"Just grab #homeassistant and for inspiration checkout ",
|
|
|
|
|
"It is easy. Install #homeassistant, and add some config files like ",
|
|
|
|
|
"You can't go wrong with #homeassistant. For an example of what you can do checkout "
|
2020-04-10 16:41:46 +00:00
|
|
|
|
] | random -}}
|
|
|
|
|
{%- endmacro -%}
|
2019-11-11 03:46:12 +00:00
|
|
|
|
{%- macro getRandomPromo() -%}
|
|
|
|
|
{{- [
|
2020-04-10 16:41:46 +00:00
|
|
|
|
"https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ",
|
|
|
|
|
"https://github.com/skalavala/mysmarthome ",
|
|
|
|
|
"https://github.com/arsaboo/homeassistant-config ",
|
|
|
|
|
"https://github.com/Vasiley/Home-Assistant-Main ",
|
|
|
|
|
"https://github.com/JamesMcCarthy79/Home-Assistant-Config ",
|
|
|
|
|
"https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ",
|
|
|
|
|
"https://github.com/isabellaalstrom/home-assistant-config cc: @teachingbirds ",
|
|
|
|
|
"https://github.com/JuanMTech/Home_Assistant_files cc: @JuanMTech ",
|
2019-11-11 03:46:12 +00:00
|
|
|
|
] | random -}}
|
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
{%- macro getTags() -%}
|
2020-12-03 03:56:02 +00:00
|
|
|
|
#homeautomation #youcandoit #givingback
|
2019-11-11 03:46:12 +00:00
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
|
|
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
|
|
|
|
{%- macro cleanup(data) -%}
|
|
|
|
|
{%- for item in data.split("\n") if item | trim != "" -%}
|
|
|
|
|
{{ item | trim }} {% endfor -%}
|
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
|
|
{# a macro to call all macros :) #}
|
|
|
|
|
{%- macro mother_of_all_macros() -%}
|
2020-04-10 16:41:46 +00:00
|
|
|
|
{{ getRandomIntro() }}
|
|
|
|
|
{{ getRandomLead() }}
|
2019-11-11 03:46:12 +00:00
|
|
|
|
{{ getRandomPromo() }}
|
|
|
|
|
{{ getTags() }}
|
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
|
|
{# Call the macro #}
|
|
|
|
|
{{- cleanup(mother_of_all_macros()) -}}
|
|
|
|
|
|