diff --git a/gendocsets/extjs/parse.py b/gendocsets/extjs/parse.py
index e7847f2..df399cf 100644
--- a/gendocsets/extjs/parse.py
+++ b/gendocsets/extjs/parse.py
@@ -8,14 +8,22 @@ import errno
import os
import re
from json import loads
-from lxml.html import parse, tostring
+from lxml.html import parse, tostring, fromstring
from shutil import copytree, rmtree, copy
import sqlite3
INPUT_DIR = '.'
OUTPUT_DIR = os.path.join(INPUT_DIR, 'output')
-OUT_DIR = 'ExtJS-4.1.docset'
+if os.path.exists(os.path.join(INPUT_DIR, 'extjs-build')):
+ builddir = 'extjs-build'
+ OUT_DIR = 'ExtJS-4.1.docset'
+ docsetname = 'ExtJS 4.1'
+else:
+ builddir = 'touch-build'
+ assert os.path.exists(os.path.join(INPUT_DIR, builddir))
+ OUT_DIR = 'SenchaTouch-2.1.docset'
+ docsetname = 'Sencha Touch 2.1'
DOCUMENTS_DIR = os.path.join(OUT_DIR, 'Contents', 'Resources', 'Documents')
HTML_DIR = os.path.join(DOCUMENTS_DIR, 'html')
@@ -24,7 +32,7 @@ copytree(INPUT_DIR, DOCUMENTS_DIR)
# index.html doesn't work with Dash
rmtree(os.path.join(DOCUMENTS_DIR, 'output'))
-rmtree(os.path.join(DOCUMENTS_DIR, 'extjs-build'))
+rmtree(os.path.join(DOCUMENTS_DIR, builddir))
rmtree(os.path.join(DOCUMENTS_DIR, 'guides'))
os.unlink(os.path.join(DOCUMENTS_DIR, 'index.html'))
@@ -36,20 +44,21 @@ with open(os.path.join(OUT_DIR, 'Contents', 'Info.plist'), 'w') as plist: