Make ArcMap HTML metadata suitable for general use, e.g. with CKAN
When you view the Description of something in ArcMap or ArcCatalog, that's an HTML
page you're looking at. You can right-click -> Properties to see where it's saved,
something like file:///C:/Users/tbrown/AppData/Local/Temp/arc5E14/tmpDE3C.tmp.htm,
and copy it for use elsewhere. It's in UTF-16 (two bytes per character) encoding,
and the link to the thumbnail will probably break - this simple program below
fixes both those issues. Example usage:
python arcmap2ckan.py tmpBC5A.tmp.htm GLStress5971.metadata.html GLStress5971.view.jpg
The second program, arcmap2reorder.py, can be used to reorder the fields in ArcMap
metadata, so they match the order in the attribute table.
Works with python 2.7 or 3.x