maxwu/cistat

View on GitHub
src/cistat/img/iterm2_imgcat.py

Summary

Maintainability
A
35 mins
Test Coverage
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Show Image inline with iTerm2
  The extended protocol to show image in terminal window is described in iterm2 imgcat document as reference item.
  A base64 encoded string will be interpreted as a picture with configured properties.

 .. moduleauthor:: Max Wu <http://maxwu.me>
 .. Reference:: https://www.iterm2.com/documentation-images.html 
"""

import os
from base64 import b64encode
from sys import stdout


def imgcat(width=None, height=None, preserve_aspect_ratio=False, inline=True, img_path=None):
    pass

if __name__ == "__main__":
    pass