oxtimeline/oximage/list_icon.py

21 lines
618 B
Python
Raw Normal View History

2010-09-17 14:40:10 +00:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import sys
from optparse import OptionParser
from imagetools import render_list_icon
def main():
parser = OptionParser()
2010-09-17 15:43:01 +00:00
parser.add_option('-f', '--frames', dest='frames', help='Poster frames (image files to be read)', default='')
2010-09-17 14:40:10 +00:00
parser.add_option('-i', '--icon', dest='icon', help='Icon (image file to be written)')
(options, args) = parser.parse_args()
2010-09-17 15:43:01 +00:00
if options.icon == None:
2010-09-17 14:40:10 +00:00
parser.print_help()
sys.exit()
2010-09-17 15:43:01 +00:00
frames = options.frames.replace(', ', ',').split(',')
render_list_icon(frames, opt.icon)