diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2025-11-22 19:59:14 +0100 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2025-11-22 19:59:14 +0100 |
| commit | 8ef8c4e1d7a3e4a9d00e5862de425c0d89aa5ca8 (patch) | |
| tree | 4bf91fedc17617cb40592b193b446c07c7026d70 | |
| parent | 51794f460de819ce46f69db968b23d4b19de481a (diff) | |
| download | fietsboek-8ef8c4e1d7a3e4a9d00e5862de425c0d89aa5ca8.tar.gz fietsboek-8ef8c4e1d7a3e4a9d00e5862de425c0d89aa5ca8.tar.bz2 fietsboek-8ef8c4e1d7a3e4a9d00e5862de425c0d89aa5ca8.zip | |
remove uneeded function
| -rw-r--r-- | fietsboek/util.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/fietsboek/util.py b/fietsboek/util.py index 37e0943..0329a17 100644 --- a/fietsboek/util.py +++ b/fietsboek/util.py @@ -409,22 +409,6 @@ def tile_url(request: Request, route_name: str, **kwargs: str) -> str: return route.replace("__x__", "{x}").replace("__y__", "{y}").replace("__z__", "{z}") -def encode_gpx(gpx: gpxpy.gpx.GPX) -> bytes: - """Encodes a GPX in-memory representation to the XML representation. - - This ensures that the resulting XML file is valid. - - Returns the contents of the XML as bytes, ready to be written to disk. - - :param gpx: The GPX file to encode. Might be modified! - :return: The encoded GPX content. - """ - for track in gpx.tracks: - if track.link: - track.link = html.escape(track.link) - return gpx.to_xml().encode("utf-8") - - def secure_filename(filename: str) -> str: r"""Pass it a filename and it will return a secure version of it. This filename can then safely be stored on a regular file system and passed @@ -523,7 +507,6 @@ __all__ = [ "locale_display_name", "list_locales", "tile_url", - "encode_gpx", "secure_filename", "recursive_size", "xml_escape", |
