shithub: mycel

Download patch

ref: 8557009dae43eae4d53f3655772653bf74ae72c9
parent: 6fea339d0e40d598f093146c0d096b64e2e10c91
author: Philip Silva <[email protected]>
date: Sun Aug 8 09:38:18 EDT 2021

Handle websites without body more gracefully

--- a/browser/website.go
+++ b/browser/website.go
@@ -125,6 +125,11 @@
 	log.Printf("%v html nodes found...", countHtmlNodes(doc))
 
 	body := grep(doc, "body")
+	if body == nil {
+		// TODO: handle frameset without noframes
+		log.Errorf("html has no body")
+		return
+	}
 
 	log.Printf("Layout website...")
 	nt := nodes.NewNodeTree(body, style.Map{}, nodeMap, &nodes.Node{})
--- a/package.rc
+++ b/package.rc
@@ -1,7 +1,8 @@
 name64='opossum-amd64'
 name32='opossum-386'
-tarball64=`{pwd} ^ '/packages/' ^ $name64 ^ '-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
-tarball32=`{pwd} ^ '/packages/' ^ $name32 ^ '-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
+version=`{date -i} ^ '-' ^ `{cat .git/fs/branch/heads/master/hash | read -c 6}
+tarball64=`{pwd} ^ '/packages/' ^ $name64 ^ '-' ^ $version ^ '.tgz'
+tarball32=`{pwd} ^ '/packages/' ^ $name32 ^ '-' ^ $version ^ '.tgz'
 
 fn build {
 	tarball=$1
@@ -22,7 +23,7 @@
 	cd ../..
 	mv cmd/opossum/$name cmd/gojafs/gojafs ./$name/
 	cp README.md ./$name/
-	cp opossum.jpg ./$name/
+-	cp opossum.jpg ./$name/
 	tar czf $tarball $name
 	chmod +t $tarball
 	echo Created $tarball