The first version of Open-event-webapp will be a generator that will create the web app.
The web app can be generated in any empty repository and can be hosted with gh-pages by just running build.sh file from the Open-event-scraper. This is the build.sh file I have written for doing this.
How can you create the webapp from scraper in your repository ?
1 . Replace the URL of the repository in git clone command.
git clone – – depth=1 < destination repo url > ots-repo
2 . Run the file build.sh from Open-event-scraper.
Utility for transferring content using build.sh
The build.sh file is written to make a folder that is self-sufficient. It means it can be taken anywhere and it should work on its own.
The build.sh file first creates a clone of the destination repository in the local Open-event-scraper. It itself make the required folders inside the cloned repository and runs generator.js which provides index.html file according to the template schedule.tpl. The resync command that is known as remote sync is used to transfer the files remotely. A programm folder is created automatically that includes all the CSS, JS, JSON and other important files used to run the web app.
Finally, the programm folder along with all necessary files is pushed to gh-pages branch of the destination repository.
To create the web app I have replaced the destination URL as shown in the image.
After running the build.sh we will get the output as shown :
That’s how a folder is generated which contains all the necessary files needed to run the web app.