View remove-orphan-raws.py
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
Tool to detect and delete orphan raw files | |
""" | |
from __future__ import unicode_literals, print_function |
View multireplace.py
def multireplace(string, replacements): | |
""" | |
Given a string and a replacement map, it returns the replaced string. | |
:param str string: string to execute replacements on | |
:param dict replacements: replacement dictionary {value to find: value to replace} | |
:rtype: str | |
""" | |
# Place longer ones first to keep shorter substrings from matching where the longer ones should take place |