This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright 2018 Hung-Te Lin. All rights reserved. | |
# Use of this source code is governed by MIT license. | |
"""A program to decrypt mega://enc2?.... link. | |
Inspired from https://github.com/denysvitali/megadecrypter | |
""" | |
import base64 | |
import binascii |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
from PIL import Image | |
LRCROP = 600 | |
def process(fpath): | |
im = Image.open(fpath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from PIL import Image | |
import sys | |
def convert(fn): | |
with Image.open(fn) as im: | |
new_name = fn.rpartition('.')[0] + '.jpg' | |
im.save(new_name) |