def title_from_filename(filename): if filename.endswith('.js'): filename = filename.replace('Example', '').replace('.js', '') return common.camel_to_space(filename) + ' (Node.js)' elif filename.endswith('.html'): filename = filename.replace('Example', '').replace('.html', '') return common.camel_to_space(filename) + ' (HTML)' else: raise common.GeneratorError('Invalid filename ' + filename)
def title_from_filename(filename): filename = filename.replace('Example', '').replace('.php', '') return common.camel_to_space(filename)