MCPcopy
hub / github.com/originalankur/maptoposter / generate_output_filename

Function generate_output_filename

create_map_poster.py:39–49  ·  view source on GitHub ↗

Generate unique output filename with city, theme, and datetime.

(city, theme_name)

Source from the content-addressed store, hash-verified

37FONTS = load_fonts()
38
39def generate_output_filename(city, theme_name):
40 """
41 Generate unique output filename with city, theme, and datetime.
42 """
43 if not os.path.exists(POSTERS_DIR):
44 os.makedirs(POSTERS_DIR)
45
46 timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
47 city_slug = city.lower().replace(' ', '_')
48 filename = f"{city_slug}_{theme_name}_{timestamp}.png"
49 return os.path.join(POSTERS_DIR, filename)
50
51def get_available_themes():
52 """

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected