main does it all from the root directory

This commit is contained in:
Anish Lakhwara 2022-02-26 22:24:38 +10:00
parent 888afdb76c
commit e21daaf521

View file

@ -1,9 +1,12 @@
from grab import makePublic
from shared import TagHelper
from build import build
import os
def grab():
# We're in src/kitaab-public/
os.chdir('./grab/')
all_files = TagHelper.getAllFiles()
filtered_files = makePublic.filterFiles(all_files)
makePublic.copyFiles(filtered_files)
@ -12,16 +15,17 @@ def grab():
def build_website():
# we're in src/kitaab-public/grab/
os.chdir('../')
print('building websites')
build.generate_website()
def main():
print('in main')
grab()
print('going to build')
build_website()
if __name__ == '__main__':
os.chdir('./src/kitaab-public/')
main()