Blame Scripts/Python/Repository/init.py

2bb7c5
#!/usr/bin/python
2bb7c5
#
2bb7c5
# centos-art-cli.py - The CentOS Artwork Repository ToolBox (art)
2bb7c5
#                     command line interface.
2bb7c5
#
2bb7c5
# Copyright (C) 2009-2010 Alain Reguera Delgado
2bb7c5
#
2bb7c5
# This program is free software; you can redistribute it and/or modify
2bb7c5
# it under the terms of the GNU General Public License as published by
2bb7c5
# the Free Software Foundation; either version 2 of the License, or
2bb7c5
# (at your option) any later version.
2bb7c5
# 
2bb7c5
# This program is distributed in the hope that it will be useful, but
2bb7c5
# WITHOUT ANY WARRANTY; without even the implied warranty of
2bb7c5
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2bb7c5
# General Public License for more details.
2bb7c5
#
2bb7c5
# You should have received a copy of the GNU General Public License
2bb7c5
# along with this program; if not, write to the Free Software
2bb7c5
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2bb7c5
# USA.
2bb7c5
# 
2bb7c5
#------------------------------------------------------------
2bb7c5
# $Id: centos-art.py 6245 2010-08-12 14:44:19Z al $
2bb7c5
#-----------------------------------------------------------
2bb7c5
"""
2bb7c5
The CentOS Artwork Repository Toolbox (art) command line interface.
2bb7c5
2bb7c5
This script provides a command line interface (cli) to operate local
2bb7c5
working copies of CentOS Artwork Repository. Most of the actions this
2bb7c5
script can perform relay on CentOS Artwork Repository files and
2bb7c5
directories standard structure. The CentOS Artwork Repository standard
2bb7c5
structure is described inside the `Repo' class as docstrings. The
2bb7c5
`Repo' class is available in the repository.py file.
2bb7c5
2bb7c5
In order to make this script available along CentOS Artwork Repository
2bb7c5
you need create a link to the file art-cli.py inside /home/centos/bin/
2bb7c5
directory. For example:
2bb7c5
2bb7c5
    $ mkdir /home/centos/bin/
2bb7c5
    $ cd /home/centos/bin/
2bb7c5
    $ ln -s /home/centos/artwork/trunk/Scripts/Python/centos-art-cli.py centos-art
2bb7c5
2bb7c5
Note that we used the `centos' lower-case word as username. This is a
2bb7c5
convention[1] that let us create a common absolute path for people to
2bb7c5
store the CentOS Artwork Repository working copy. 
2bb7c5
2bb7c5
    [1:] Absolute paths are used Inkscape to import raster images
2bb7c5
    inside SVG files--well, to link them really.  If everyone
2bb7c5
    downloading a working copy of CentOS Artwork Repository uses its
2bb7c5
    one absolute path there is no way to garantee that all images
2bb7c5
    imported inside SVG design templates will be displayed correctly
2bb7c5
    in all downloaded working copies. That is because, there is no way
2bb7c5
    to garantee that everyone's working copy is placed in the same
2bb7c5
    absolute path the raster image was imported the first time. So the
2bb7c5
    absolute path name convenction is needed.
2bb7c5
2bb7c5
The centos-art-cli.py script let you to:
2bb7c5
2bb7c5
    * Render images and texts using common design models and
2bb7c5
      translations.
2bb7c5
2bb7c5
    * Navigate the repository structure.
2bb7c5
2bb7c5
    * Get information about repository structures.
2bb7c5
2bb7c5
    * Test themes.
2bb7c5
2bb7c5
"""
2bb7c5
2bb7c5
#from repository import Repo
2bb7c5
from framework import Framework
2bb7c5
2bb7c5
def main():
2bb7c5
    fw = Framework()
2bb7c5
    fw.list('Brands')
2bb7c5
2bb7c5
if __name__ == '__main__': main()