View Single Post
Old 12-24-2014, 09:09 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,435
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It should be fairly trivial, I outlined a solution in this thread: https://www.mobileread.com/forums/sho...d.php?t=244255

for uppercasing roman numerals. Converting them to arabic is similar, a bit of googling will find you a python function to do the actual conversion.

The only major problem would be dealing with small numbers, the dictionary based approach will probably not work well for numbers of less than three digits, so you would need to special case them.
kovidgoyal is offline   Reply With Quote