Welcome to Pureser, a fast and flexible parser for survey form files (ODK XLSForm .xlsx files), written in Swift.
Pureser can be used to convert these files into HTML, making them printable.
These HTML file can be opened in your favourite modern browser and can be printed directly from there or saved to a PDF file (using the modern browser's PDF renderer).
-
As a web app that you run locally (and offline) with docker compose. Jump there.
-
As a web app that you deploy to server. Jump there.
-
As a web app that you run locally (and offline) with Xcode. Jump there.
Prerequisites:
- Docker
Download Docker Desktop, if you don't already have it.
Steps:
-
Go to Pureser folder, e.g.:
$ cd Desktop/path/to/Pureser/
-
Make sure Docker is running.
If not, open Docker and have it running. -
Build with docker compose, run:
$ docker-compose -p pureser build -q
from the root directory of your app's project (the folder containing docker-compose.yml).
This may take several minutes. -
Start up the app:
$ docker-compose up --detach app
Your app is going to start up "detached" (i.e. in the background). -
(Optional) To verify that the app is running, run:
$ docker ps
This prints a list of running containers. -
To run migrations, execute:
$ docker-compose up migrate
-
Pureser is running now.
Go to http://127.0.0.1:8080 or http://0.0.0.0:8080 in your browser to use or test it. -
When you're done, to shut down these containers, run:
$ docker-compose down
Or, to stop & wipe database:
$ docker-compose down -v
More details:
The web app is built on Vapor, a web framework for Swift.
So Pureser can be deployed to server the same as any Vapor web app.
-
Set up a PostgreSQL server 12.2 or later.
You will need a database and a connection URL. -
Add your PostgreSQL connection URL as an environment variable,
Set name to "POSTGRESQL_URL
" and value toyour PostgreSQL connection URL
. -
Make sure the selected scheme is "Pureser > My Mac".
-
Run Pureser from Xcode (menu > Product > Run).
Wait for server to start. -
Pureser is running now.
Go to http://127.0.0.1:8080 or http://0.0.0.0:8080 in your browser to use or test it. -
When you're done, stop Pureser from Xcode (menu > Product > Stop).
Note that the database won't be wiped, if you want to wipe database, you have to do that manually.
Hope you'll enjoy using Pureser!