Markdown code block format
-
Hello guys, I have a problem about using markdown + postie. The indentation is not preserved. Is there any way to make postie to preserve the indentation?
I wrote this in my Email:
Python import os from PIL import Image yourpath = os.getcwd() for root, dirs, files in os.walk(yourpath, topdown=False): for name in files: print(os.path.join(root, name)) if os.path.splitext(os.path.join(root, name))[1].lower() == ".tiff": if os.path.isfile(os.path.splitext(os.path.join(root, name))[0] + ".jpg"): print "A jpeg file already exists for %s" % name # If a jpeg is *NOT* present, create one from the tiff. else: outfile = os.path.splitext(os.path.join(root, name))[0] + ".jpg" try: im = Image.open(os.path.join(root, name)) print "Generating jpeg for %s" % name im.thumbnail(im.size) im.save(outfile, "JPEG", quality=100) except Exception, e: print e
what ends up in my blog:
Indentation gone
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Markdown code block format’ is closed to new replies.