twingle/server/midgard OSCOMtwingle.conf,NONE,1.1 OSCOMtwingle.xml,NONE,1.1 yamp.conf,NONE,1.1

[email protected] Fri, 14 Mar 2003 06:49:23 -0700 (MST)
Newsgroups gmane.comp.cms.oscom.twingle.cvs
Message-ID <[email protected]>
Update of /cvs/root/twingle/server/midgard
In directory alpha.oscom.org:/tmp/cvs-serv17102

Added Files:
	OSCOMtwingle.conf OSCOMtwingle.xml yamp.conf 
Log Message:
Initial commit of the Midgard Twingle server


--- NEW FILE: OSCOMtwingle.conf ---
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!-- $Id: OSCOMtwingle.conf,v 1.1 2003/03/14 13:49:21 henri Exp $ -->
<!DOCTYPE Repligard [
<!ELEMENT Repligard (database?,login?,replicate?)>

<!ELEMENT database EMPTY>
<!ATTLIST database schema CDATA #REQUIRED>
<!ATTLIST database name CDATA #REQUIRED>
<!ATTLIST database username CDATA #REQUIRED>
<!ATTLIST database password CDATA #REQUIRED>
<!ATTLIST database encoding CDATA #REQUIRED>
<!ATTLIST database blobdir CDATA #REQUIRED>

<!ELEMENT login EMPTY>
<!ATTLIST login username CDATA #REQUIRED>
<!ATTLIST login password CDATA #REQUIRED>

<!ELEMENT replicate (resource*)>
<!ATTLIST replicate all (yes|no) 'no'>

<!ELEMENT resource EMPTY>
<!ATTLIST resource type CDATA #IMPLIED>
<!ATTLIST resource id CDATA #IMPLIED>
<!ATTLIST resource guid CDATA #IMPLIED>
]>
<Repligard xmlns="http://www.midgard-project.org/repligard/1.4">
        <include name="/usr/local/etc/repligard_devel_database.conf" />
	<replicate>
          <!-- Twingle template root page -->
          <resource guid="1db3421fa5009f7b67eeda20f979c613" />
          <!-- OSCOMtwingle snippetdir -->
          <resource guid="4a61b962d01801f11587a825fdbec1b5" />
	</replicate>
</Repligard>

--- NEW FILE: OSCOMtwingle.xml ---
<?xml version="1.0" encoding='ISO-8859-1'?>
<!-- $Id: OSCOMtwingle.xml,v 1.1 2003/03/14 13:49:21 henri Exp $ -->
<Database xmlns="http://www.midgard-project.org/repligard/1.4">
<snippet id="14a2a1b4257cf97daf79348419e68046" changed="20030314131909">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   URL parser system

   Copyright (c) 2001,2002 Nemein Oy <info-ZpG/[email protected]>
   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-13: Copied base logic from NemeinNavBar (bergie)

*/

$basearray=array();
$basearray[0]=$twingle['root_topic'];
$topic=$twingle['root_topic'];
$t=$argc;
$i=1;
$notfound = 0;
while ($i <= $t) {
  $basearray[$i]=mgd_get_topic_by_name($basearray[$i-1]->id, $argv[$i-1]);
  if (!(is_object($basearray[$i]))) {
    // The argument is not a topic. Is it an article?
    $article=mgd_get_article_by_name($basearray[$i-1]->id, $argv[$i-1]); 
    if ($article) {
      $obj[type]="article"; $obj[id]=$article->id;
      $title=$article->title;
      $topic=$subtopics[$i-1];
    }
  } else {
    $topic=$basearray[$i];
    $obj[type]="topic"; $obj[id]=$topic->id;
    $title=$topic->name;
  }

  if (!$article && ($argc>(count($basearray)-1))) {
    if ($argv[$argc-1] != "index") {
      header('404 Not Found');
      $notfound = 1;
    }
  }
  $i++;
}

?>]]></code>
	<up>3d1a4829dd64482031f04eb0a7bb8d65</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-14 13:19:09</revised>
	<revision>14</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[URLparser]]></name>
	<created>2003-03-13 15:39:45</created>
</snippet>
<snippet id="152ccce2357ed909a27a3ea8afb19fc5" changed="20030314133327">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   RSD generator

   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-14: initially created (bergie)

*/

header ('Content-Type: text/xml;');
echo "<?xml version=\"1.0\"?>\n"; ?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://www.purl.org/dc/1.1#"
xmlns:oscom="http://www.oscom.org/rdf#">
    <service>
        <engineName>Midgard</engineName>
        <engineLink>http://www.midgard-project.org/</engineLink>
        <homePageLink><?php echo $twingle['site_url']; ?></homePageLink>
        <apis>
                <api name="Twingle" preferred="false" apiLink="<?php echo $twingle['dav_url']; ?>" blogID="">
                    <settings>
                        <dc:title><?php echo $twingle['root_topic']->name; ?></dc:title>
                        <oscom:contentsurl><?php echo $twingle['dav_url']; ?>/rdf/</oscom:contentsurl>
                    </settings>
                 </api>
        </apis>
    </service>
</rsd>]]></code>
	<up>3d1a4829dd64482031f04eb0a7bb8d65</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-14 13:33:27</revised>
	<revision>8</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[RSD]]></name>
	<created>2003-03-14 13:26:15</created>
</snippet>
<page id="1db3421fa5009f7b67eeda20f979c613" changed="20030314151134">
	<title><![CDATA[Twingle server]]></title>
	<up></up>
	<info>auth,active</info>
	<style></style>
	<author>f6b665f1984503790ed91f39b11b5392</author>
	<changed>2003-03-14</changed>
	<name><![CDATA[template_twingle]]></name>
	<content><![CDATA[<?php

mgd_include_snippet("/OSCOMtwingle/init");
mgd_include_snippet($twingle['include_path']."URLparser");
mgd_include_snippet($twingle['include_path']."ContentHandler");

?>]]></content>
</page>
<snippet id="29faee58ab3b5b75d4bab55a8b72a1a6" changed="20030314133401">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   Configuration system

   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-14: initially created (bergie)

*/

$sitegroup = mgd_get_sitegroup($midgard->sitegroup);

if ($sitegroup) {

  // Saving logic
  if (is_array($twingleconfig)) {
    while (list($key,$val) = each($twingleconfig)) {
      $sitegroup->parameter("TwingleConfiguration",$key,$val);
    }
  }

  // Available options, param name and label
  $config_array = Array(
    "URLtype" => "URL mapping structure (default: NNB)",
    "root_topic" => "Root topic GUID",
    "site_url" => "Site root URL (without trailing slash)",
    "dav_url" => "Twingle server root URL (without trailing slash)"
  );

  ?><h2>Configure &(sitegroup.name);</h2>
   <p>You can use this interface to set up some Twingle server configuration variables
   specific to your setup. If you don't set up a value to some field, the default will
    be used instead.</p>
  <?php

  echo "<form method=\"POST\">\n";
  echo "<table border=\"0\">\n";
  while (list($key,$val) = each($config_array)) {
   
    $param = $sitegroup->parameter("TwingleConfiguration",$key);
    echo "<tr><td>$val</td><td><input type=\"text\" name=\"twingleconfig[$key]\" value=\"$param\"></td></tr>\n";
  }
  echo "<tr><td>&nbsp;</td><td><input type=\"submit\" value=\"Save\"></td></tr>\n";
  echo "</table>\n";
  echo "</form>\n";

}
?>]]></code>
	<up>4a61b962d01801f11587a825fdbec1b5</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-14 13:34:01</revised>
	<revision>16</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[configure]]></name>
	<created>2003-03-14 11:59:30</created>
</snippet>
<snippetdir id="3d1a4829dd64482031f04eb0a7bb8d65" changed="20030314115819">
	<up>4a61b962d01801f11587a825fdbec1b5</up>
	<description/>
	<name><![CDATA[NNB]]></name>
	<owner></owner>
</snippetdir>
<snippet id="3f57c03df2833f720e64098c9506c313" changed="20030314150448">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   RDF generator

   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-13: initially created (bergie)
      2003-03-14: added support for multiple levels of content (bergie)

*/

header ('Content-Type: text/xml;');
echo "<?xml version=\"1.0\"?>\n"; ?>
<rdf:RDF xmlns:nc="http://home.netscape.com/NC-rdf#"
         xmlns:dc="http://www.purl.org/dc/1.1#"
         xmlns:oscom="http://www.oscom.org/rdf#"
         xmlns:D="http://www.webdav.org/rdf#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<?php

function generate_nnb_uri($id,$type,$path = "") {

  global $twingle;

  if ($type == 'article') {

    $article = mgd_get_article($id);
    $article_name = rawurlencode($article->name);
    $path = "/".$article_name.".html";
    if ($article->topic == $twingle['root_topic']->id) {
      return $path;
    } else {
      return generate_nnb_uri($article->topic,'topic',$path);
    }

  } elseif ($type == 'topic') {

    $topic = mgd_get_topic($id);

    $topic_name = rawurlencode($topic->name);
    $path = "/".$topic_name.$path;
    if ($topic->up == $twingle['root_topic']->id || $topic->id == $twingle['root_topic']->id) {
      return $path;
    } else {
      return generate_nnb_uri($topic->up,'topic',$path);
    }
  }

}

function rdf_article($id) {

  global $twingle;

  $article = mgd_get_article($id);
  $article_guid = $article->guid();
  $article_uri = generate_nnb_uri($article->id,'article');

  ?>
<rdf:Description about="&(article_guid);@Midgard">
  <dc:title>&(article.title);</dc:title>
  <dc:creator rdf:resource="urn:twingle:site:oscomorg:pauleveritt"/>
  <dc:description>&(article.abstract);</dc:description>
  <dc:subject></dc:subject>
  <oscom:resourcetype rdf:resource="urn:oscom:resourcetypes:article"/>
  <D:getlastmodified><?php echo date("l, j-M-y H:i:s T",$article->revised); ?></D:getlastmodified>
  <oscom:sourceurl><?php echo $twingle['dav_url']; ?>&(article_uri);</oscom:sourceurl>
  <oscom:previewurl><?php echo $twingle['site_url']; ?>&(article_uri);</oscom:previewurl>
  <oscom:saveurl><?php echo $twingle['dav_url']; ?>&(article_uri);</oscom:saveurl>
</rdf:Description>
  <?php

}

function rdf_topic($id) {

  global $twingle;

  $topic = mgd_get_topic($id);
  $topic_guid = $topic->guid();
  $topic_uri = generate_nnb_uri($topic->id,'topic');
  
  ?>
<rdf:Description about="&(topic_guid);@Midgard">
  <dc:title>&(topic.name);</dc:title>
  <dc:creator rdf:resource="urn:twingle:site:oscomorg:pauleveritt"/>
  <dc:description>&(topic.abstract);</dc:description>
  <dc:subject></dc:subject>
  <oscom:resourcetype rdf:resource="urn:oscom:resourcetypes:article"/>
  <D:getlastmodified><?php echo date("l, j-M-y H:i:s T",$topic->revised); ?></D:getlastmodified>
  <oscom:sourceurl><?php echo $twingle['dav_url']; ?>&(topic_uri);/index.html</oscom:sourceurl>
  <oscom:previewurl><?php echo $twingle['site_url']; ?>&(topic_uri);/</oscom:previewurl>
  <oscom:saveurl><?php echo $twingle['dav_url']; ?>&(topic_uri);/index.html</oscom:saveurl>
  <?php
  $topics = mgd_list_topics($topic->id);
  $articles = mgd_list_topic_articles($topic->id);
  if ($topics || $articles) { ?>
    <nc:subitems>
      <rdf:Seq>
        <?php
        if ($topics) {
          while ($topics->fetch()) {
            $topics_guid = $topics->guid();
            ?>
            <rdf:li resource="&(topics_guid);@Midgard"/> 
            <?php
          }
        }
        if ($articles) {
          while ($articles->fetch()) {
            $articles_guid = $articles->guid();
            ?>
            <rdf:li resource="&(articles_guid);@Midgard"/> 
            <?php
          }
        }
        ?>
      </rdf:Seq>
    </nc:subitems>
  <?php } ?>
</rdf:Description>
  <?php

      $topics = mgd_list_topics($topic->id);
      if ($topics) {
        while ($topics->fetch()) {
          rdf_topic($topics->id);
        }
      }

      $articles = mgd_list_topic_articles($topic->id);
      if ($articles) {
        while ($articles->fetch()) {
          rdf_article($articles->id);
        }
      }

}


if ($twingle['root_topic']) { ?>
  <rdf:Description about="urn:twingle:sites:<?php echo $twingle['dav_url']; ?>/rdf/">
      <?php
  $topics = mgd_list_topics($twingle['root_topic']->id);
  $articles = mgd_list_topic_articles($twingle['root_topic']->id);
  if ($topics || $articles) { ?>
    <nc:subitems>
      <rdf:Seq>
        <?php
        if ($topics) {
          while ($topics->fetch()) {
            $topics_guid = $topics->guid();
            ?>
            <rdf:li resource="&(topics_guid);@Midgard"/> 
            <?php
          }
        }
        if ($articles) {
          while ($articles->fetch()) {
            $articles_guid = $articles->guid();
            ?>
            <rdf:li resource="&(articles_guid);@Midgard"/> 
            <?php
          }
        }
        ?>
      </rdf:Seq>
    </nc:subitems>
  </rdf:Description>
  <?php } 

      $topics = mgd_list_topics($twingle['root_topic']->id);
      if ($topics) {
        while ($topics->fetch()) {
          rdf_topic($topics->id);
        }
      }

      $articles = mgd_list_topic_articles($twingle['root_topic']->id);
      if ($articles) {
        while ($articles->fetch()) {
          rdf_article($articles->id);
        }
      }

  } ?>
</rdf:RDF>]]></code>
	<up>3d1a4829dd64482031f04eb0a7bb8d65</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-14 15:04:48</revised>
	<revision>30</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[RDF]]></name>
	<created>2003-03-14 11:57:09</created>
</snippet>
<snippetdir id="4a61b962d01801f11587a825fdbec1b5" changed="20030313153910">
	<up></up>
	<description><![CDATA[OSCOM Twingle server implementation for Midgard]]></description>
	<name><![CDATA[OSCOMtwingle]]></name>
	<owner></owner>
</snippetdir>
<page id="7902fe0a92cf1f49961efa646f57bc02" changed="20030314151414">
	<title><![CDATA[RSD]]></title>
	<up>1db3421fa5009f7b67eeda20f979c613</up>
	<info/>
	<style></style>
	<author>f6b665f1984503790ed91f39b11b5392</author>
	<changed>2003-03-14</changed>
	<name><![CDATA[rsd]]></name>
	<content><![CDATA[<?php
mgd_include_snippet("/OSCOMtwingle/init");
mgd_include_snippet($twingle['include_path']."RSD");
?>]]></content>
</page>
<snippet id="7c0a284c1a16fb3c8951b1a4c71a9f80" changed="20030314115753">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   Content handler system

   Copyright (c) 2001,2002 Nemein Oy <info-ZpG/[email protected]>
   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-13: initially created (bergie)

*/

if ($_SERVER['REQUEST_METHOD'] == "DELETE") {
  // We should delete the content object
  if ($article) {
    if ($article->delete()) {
      header("HTTP/1.1 200 OK");
      //echo "<h1>Error 200: OK</h1>\n";
      //echo "<p>Article was deleted.</p>\n";
      exit();
    } else {
      header("HTTP/1.1 500 Internal Server Error");
      echo "<h1>Error 500: Internal server error</h1>\n";
      echo "<p>Failed to delete article, reason ".mgd_errstr().".</p>\n";
      exit();
    }
  } elseif ($topic) {
    if ($topic->delete()) {
      header("HTTP/1.1 200 OK");
      //echo "<h1>Error 200: OK</h1>\n";
      //echo "<p>Topic was deleted.</p>\n";
      exit();
    } else {
      header("HTTP/1.1 500 Internal Server Error");
      echo "<h1>Error 500: Internal server error</h1>\n";
      echo "<p>Failed to delete topic, reason ".mgd_errstr().".</p>\n";
      exit();
    }
  } else {
    echo "<h1>Error 404: not found</h1>\n";
  }

} elseif ($_SERVER['REQUEST_METHOD'] == "PUT") {

  /*
  // Debugging stuff
  ob_start();
  phpinfo();
  $debugdata = ob_get_contents();
  $log = fopen("/tmp/davlog/".time(),"w");
  fwrite($log,$debugdata);
  fclose($log);
  */

  // We should update/create the content object

  $putdata = fopen("php://input","rb");
  while(!feof($putdata)) {
    $content = $content.fread($putdata, 4096);
  }

  if ($content) {
    if ($article) {
      // We're updating an article's content
      $article->content = $content;
      if ($article->update()) {
        header("HTTP/1.1 200 OK");
        //echo "<h1>Error 200: OK</h1>\n";
        //echo "<p>Article was updated.</p>\n";
        exit();
      } else {
        header("HTTP/1.1 500 Internal Server Error");
        echo "<h1>Error 500: Internal server error</h1>\n";
        echo "<p>Failed to update article, reason ".mgd_errstr().".</p>\n";
        exit();
      }
    } elseif ($topic) {
      if ($notfound) {
        // We're creating a new article
        $article = mgd_get_article();
        $article->topic = $topic->id;
        $article->name = $argv[$argc-1];
        $article->title = $argv[$argc-1];
        $article->content = $content;
        $article->author = $midgard->user;
        if ($article->create()) {
          header("HTTP/1.1 200 OK");
          //echo "<h1>Error 200: OK</h1>\n";
          //echo "<p>Article was created.</p>\n";
          exit();
        } else {
          header("HTTP/1.1 500 Internal Server Error");
          echo "<h1>Error 500: Internal server error</h1>\n";
          echo "<p>Failed to create article, reason ".mgd_errstr().".</p>\n";
          exit();
        }
      } else {
        // We're updating an topic's content
        $topic->description = $content;
        if ($topic->update()) {
          header("HTTP/1.1 200 OK");
          //echo "<h1>Error 200: OK</h1>\n";
          //echo "<p>Topic was updated.</p>\n";
          exit();
        } else {
          header("HTTP/1.1 500 Internal Server Error");
          echo "<h1>Error 500: Internal server error</h1>\n";
          echo "<p>Failed to update topic, reason ".mgd_errstr().".</p>\n";
          exit();
        }
      }
    } else {
      echo "<h1>Error 404: not found</h1>\n";
    }
  } else {
    header("HTTP/1.1 400 Bad request");
    echo "<h1>Error 400: Bad request</h1>\n";
    echo "<p>No content with the request.</p>\n";
    exit();
  }

} else {
  // We should display the content object

  if ($article) {
    echo $article->content;
  } elseif ($topic && !$notfound) {
    echo $topic->description;
  } else {
    echo "<h1>Error 404: not found</h1>\n";
  }

}
?>]]></code>
	<up>3d1a4829dd64482031f04eb0a7bb8d65</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-13 17:13:52</revised>
	<revision>32</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[ContentHandler]]></name>
	<created>2003-03-13 15:47:20</created>
</snippet>
<page id="817fea2795b79cb7a876cfef2c58d731" changed="20030314151301">
	<title><![CDATA[RDF]]></title>
	<up>1db3421fa5009f7b67eeda20f979c613</up>
	<info/>
	<style></style>
	<author>f6b665f1984503790ed91f39b11b5392</author>
	<changed>2003-03-14</changed>
	<name><![CDATA[rdf]]></name>
	<content><![CDATA[<?php
mgd_include_snippet("/OSCOMtwingle/init");
mgd_include_snippet($twingle['include_path']."RDF");
?>]]></content>
</page>

<page id="a8e949395314b511f741f7e4b5d58d8e" changed="20030314151220">
	<title><![CDATA[Configuration]]></title>
	<up>1db3421fa5009f7b67eeda20f979c613</up>
	<info>auth</info>
	<style></style>
	<author>f6b665f1984503790ed91f39b11b5392</author>
	<changed>2003-03-14</changed>
	<name><![CDATA[config]]></name>
	<content><![CDATA[<?php
mgd_include_snippet("/OSCOMtwingle/configure");
?>]]></content>
</page>
<snippet id="d23dcde2cabdd4b1d1fdacb91985532e" changed="20030314132932">
	<code><![CDATA[<?php
/* 
   Midgard Twingle Server
   Initialization

   Copyright (c) 2003 OSCOM <www.oscom.org>

   Henri Bergius <[email protected]>

   Changes:
      2003-03-14: initially created (bergie)

*/

$twingle['sitegroup'] = mgd_get_sitegroup($midgard->sitegroup);

if ($twingle['sitegroup']) {
  $twingle['URLtype'] = $twingle['sitegroup']->parameter("TwingleConfiguration","URLtype");
  if (!$twingle['URLtype']) {
    $twingle['URLtype'] = "NNB";
  }
  $twingle['include_path'] = "/OSCOMtwingle/".$twingle['URLtype']."/";

  $twingle['root_topic_guid'] = $twingle['sitegroup']->parameter("TwingleConfiguration","root_topic");
  if ($twingle['root_topic_guid']) {
    $twingle['root_topic'] = mgd_get_object_by_guid($twingle['root_topic_guid']);
  }

  $twingle['site_url'] = $twingle['sitegroup']->parameter("TwingleConfiguration","site_url");
  $twingle['dav_url'] = $twingle['sitegroup']->parameter("TwingleConfiguration","dav_url");

}
?>]]></code>
	<up>4a61b962d01801f11587a825fdbec1b5</up>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<revised>2003-03-14 13:29:32</revised>
	<revision>12</revision>
	<author><![CDATA[2]]></author>
	<doc/>
	<revisor>f6b665f1984503790ed91f39b11b5392</revisor>
	<name><![CDATA[init]]></name>
	<created>2003-03-14 11:58:34</created>
</snippet>
<person id="f6b665f1984503790ed91f39b11b5392" changed="19980101000000">
	<birthdate><![CDATA[0000-00-00]]></birthdate>
	<city/>
	<department></department>
	<office>0</office>
	<topic></topic>
	<img></img>
	<info>homepage,email,extra</info>
	<homepage><![CDATA[http://www.midgard-project.org/]]></homepage>
	<email><![CDATA[[email protected]]]></email>
	<extra><![CDATA[Default administrator account for Midgard]]></extra>
	<creator>f6b665f1984503790ed91f39b11b5392</creator>
	<lastname><![CDATA[Administrator]]></lastname>
	<firstname><![CDATA[Midgard]]></firstname>
	<handphone/>
	<homephone/>
	<pgpkey/>
	<postcode/>
	<workphone/>
	<subtopic></subtopic>
	<created>0000-00-00 00:00:00</created>
	<username></username>
	<password></password>
	<street/>
</person>


</Database>

--- NEW FILE: yamp.conf ---
#!/bin/sh
##########################################################################
# OSCOMtwingle yamp configuration
##########################################################################
# VARIABLES

PACKAGE_NAME="OSCOMtwingle"
VERSION="0.1"
PACKAGES="OSCOMtwingle"
OTHER_FILES=""

ALL_COMMANDS="xml package"

REPLIGARD="repligard"
REPLIGARD_PARAM="-p -a"
REPLIGARD_CONFIG="-c"

CVS="cvs"

CONFIG_VERSION=1

##########################################################################
# HELPER FUNCTION extract-custom-op
extractcustomop() {
	if [ $# = 0 ]; then
		echo "YAMP $VERSION ERROR:"
		echo "Usage: extract-custom-op {xml file}"
		exit 127
	fi

	case "$1" in
		*)
                	sort_by_guid.pl $1
			clean_linefeeds.pl $1
			clean_user_references.pl $1
                        remove_grps.pl $1
                        remove_sg0_admin.pl $1
                        clean_group_references.pl $1
		;;
	esac
}