Skip to content

Instantly share code, notes, and snippets.

@thomaspatzke thomaspatzke/gist:9496625
Last active Aug 29, 2015

What would you like to do?
Convert Joomla J2XML export file into files containing the title of the content element in the first line and the HTML code afterwards (suitable for Blosxom)
xmlstarlet sel -T -t -m //content -v alias -o ';' -v created -o ';' -v title -n joomlaexport.xml | while IFS=';' read alias ts title; do echo $title > $alias.txt; xmlstarlet sel -T -t -m '//content[contains(alias,"'$alias'")]' -v introtext -n joomlaexport.xml | recode html >> $alias.txt; touch -d "$ts" $alias.txt; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.