mm_organize =========== .. py:module:: mm_organize .. autoapi-nested-parse:: Organize photos and videos based on EXIF creation dates. Photos → destination/Photos/YYYY-MM/YYYY-MM-DD_HHMMSS.ext Videos → destination/Movies/YYYY-MM/YYYY-MM-DD_HHMMSS.ext Unknown → destination/Unknown/original_name.ext Functions --------- .. autoapisummary:: mm_organize.get_exif_datetime mm_organize.organize_files mm_organize.main mm_organize.test_parse_exif_dt mm_organize.test_format_parts mm_organize.test_is_media_file Module Contents --------------- .. py:function:: get_exif_datetime(file_path) Return a ``datetime`` extracted from the file's EXIF data. .. py:function:: organize_files(source, destination, *, dry_run = False, workers = 4) Walk source recursively, locate media files, and copy them into destination. .. py:function:: main(source, destination, *, dry_run, workers) Organise media files from ``SOURCE`` into ``DESTINATION`` by EXIF date. Files that contain a usable EXIF timestamp are placed under ``Photos/YYYY-MM`` or ``Movies/YYYY-MM`` (renamed to ``DD_HHMMSS.ext``). Files without a timestamp end up in ``Unknown/`` (original name preserved). The script never falls back to the file's modification time. .. py:function:: test_parse_exif_dt() Test the _parse_exif_dt function. .. py:function:: test_format_parts() Test the _format_parts function. .. py:function:: test_is_media_file() Test the _is_media_file function.