Blame Scripts/Python/centos-art/centos-art.py

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