コード例 #1
0
ファイル: import_tracks.py プロジェクト: shish/KaraKara
def walk_local(uri):
    for root, dirs, files in os.walk(uri):
        for json_filename in [f for f in files if get_fileext(f)=='json']:
            absolute_filename = os.path.join(root         , json_filename)
            #relative_path = root.replace(uri,'')
            #relative_filename = os.path.join(relative_path, json_filename)
            with open(absolute_filename, 'r') as file:
                import_json_data(file, absolute_filename)
コード例 #2
0
def video_mime_type(attachment):
    return video_fileext_to_mime_types.get(get_fileext(attachment['location']),'mp4')
コード例 #3
0
def video_mime_type(attachment):
    return video_fileext_to_mime_types.get(get_fileext(attachment['location']),
                                           'mp4')