diff options
-rwxr-xr-x | parse_stagit | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/parse_stagit b/parse_stagit index be52ee3..6830e12 100755 --- a/parse_stagit +++ b/parse_stagit @@ -14,6 +14,8 @@ URLBASE="$1" DEST="$2" SUBPATH="/file" CURL="torify curl -Ls " +READMES="README.html README.txt.html README.md.html readme.html readme.txt.html readme.md.html" +TMPFILE="./tmp_$$" ## func @@ -34,7 +36,9 @@ repos=$(cat $TMPFILE | grep "/html/body/div/table/tbody/tr/td/a" \ ## func get_descr() { reponame=$1 + url=$2 echo "reponame: $reponame" + echo "url: $url" ## Get author and description cat "$TMPFILE" | grep -Ei -A 2 "/html/body/div/table/tbody/tr/td/a[[:blank:]]+href=${reponame}/log.html" |\ tail -2 | cut -f 2- @@ -72,8 +76,6 @@ DIRBASE="$PROTO/${URLBASE##[a-z]*:\/\/}" echo "proto: $PROTO" echo "dirbase: $DIRBASE" -READMES="README.html README.txt.html README.md.html readme.html readme.txt.html readme.md.html" -TMPFILE="./tmp_$$" trap cleanup EXIT KILL TERM INT @@ -89,7 +91,8 @@ for r in $repos; do printf "link: %s\nbaselink: %s\n" $link $baselink 1>&2 REPODIR="$DEST/$DIRBASE/$link/" mkdir -p $REPODIR - get_descr $name > ${REPODIR}/DESCR + ## get description + get_descr "$name" "$baselink" > ${REPODIR}/DESCR ## Get READMEs get_readmes "$baselink/$SUBPATH" "$REPODIR" done |