Allow SVG and XHTML files to be used instead of index.html #134

Closed
jwatt opened this Issue Jun 20, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@jwatt

jwatt commented Jun 20, 2011

Chromeless should allow SVG and XHTML files to be used instead of index.html

@jwatt

This comment has been minimized.

Show comment Hide comment
@jwatt

jwatt Jun 20, 2011

I can't seem to find a way to attach a patch to this issue, so here's a patch inline instead:

diff --git a/chromeless b/chromeless
index ee8bba9..bed29b0 100755
--- a/chromeless
+++ b/chromeless
@@ -40,7 +40,12 @@ def findBrowserHTML(path):
# "examples" directory can be omitted, but we'll automatically append it to
# verify that file exists.
if os.path.isdir(path):

  •    path = os.path.join(path, "index.html")
    
  •    if os.path.exists(os.path.join(path, "index.html")):
    
  •        path = os.path.join(path, "index.html")
    
  •    elif os.path.exists(os.path.join(path, "index.xhtml")):
    
  •        path = os.path.join(path, "index.xhtml")
    
  •    elif os.path.exists(os.path.join(path, "index.svg")):
    
  •        path = os.path.join(path, "index.svg")
    

    the path we return must have ui omitted

    return os.path.abspath(path)

jwatt commented Jun 20, 2011

I can't seem to find a way to attach a patch to this issue, so here's a patch inline instead:

diff --git a/chromeless b/chromeless
index ee8bba9..bed29b0 100755
--- a/chromeless
+++ b/chromeless
@@ -40,7 +40,12 @@ def findBrowserHTML(path):
# "examples" directory can be omitted, but we'll automatically append it to
# verify that file exists.
if os.path.isdir(path):

  •    path = os.path.join(path, "index.html")
    
  •    if os.path.exists(os.path.join(path, "index.html")):
    
  •        path = os.path.join(path, "index.html")
    
  •    elif os.path.exists(os.path.join(path, "index.xhtml")):
    
  •        path = os.path.join(path, "index.xhtml")
    
  •    elif os.path.exists(os.path.join(path, "index.svg")):
    
  •        path = os.path.join(path, "index.svg")
    

    the path we return must have ui omitted

    return os.path.abspath(path)

@lloyd lloyd closed this in bb2300e Jun 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment