thorstenb / odpdown

Generate OpenDocument Presentation (odp) files from markdown
Other
107 stars 18 forks source link

Improved unique slide and image naming #42

Closed th0ma5w closed 7 years ago

th0ma5w commented 7 years ago

Fixes #41 - use UUID image names for better mergeability

Added UUIDs for generating internal slide title names and stored image names. This ensures that slide names and included images will be uniquely named even across multiple generated presentations. This also seems to guarantee that multiple executions of odpdown.py can combined into a single presentation using the concatenate_presentations_cli.py scripting included in lpod-python.

Page names in the ODP XML are given UUIDs and stored images each receive a UUID as well. Combining multiple copies of the exact same presentation will not work, but re-running odpdown.py against the source markdown will generate new unique IDs, so even that extreme use case, completely duplicating an entire presentation twice, will also work with the concatenate script.

Previously, slide names were derived from the title of the slide, which could conflict. Images were just named sequentially which would also conflict on concatenation. This patch fixes these issues, but further room for improvement still exists.

thorstenb commented 7 years ago

Great stuff - let me merge. And looking forward to the suggested further improvements! :)