Changeset 0272b16 for src


Ignore:
Timestamp:
Jul 20, 2016, 9:22:40 PM (10 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
e82ec64
Parents:
c53f31a
Message:

Fixed splash screen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/daemon/gnuboat-splashscreen

    rc53f31a r0272b16  
    3030  imageBlackWhite = imageResized.convert("1", dither=Image.FLOYDSTEINBERG)
    3131  epd.display(imageBlackWhite)
     32  epd.update()
     33
     34def usage():
     35  print "Usage of gnuboat-splashscreen:"
     36  print "  gnuboat-splashscreen [-h] -i PATH_TO_IMAGE_TO_DISPLAY"
     37  print ""
     38  print "  -h --help    Print this help"
     39  print "  -i --image   Path to the image, which should be displayed"
     40  sys.exit()
    3241
    3342def main(argv):                         
    … …  
    3948    sys.exit(2)
    4049
     50  for option, argument in opts:
     51    if option == ("-h", "--help"):
     52      usage()
     53      sys.exit()
     54    elif option in ("-i", "--image"):
     55       image = argument
     56    else:
     57      assert False, "unhandled option"
     58
    4159  if not os.path.exists(image):
     60    print "Image %s not found" % image
     61    print ""
    4262    usage()
    4363    sys.exit(2)
Note: See TracChangeset for help on using the changeset viewer.