Shlomi Fish avatar Shlomi Fish committed ba3acc6

Add the bashrc.

Comments (0)

Files changed (1)

+#!/bin/bash
+
+xmlformat()
+{
+	while test -n "$1"; do
+        echo xmlformat "$1"
+        xmllint --format  "$1"  --output "$1"
+        shift
+	done
+}
+
+base="story"
+odt="${base}.odt"
+
+odt2xml() # ODT -> XML
+{
+	mkdir "$odt".d
+	unzip -o "$odt" -d "$odt".d 
+	xmlformat "$odt".d/content.xml  "$odt".d/meta.xml  "$odt".d/settings.xml  "$odt".d/styles.xml
+}
+
+xml2odt() # XML -> ODT
+{
+	mv "$odt" "$odt".save
+	( cd "$odt".d; zip -r ../"$odt" . -x *.svn-base -x ".svn/*" -x "*/.svn/*" -x "*/*/.svn/*" )
+  	unzip -t "$odt"
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.