Package ternate :: Module cli
[hide private]
[frames] | no frames]

Module cli

source code

cli.py

Command-line tool for creating FOAF and homepages for Gentoo Linux Developers

Author: Rob Cakebread <pythonhead@gentoo.org>

License : GPL-2

Classes [hide private]
  Ternate
`Ternate` class
Functions [hide private]
 
create_foaf_file(ldap, friends=[])
Serialize FOAF
source code
 
add_foaf_node(graph, FOAF, ldap)
Create a BNode for a Person
source code
 
get_ldap_info(ldap_file)
Parses the output of perl_ldap and creates a dictionary with the info we want to use in FOAF
source code
 
ldap_to_foaf(ldap_file)
Get a dictionary of developer LDAP metadata and return a FOAF rendering
source code
 
foaf_to_guidexml(foaf_path)
Run an XSLT transform of foaf.rdf with developer.xsl stylesheet and get nice Gentoo GuideXML output
source code
 
ternate_version()
Print ternate version
source code
 
main()
Let's do it.
source code
Variables [hide private]
  __revision__ = ''
  FOAF = rdflib.URIRef('http://xmlns.com/foaf/0.1/')
  RDFS = rdflib.URIRef('http://www.w3.org/2000/01/rdf-schema#')
  DOAP = rdflib.URIRef('http://usefulinc.com/ns/doap#')
  GENTOO = rdflib.URIRef('http://www.gentoo.org/ns/gentoo#')
  HERD = rdflib.URIRef('http://www.gentoo.org/ns/herd#')
  FOAF_XSL = '<?xml version="1.0"?>\n<xsl:stylesheet xmlns:xsl="...
Function Details [hide private]

add_foaf_node(graph, FOAF, ldap)

source code 

Create a BNode for a Person

TODO: Create mbox_sha1sum checksum from devname@gentoo.org
      Is there a birthday on Gentoo's LDAP?


Variables Details [hide private]

FOAF_XSL

Value:
'''<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns\
:doap="http://usefulinc.com/ns/doap#" xmlns:herd="http://www.gentoo.or\
g/ns/herd#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xm\
lns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xm\
lns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" version\
="1.0" xml:lang="en" xmlns:air="http://www.megginson.com/exp/ns/airpor\
ts#" xmlns:wn="http://xmlns.com/wordnet/1.6/" xmlns:contact="http://ww\
...