A static site generator for small web based store front for a brick and mortar store. It uses a local data store: FOSS
This software is intended to fill the gap between a "full" frontend/backend solution and a simple static front end site in that it employs local data stores to create a static website that can be easily updated by the store owner.
Features
- A python script run by the user that accesses a local CSV data store and builds a static html page. This greatly reduces complexity while still giving the user the ability to modify the data.
- It is run by executing a python script from the command line.
- After the initial html file is built, the user will use the hosting provider's website to upload the html file to the hosting server.
- The script is simple enough that an beginning/intermediate python/html dev can update the script, data store and resulting index.html file without additional research or support. Using this software should be within ability range of a superuser.
- This software and its output is written as simply as possible to allow for customization as needed.
- It uses no additional frameworks, just native html/CSS.
- It uses no libraries not included in standard python.
- No JavaScript is used. The output is simple html/CSS. All the CSS is embedded in the html file to make it easier to manage the files. Only the resulting index.html file needs to be uploaded to the hosting server.
- It uses common spreadsheet software to manage the data for both the Store Information and the products to be listed.
- This software is Free and Open Source Software(FOSS) and can be edited by the user or their agent.
Suitability
This software is suitable to the small store owner that is looking to move into online sales/marketing, but doesn't want to commit to a large development project or ongoing costs. It can be advertised using a QR code linking to the hosting provider. This eliminates the need for a domain name.
Possible Uses:
- Small brick and mortar stores
- SwapMeet vendors
- Yard sales
Dependencies
Python 3.4+ is required and must be installed separately.
Installation and Usage
Installation:
- If Python is not installed, install it.
- Create a folder on you local machine and copy the micro.py script into it.
- Using the command line, navigate to the folder you created that contains the micro.py file.
Usage:
The first time this software is used it must be run twice. The first run creates the files and folders necessary. The First Run also creates an index.html file, but this file will yield a blank page until after the second run.
- First Run:
- Navigate to the folder where micro.py file is located and run the following command.
python3 micro.py - The software will print "Does not exist ...." and "Creating directories and files ... data/store.csv, /img" before exiting.
- Navigate to the folder where micro.py file is located and run the following command.
- Second Run:
- Before the second run, update the "products.csv" to include the products you would like to list. A spreadsheet application is used for this operation. Also, input the store information into the "store.csv" file. Both of these files are located in the \data folder.
- A product can be listed as "On Sale" by entering the sale information in the "sale" cell of the spreadsheet for that product. If no products are designated in any of the "sale" cells, no sales section will be created in the resulting index.html file.
- An image of the product can be included in the index.html by writing the file name for the image into the "img" cell for the product and copying the image to the /img folder.
- Run the micro.py script again.
python3 micro.py - The index.html file will be populated with all the store information and products and can be viewed in the browser before uploading to the hosting server.
- On the second run, the software will print "The data/products.csv path exists"
- Upload the index.html file and the entire /img folder to the hosting server using the hosting providers website.
- Follow the instructions for you hosting provider to publish the site to the internet.
Note: The index.html file in the repo above is populated with sample data.