diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c67cf8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Dist/* diff --git a/Build.py b/Build.py new file mode 100755 index 0000000..f832a6b --- /dev/null +++ b/Build.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +import os +from pathlib import Path + +os.makedirs('./Dist', exist_ok=True) + +with open('./Friendiiverse.html', 'r') as Base: + Base = Base.read() + +def FragReplace(Find, Replace, Pattern='*.*', Folder='./'): + global Base + for File in Path('./').rglob(Pattern): + with open(File, 'r') as Frag: + Frag = Replace[0] + Frag.read() + Replace[1] + for Prefix in ('', './'): + Base = Base.replace(Find[0] + Prefix + str(File) + Find[1], Frag) + +FragReplace((''), (''), '*.css') +FragReplace((''), (''), '*.js') + +with open('./Dist/Friendiiverse.html', 'w') as Build: + Build.write(Base) + diff --git a/Friendiiverse.html b/Friendiiverse.html index 2708729..b9c60a0 100644 --- a/Friendiiverse.html +++ b/Friendiiverse.html @@ -3,12 +3,7 @@
-