New commits:
commit 7b3a8bdc21d0afb79f1cced2119d7ae69bca88d5
Author: Andraž Levstik <ruskie+2054d253 AT codemages.net>
Commit: Andraž Levstik <ruskie+2054d253 AT codemages.net>
more updates for api and make it work now
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 1843a91..dfad638 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,8 +1,10 @@
2009-06-29 Andraž "ruskie" Levstik <ruskie+f03a580f AT codemages.net>
* libcore: added new config variable FRESHMEAT_API_KEY
- * libfreshmeatxml: updated to work with the new FM API
+ * libfreshmeatxml: updated to work with the new FM API, more updates,
+ get keywords, licenses
* quill: boosted config version
- * version: 0.3.0-rc23
+ * version: 0.3.0-rc23, 0.3.0-rc24
+ * libdetails: added keywords, quote licenses since it can be a list
# fill in variables from xml file
-
- SPELL_NAME=$(quill_fmxml_grab_from_xml permalink ${FRESHMEAT_FILE} |tr
'A-Z' 'a-z')
+# hoping that the first one is the one we need
+ SPELL_NAME=$(quill_fmxml_grab_from_xml permalink ${FRESHMEAT_FILE} | head
-n1 |tr 'A-Z' 'a-z')
SPELL_NAME="${SPELL_NAME:-$1}"
SPELL_DESC_NAME="${SPELL_NAME}"
+# common download link names, add others as needed
local tmp_url
for each in "Tar/BZ2" "Tar/GZ" "Zip" ; do
tmp_url="$(quill_fmxml_grab_from_xml --cond "//approved-url/label"
--cond "//approved-url/redirector" ${FRESHMEAT_FILE} | grep -A1 "$each" |
tail -n1)"
@@ -72,6 +73,7 @@ function quill_fmxml_core() {
fi
done
+# list of the most common website tags, feel free to add others as needed
local tmp_url
for each in "Website" "Homepage" "Web Site" "Project Home" "Home Page" ; do
tmp_url="$(quill_fmxml_grab_from_xml --cond "//approved-url/label"
--cond "//approved-url/redirector" ${FRESHMEAT_FILE} | grep -A1 "$each" |
tail -n1)"
@@ -80,13 +82,8 @@ function quill_fmxml_core() {
fi
done
-# this seems to be harder and harder to get not in the api :(
-# SPELL_LICENSE="$(quill_fmxml_grab_from_xml license ${FRESHMEAT_FILE})"
-# if grep -q "(.*)" <<< "${SPELL_LICENSE}"; then
-# SPELL_LICENSE="$(awk '{print $NF}' <<< "$SPELL_LICENSE" | tr -d '()')"
-# fi
-
- SPELL_LICENSE=$(sed -n '/class=\"tag-list padtop licenses\"/,/<\/div>/ p'
${FRESHMEAT_PROJECT_FILE} | tr "\n" " " | sed -e
"s:.*class=\"tagSize4\">\(.*\)</a>.*:\1:g")
+ SPELL_LICENSE="$(quill_fmxml_grab_from_xml license-list ${FRESHMEAT_FILE})"
+ SPELL_KEYWORDS="$(quill_fmxml_grab_from_xml tag-list
${FRESHMEAT_FILE})"