Skip to content

Software & Tools

Eliot edited this page Oct 4, 2023 · 8 revisions

Data production & quality 📊

Formatting of code

Xmllint

Xmllint is a tool that helps harmonize XML, XSD, and WSDL files before integrating them into your project. To achieve this, you can use the following shell script:

#!/bin/bash
/usr/bin/find . -name "*.xsd" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

/usr/bin/find . -name "*.xml" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

/usr/bin/find . -name "*.wsdl" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

echo "Finished formatting"

You can execute the script with bash xmllint-check.sh. If you're on a Windows machine, you can use it via Cygwin (see installation instructions).

Resources

TravisCI

The formatting with Xmllint as shown above doesn't need to be done by the contributors. Changes to the SIRI-CEN repo are automatically corrected (or reformatted respectively) by TravisCI. If contributors still want to utilize Xmllint or want to check/validate the changes themselves, they can use the xmllint-check script provided in the /.travis subfolder.

Validators

Tool Name Description Profile URL
BODS Validator of TransXChange and SIRI-VM https://github.com/department-for-transport-BODS/bods

Mapping & Conversion 🛠️

Conversion and connectors to SIRI software and between other formats

Tool Name Description Profile URL
Anshar Java based tool to connect, validate and redistribute SIRI. (Act as a national aggreagation hub for all SIRI feeds in Norway) Norwegian https://github.com/entur/anshar
OneBusAway SIRI A set of tools to connect to and convert SIRI. https://github.com/OneBusAway/onebusaway-siri
Irys A set of tools to connect and redistribute SIRI https://github.com/afimb/irys

Canonical mapping

In the framework of the CEN work for the extension, a canonical mapping was made between NeTEx Part 5 /SIRI and GBFS. It is available here.

Clone this wiki locally