Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 7bf104dbf63bf6c91543fb652c9f6b37 > files > 21

txt2tags-2.6-7.mga5.noarch.rpm

#! /usr/bin/env python
#
# dynartslides, a dynamic art slides generator for txt2tags
#
# Copyright (C) 2010, Florent Gallaire <fgallaire@gmail.com>
# License GNU GPLv3
#

import os, sys

if len(sys.argv) < 2:
    print "Please, we need one file as argument."
else:
    if os.name == 'posix':
        import fcntl, termios, struct
        data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, 4*'00') 
        lines, columns = struct.unpack('4H',data)[:2]
        command = 'txt2tags --slides --width=%s --height=%s -t art %s'%(columns, lines, " ".join(sys.argv[1:]))
        print command
        os.system(command)
    else:
        print "Dynamic capacities are not available on your system."