func injectSubtitle(slidePath string, done chan bool) {
	defer func() {
		done <- true
	}()
	relsPath := filepath.Join(filepath.Dir(slidePath), "_rels", filepath.Base(slidePath)+".rels")
	rels := etree.NewDocument()
	rels.ReadFromFile(relsPath)
	notesRel := rels.FindElement("//Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide']")
	if notesRel == nil {
		return
	}
	notesPath := notesRel.SelectAttrValue("Target", "")
	notesPath = filepath.Join(filepath.Dir(slidePath), notesPath)
	notes := etree.NewDocument()
	notes.ReadFromFile(notesPath)
	e := notes.FindElement("//p:ph[@type='body']")
	e = e.Parent().Parent().Parent()
	txBody := e.FindElement("./p:txBody")
	removeElements(txBody, ".//a:pPr")
	removeElements(txBody, ".//a:rPr")
	tmpDoc := etree.NewDocument()
	tmpDoc.ReadFromString(`
		<p:sp>
			<p:nvSpPr>
				<p:cNvPr id="999999" name="Subtitle" />
				<p:cNvSpPr><a:spLocks noGrp="1" /></p:cNvSpPr>
				<p:nvPr><p:ph type="ftr" sz="quarter" idx="11" /></p:nvPr>
			</p:nvSpPr>
			<p:spPr />
		</p:sp>
	`)
	sp := tmpDoc.Root()
	sp.AddChild(txBody)
	slide := etree.NewDocument()
	slide.ReadFromFile(slidePath)
	spTree := slide.FindElement("//p:spTree")
	spTree.AddChild(sp)
	slide.WriteToFile(slidePath)
}
Injects a subtitle for one slide file.
package subpptx
import (
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"github.com/beevik/etree"
	"github.com/mholt/archiver"
)
func removeElements(elem *etree.Element, path string) {
	for _, e := range elem.FindElements(path) {
		e.Parent().RemoveChild(e)
	}
}