Commit bceb793c authored by ankraft's avatar ankraft
Browse files

Added placeholder and edit note for not-found images

parent 59f07be5
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -608,7 +608,7 @@ def processDocuments(documents:list[str],
					
					fn = f'{imageDirName}{os.sep}{os.path.basename(zipMediaFilename)}'
					if fn.lower().endswith(('.emf', '.wmf')):
						_print(f'[yellow]unsupported media file: {fn}', highlight = False)
						_print(f'[yellow]unsupported media file (will be converted): {fn}', highlight = False)
						emfFiles.append(fn)
					with open(f'{fn}', 'wb') as imgFile:
						imgFile.write(zip.read(zipMediaFilename))
@@ -705,7 +705,7 @@ def processDocuments(documents:list[str],
						#	Image Caption
						elif style in docConfig.imagecaption:
							checkSameStyle(Style.imagecaption, lambda:lines.append(''))
							_t = replaceNL(text).strip()
							_t = replaceNL(text).strip().replace('<br />', ' ')
							lines.append(f'**{_t}**')
							lines.append('')
							if docConfig.imageCaptions2AltText:
@@ -717,7 +717,13 @@ def processDocuments(documents:list[str],
						#	Image & Figure
						elif style in docConfig.image:
							lines.append('')
							if text:
								# If we have an image name
								lines.append(text)
							else:
								# If we have no image name we add a placeholder
								lines.append('<mark>Please add the correct image caption and filename</mark>')
								lines.append(f'![{_captionMarker}]({imagesSubDir}/???.png)')

						#	Code
						elif style in docConfig.code: