Dash Core  0.12.2.1
P2P Digital Currency
optimize-pngs Namespace Reference

Functions

def file_hash (filename)
 
def content_hash (filename)
 

Variables

string pngcrush = 'pngcrush'
 
string git = 'git'
 
list folders = ["src/qt/res/movies", "src/qt/res/icons", "src/qt/res/icons/crownium", "src/qt/res/icons/drkblue", "src/qt/res/icons/light", "src/qt/res/icons/trad", "src/qt/res/images", "src/qt/res/images/crownium", "src/qt/res/images/drkblue", "src/qt/res/images/light", "src/qt/res/images/trad", "share/pixmaps"]
 
 basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')
 
int totalSaveBytes = 0
 
bool noHashChange = True
 
list outputArray = []
 
 absFolder = os.path.join(basePath, folder)
 
 extension = os.path.splitext(file)[1]
 
 file_path = os.path.join(absFolder, file)
 
dictionary fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};
 
string pngCrushOutput = ""
 
 stderr
 
 oldHash = fileDict['sha256Old']
 
 newHash = fileDict['sha256New']
 

Function Documentation

◆ content_hash()

def optimize-pngs.content_hash (   filename)
Return hash of RGBA contents of image

Definition at line 17 of file optimize-pngs.py.

◆ file_hash()

def optimize-pngs.file_hash (   filename)
Return hash of raw file contents

Definition at line 12 of file optimize-pngs.py.

Variable Documentation

◆ absFolder

optimize-pngs.absFolder = os.path.join(basePath, folder)

Definition at line 33 of file optimize-pngs.py.

◆ basePath

optimize-pngs.basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')

Definition at line 27 of file optimize-pngs.py.

◆ extension

optimize-pngs.extension = os.path.splitext(file)[1]

Definition at line 35 of file optimize-pngs.py.

Referenced by AppInit2().

◆ file_path

optimize-pngs.file_path = os.path.join(absFolder, file)

Definition at line 38 of file optimize-pngs.py.

◆ fileMetaMap

dictionary optimize-pngs.fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};

Definition at line 39 of file optimize-pngs.py.

◆ folders

list optimize-pngs.folders = ["src/qt/res/movies", "src/qt/res/icons", "src/qt/res/icons/crownium", "src/qt/res/icons/drkblue", "src/qt/res/icons/light", "src/qt/res/icons/trad", "src/qt/res/images", "src/qt/res/images/crownium", "src/qt/res/images/drkblue", "src/qt/res/images/light", "src/qt/res/images/trad", "share/pixmaps"]

Definition at line 26 of file optimize-pngs.py.

◆ git

string optimize-pngs.git = 'git'

Definition at line 25 of file optimize-pngs.py.

◆ newHash

optimize-pngs.newHash = fileDict['sha256New']

Definition at line 70 of file optimize-pngs.py.

◆ noHashChange

bool optimize-pngs.noHashChange = True

Definition at line 29 of file optimize-pngs.py.

◆ oldHash

optimize-pngs.oldHash = fileDict['sha256Old']

Definition at line 69 of file optimize-pngs.py.

◆ outputArray

list optimize-pngs.outputArray = []

Definition at line 31 of file optimize-pngs.py.

◆ pngcrush

string optimize-pngs.pngcrush = 'pngcrush'

Definition at line 24 of file optimize-pngs.py.

◆ pngCrushOutput

optimize-pngs.pngCrushOutput = ""

Definition at line 42 of file optimize-pngs.py.

◆ stderr

◆ totalSaveBytes

int optimize-pngs.totalSaveBytes = 0

Definition at line 28 of file optimize-pngs.py.