Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Andra?? Levstik (3494aa883e1c63ba6b5c91a196effec2b14e225f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andra?? Levstik <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Andra?? Levstik (3494aa883e1c63ba6b5c91a196effec2b14e225f)
  • Date: Sat, 24 Feb 2007 07:42:53 -0600

GIT changes to master quill by Andra?? Levstik <ruskie AT mages.ath.cx>:

var/lib/quill/ChangeLog | 3 +-
var/lib/quill/modules/librubyraa | 42
++++++++++++++++++---------------------
2 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit 3494aa883e1c63ba6b5c91a196effec2b14e225f
Author: Andra?? Levstik <ruskie AT mages.ath.cx>
Commit: Andra?? Levstik <ruskie AT mages.ath.cx>

rubyraa mode improvment and no more lynx dependency thanks to lynxlynxlynx
:)

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index f54fef2..5dcf61b 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,7 +1,8 @@
2007-02-24 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
* quill: added ruby-raa mode
* libcore: added ruby-raa mode
- * librubyraa: added for ruby-raa mode
+ * librubyraa: added for ruby-raa mode, error checking added in case
+ no project exist, improved it a lot with Jaka's help
* version: 0.2.2-2007-02-24

2007-02-18 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
diff --git a/var/lib/quill/modules/librubyraa
b/var/lib/quill/modules/librubyraa
index 548bfb3..3f65e08 100644
--- a/var/lib/quill/modules/librubyraa
+++ b/var/lib/quill/modules/librubyraa
@@ -7,7 +7,7 @@ function quill_raa_get_info(){
local raa_project_file
info="${1}"
raa_project_file="${2}"
- echo "$(grep "${info}:" $raa_project_file | sed -e "s/ *${info}:
*\(.*\)/\1/")"
+ grep "${info}:" $raa_project_file | sed -e "s/ *${info}: *\(.*\)/\1/"
}

function quill_raa_core(){
@@ -17,33 +17,31 @@ function quill_raa_core(){
local raa_project_file
project="$(echo $1 | tr 'A-Z' 'a-z')"
raa_project_file=${QUILL_TMP_DIR}/${project}.raa
- lynx -width=8000 \
- -nolist \
- -dump \
- http://raa.ruby-lang.org/project/$project/ > \
- $raa_project_file
+ message "Attempting to retrive project page..."
+ wget -q -O $raa_project_file.tmp \
+ http://raa.ruby-lang.org/project/$project/ || \
+ error_msg "Error: unable to fetch project page"
+ sed -e "s:<a href=\"\(.*\)\".*:\1:g" \
+ -e ":top;/<.*>/{;s/<[^<>]*>//g;t top;};/</{;N;b top;}" \
+ $raa_project_file.tmp | \
+ sed -e ":pot /:\s*$/{ N; s/\n//g; t pot}; /:$/{ b pot}" \
+ -e "/^$/d" > $raa_project_file
+ if $(head -n3 $raa_project_file | grep -q "RAA - Search") ; then
+ error_msg "Error: project not found"
+ return 1
+ fi
SPELL_SHORT_DESCRIPTION="$(quill_raa_get_info "Short description"
"$raa_project_file" )"
SPELL_LICENSE="$(quill_raa_get_info "License" "$raa_project_file" )"
SPELL_URL="$(quill_raa_get_info "Homepage" "$raa_project_file")"
SPELL_SRC_URL="$(quill_raa_get_info "Download" "$raa_project_file")"
SPELL_NAME="$project"
- ( cat $raa_project_file | grep -A99999 "Description:" ) | \
- while read line
- do
- if ! grep -q "Edit this project" <<< $line
- then
- desc="$desc $line"
- else
- echo ${desc/Description:} > ${QUILL_TMP_DIR}/${SPELL_NAME}
- return 1
- fi
- done
- SPELL_DESC_NAME="$project"
+ sed -n '/Description:/,/Edit this project/ p' \
+ $raa_project_file > ${QUILL_TMP_DIR}/${SPELL_NAME}
+ sed -i \
+ -e '1s/.*Description: *\(.*\)/\1/' \
+ -e "/.*Edit this project.*/d" \
+ ${QUILL_TMP_DIR}/${SPELL_NAME}
DEPENDSISON="DEPENDS, "
SPELL_DEPENDENCIES="ruby"
- touch ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
- echo "true" > ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
- BUILDISON="BUILD, "
- INSTALLISON="INSTALL, "

}



  • [SM-Commit] GIT changes to master quill by Andra?? Levstik (3494aa883e1c63ba6b5c91a196effec2b14e225f), Andra?? Levstik, 02/24/2007

Archive powered by MHonArc 2.6.24.

Top of Page