mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-14 07:01:31 +10:00
* Test new check * Add quote * test * test * move check * move back * use env * test multistep * test trigger * if: github.event.label.name * quotes * hassfest? * Fix clone * Update hassfest * check hassfest * Use real domain * Lmit * Test hassfest * Check domain * Fix domain * No changes * Enable on unlable * Change HACS validate * Move inputs * Add dummy integration * TEst * Move to env * Fix repo * Remove entry
22 lines
677 B
Python
22 lines
677 B
Python
import os
|
|
from scripts.helpers.hacs_manifest import get_hacs_manifest
|
|
|
|
ALTERNATIVES = {
|
|
"info": ["info", "INFO", "info.md", "INFO.md", "info.MD", "INFO.MD"],
|
|
"readme": ["readme", "README", "readme.md", "README.md", "readme.MD", "README.MD"],
|
|
}
|
|
|
|
|
|
def get_info():
|
|
manifest = get_hacs_manifest()
|
|
info = "readme" if manifest.get("render_readme", False) else "info"
|
|
|
|
content = ""
|
|
|
|
for alternative in ALTERNATIVES[info]:
|
|
if os.path.exists(f"/tmp/addition/{alternative}"):
|
|
print(f"Found info file at /{alternative}")
|
|
with open(f"/tmp/addition/{alternative}", "r") as alt:
|
|
content = alt.read()
|
|
return content
|