public String defaultFileUrl() {
    String result = url
      .replaceFirst("^https?://", "")
      .replaceAll("[\\W&&[^.]]+", "_");
    if (type == DataSourceType.OSM && !result.endsWith(".pbf")) {
      result = result + ".osm.pbf";
    }
    return result;
  }
A parsed source definition from a config file.
planetiler-custommap/src/main/java/com/onthegomap/planetiler/custommap/Source.java