Use the code

Logging

archmap.message(message, verbosity, systemd=False)[source]

This function takes a string in message. If verbosity >= 1 it will print out message. If systemd is not False (the system uses the systemd journal), it will log to it using message.

Getting and parsing user data

archmap.get_users(output_file, verbosity)[source]

This funtion parses users from the ArchWiki and writes it to output_file

If verbosity >= 1 it will print out the string passed to message().

archmap.parse_users(users_file, verbosity)[source]

This function parses the wiki text from users_file into it's components. It returns a list of lists, each sub_list has 4 elements: [latitude, longitude, name, comment]

If verbosity >= 1 it will print out the string passed to message().

Output generators

archmap.make_geojson(parsed_users, output_file, send_to_geojsonio, verbosity)[source]

This function reads the user data supplied by parsed_users, it then generates geojson output and writes it to output_file.

parsed_users should be a list of lists, each sub_list should have 4 elements: [latitude, longitude, name, comment]

If you set send_to_geojsonio to True it will send the raw geojson to geojson.io via a GitHub gist.

If verbosity >= 1 it will print out the string passed to message().

archmap.make_kml(parsed_users, output_file, verbosity)[source]

This function reads the user data supplied by parsed_users, it then generates kml output and writes it to output_file.

parsed_users should be a list of lists, each sub_list should have 4 elements: [latitude, longitude, name, comment]

If verbosity >= 1 it will print out the string passed to message().

archmap.make_csv(parsed_users, output_file, verbosity)[source]

This function reads the user data supplied by parsed_users, it then generates csv output and writes it to output_file.

parsed_users should be a list of lists, each sub_list should have 4 elements: [latitude, longitude, name, comment]

If verbosity >= 1 it will print out the string passed to message().