Skip to Content.
Sympa Menu

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

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 (3b354b7fdf58f8608deaa0d4358a2fafd4b83baa)
  • Date: Fri, 18 Aug 2006 12:39:01 -0500

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

usr/bin/quill | 11 +++++++
var/lib/quill/ChangeLog | 8 +++++
var/lib/quill/modules/libbuild | 26 ++++++++++-------
var/lib/quill/modules/libcore | 1
var/lib/quill/modules/libdepends | 10 ++++--
var/lib/quill/modules/libperlcpan | 56
++++++++++++++++++++++++++++++++++++++
var/lib/quill/version | 2 -
7 files changed, 100 insertions(+), 14 deletions(-)

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

New mode perlcpan

diff --git a/usr/bin/quill b/usr/bin/quill
index 69a013e..180bdc8 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -58,6 +58,12 @@ while [ -n "$1" ]; do
quill_help 101
export QUILL_FMXML_MODE="on"; export QUILL_FMXML_PARAM="$2"
shift 2 ;;
+ --perlcpan|-c)
+ [[ -z $2 ]] &&
+ message "${PROBLEM_COLOR}Missing parameter$DEFAULT_COLOR"
&&
+ quill_help 101
+ export QUILL_CPAN_MODE="on"; export QUILL_CPAN_PARAM="$2"
+ shift 2 ;;
--apprentice|-a) export QUILL_MODE="apprentice"; shift 1 ;;
--mage|-m) export QUILL_MODE="mage"; shift 1 ;;
--wizard|-w) export QUILL_MODE="wizard"; shift 1 ;;
@@ -107,6 +113,11 @@ then
QUILL_FMXML_SPELL="$QUILL_FMXML_PARAM"
quill_fmxml_core $QUILL_FMXML_PARAM
fi
+ if [[ "${QUILL_CPAN_MODE}" == "on" ]]
+ then
+ QUILL_CPAN_SPELL="$QUILL_CPAN_PARAM"
+ quill_cpan_core $QUILL_CPAN_PARAM
+ fi

query_spell_name
query_spell_source_url
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 6fefa2d..fbd96d2 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-18 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * quill: added perlcpan mode
+ * libbuild: added minor fixes for perlcpan mode
+ * libcore: added perlcpan option to help
+ * libdepends: minor fixes, now it can be predefined
+ * libperlcpan: the main module
+ * version: new version 0.1.6
+
2006-08-11 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
* quill: addded quill_set_executable_bit to set all the relevant
files to +x
* libcore: added quill_set_executable_bit to set all the relevant
files to
diff --git a/var/lib/quill/modules/libbuild b/var/lib/quill/modules/libbuild
index 62a14a2..e3ffa25 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -6,21 +6,27 @@ #---
BUILDISON=""

function query_spell_build() {
- if query "Will you be adding a custom BUILD file:" "n"
- then
- BUILDISON="BUILD, "
+ if [[ "$QUILL_CPAN_MODE" != "on" ]]; then
+ if query "Will you be adding a custom BUILD file:" "n"
+ then
+ BUILDISON="BUILD, "
+ fi
fi
}

function add_build() {
- touch BUILD
- if query "Do you want the default_build function dumped into the BUILD
file" "n"
- then
- (declare -f real_default_build | \
- tail -n -2 | head -n 1 | sed 's:\(.\{20,41\}\)--:\1\\\n --:g' | \
- sed "s:&&:\&\&\n:g") > BUILD
+ if [[ "$QUILL_CPAN_MODE" == "on" ]]; then
+ cp ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
else
- echo "default_build" > BUILD
+ touch BUILD
+ if query "Do you want the default_build function dumped into the BUILD
file" "n"
+ then
+ (declare -f real_default_build | \
+ tail -n -2 | head -n 1 | sed 's:\(.\{20,41\}\)--:\1\\\n --:g' | \
+ sed "s:&&:\&\&\n:g") >> BUILD
+ else
+ echo "default_build" >> BUILD
+ fi
fi
$EDITOR BUILD
}
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index e99a65d..24ce00f 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -208,6 +208,7 @@ USAGE: quill [OPTIONS]

OPTIONS:
--fmxml, -f <SPELL> get spell data from Freshmeat if possible
+ --perlcpan, -c <SPELL> get spell data from Perl-CPAN if
possible
--apprentice, -a apprentice mode (default)
--mage, -m mage mode (advanced)
--wizard, -w wizard mode (expert)(DOES NOTHING FOR NOW)
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index c4f7a9e..311bc5f 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -3,10 +3,14 @@ ## @Synopsis libdepends
#---

function query_spell_dependencies() {
- message "${QUERY_COLOR}Please enter the dependencies(non optional) \
+ if ! [[ $SPELL_DEPENDENCIES ]] ||
+ ! query "Are \"${SPELL_DEPENDENCIES}\" the proper dependencies for this
spell" y
+ then
+ message "${QUERY_COLOR}Please enter the dependencies(non optional) \
of the spell if any:${DEFAULT_COLOR}"
- read "SPELL_DEPENDENCIES"
- SPELL_DEPENDENCIES=$(tr ',' ' ' <<< "$SPELL_DEPENDENCIES")
+ read "SPELL_DEPENDENCIES"
+ SPELL_DEPENDENCIES=$(tr ',' ' ' <<< "$SPELL_DEPENDENCIES")
+ fi
}

function query_spell_optional_dependencies() {
diff --git a/var/lib/quill/modules/libperlcpan
b/var/lib/quill/modules/libperlcpan
new file mode 100644
index 0000000..871413d
--- /dev/null
+++ b/var/lib/quill/modules/libperlcpan
@@ -0,0 +1,56 @@
+#---
+## @Synopsis Perl-cpan module to generate spells from perl-cpan metadata
+#---
+
+function quill_get_cpan_meta()
+{
+ if [[ $FORCE_CPAN_DOWNLOAD == on ]] ||
+ [ ! -f $QUILL_TMP_DIR/02packages.details.txt.gz ] ||
+ [ ! -f $QUILL_TMP_DIR/03modlist.data.gz ]
+ then
+ cd $QUILL_TMP_DIR
+ wget -O 02packages.details.txt.gz
ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
+ wget -O 03modlist.data.gz
ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
+ fi
+ eval QUILL_CPAN_INFO="( $(zgrep -w "$1"
$QUILL_TMP_DIR/02packages.details.txt.gz) )"
+ eval QUILL_CPAN_METADATA="( $(zgrep -w -B1 -A9 "$1"
$QUILL_TMP_DIR/03modlist.data.gz | tr -d "[]" | sed 's:,$::g' ) )"
+}
+
+function quill_cpan_core()
+{
+ quill_get_cpan_meta $1
+ SPELL_NAME="${1/::/-}"
+ SPELL_SRC_URL="http://www.cpan.org/authors/id/${QUILL_CPAN_INFO[2]}";
+ SPELL_VERSION="${QUILL_CPAN_INFO[1]}"
+ SPELL_SHORT_DESCRIPTION="${QUILL_CPAN_METADATA[6]}"
+ SPELL_LICENSE="ART"
+
SPELL_URL="http://search.cpan.org/~${QUILL_CPAN_METADATA[7]}/${SPELL_NAME}/";
+ local description
+ description="${QUILL_CPAN_METADATA[6]}"
+ SPELL_NAME="$(echo $SPELL_NAME | tr "A-Z" "a-z")"
+ echo $description > ${QUILL_TMP_DIR}/${SPELL_NAME}
+ BUILDISON="BUILD, "
+ touch ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
+ echo "default_perl_build" > ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
+ DEPENDSISON="DEPENDS, "
+ SPELL_DEPENDENCIES="perl"
+}
+
+#---
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---
+
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 9faa1b7..c946ee6 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.1.5
+0.1.6



  • [SM-Commit] GIT changes to master quill by Andra?? Levstik (3b354b7fdf58f8608deaa0d4358a2fafd4b83baa), Andra?? Levstik, 08/18/2006

Archive powered by MHonArc 2.6.24.

Top of Page