I also use file_name (full) for note IDs. But, because you need to remove the extension?
To extract notes from all files and dump them in a specific file (notas.xhtml), as I have not sufficient knowledge of Python, I do the following:
1- I make notas.xhtml
2- I use this regex-function
Code:
#Searching: (<p class="nota".+?>.+?</p>)
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
notas = open('e:/Libros/Taller/En curso/notas.txt', 'a')
texto = match.group()+'\n'
notas.write(texto)
return ''
replace.file_order = 'spine'
3- I do copy-paste of notas.txt to notas.xhtml
And sorry for my english.