forked from 0x2620/pandora
PEP8
This commit is contained in:
parent
bf88243423
commit
90537f2f0e
6 changed files with 9 additions and 8 deletions
|
@ -60,11 +60,11 @@ def main():
|
||||||
parser.add_option('-l', '--timeline', dest='timeline', help='Timeline (image file to be read)')
|
parser.add_option('-l', '--timeline', dest='timeline', help='Timeline (image file to be read)')
|
||||||
parser.add_option('-i', '--icon', dest='icon', help='Icon (image file to be written)')
|
parser.add_option('-i', '--icon', dest='icon', help='Icon (image file to be written)')
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
if options.icon == None:
|
if options.icon is None:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
render_icon(options.frame, options.timeline, options.icon)
|
render_icon(options.frame, options.timeline, options.icon)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ def main():
|
||||||
parser.add_option('-f', '--frames', dest='frames', help='Poster frames (image files to be read)', default='')
|
parser.add_option('-f', '--frames', dest='frames', help='Poster frames (image files to be read)', default='')
|
||||||
parser.add_option('-o', '--icon', dest='icon', help='Icon (image file to be written)')
|
parser.add_option('-o', '--icon', dest='icon', help='Icon (image file to be written)')
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
if options.icon == None:
|
if options.icon is None:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
@ -60,6 +60,6 @@ def main():
|
||||||
|
|
||||||
render_list_icon(frames, options.icon)
|
render_list_icon(frames, options.icon)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,6 @@ def main():
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
render_poster(data, options.poster)
|
render_poster(data, options.poster)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -225,6 +225,6 @@ def main():
|
||||||
|
|
||||||
render_poster(data, options.poster)
|
render_poster(data, options.poster)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ def render_poster(data, poster):
|
||||||
drawText(poster_image, ((poster_width - text_size[0]) / 2, text_top + (text_height - text_size[1]) / 2), text, font_file, font_size, poster_color)
|
drawText(poster_image, ((poster_width - text_size[0]) / 2, text_top + (text_height - text_size[1]) / 2), text, font_file, font_size, poster_color)
|
||||||
poster_image.save(poster)
|
poster_image.save(poster)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
parser.add_option('-d', '--data', dest='data', help='json file with metadata', default=None)
|
parser.add_option('-d', '--data', dest='data', help='json file with metadata', default=None)
|
||||||
|
@ -84,6 +85,6 @@ def main():
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
render_poster(data, options.poster)
|
render_poster(data, options.poster)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,6 @@ def main():
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
render_poster(data, options.poster)
|
render_poster(data, options.poster)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue