gopro-rename icon indicating copy to clipboard operation
gopro-rename copied to clipboard

FEATURE directory name as file prefix

Open manuerwin opened this issue 7 years ago • 5 comments

Thought it would be useful to have a feature where the renamed file has the directory name as the prefix.

manuerwin avatar Apr 28 '18 10:04 manuerwin

After reading the docs two times I still do not understand what this does, which means it's not good. If you want to allow paths in the prefix, it's better to leave the interface as is, and just process complex paths in try_rename_file. Like getting dirname of target_path, checking if it's non-empty, and calling os.makedirs(exist_ok=True) on it if it isn't just before os.rename.

AMDmi3 avatar May 03 '18 17:05 AMDmi3

Oh, now I understand. Looks useful.

AMDmi3 avatar May 04 '18 10:05 AMDmi3

Any chance of having this feature added? It would be useful in scenarios where you have footage from multiple cameras in sub-directories and you're using the -r option. For example, having folders cam1, cam2, cam3 with similar file names in them would allow for the renamed files to get prefixed with cam1_XXXXX, cam2_XXXXX, etc.

flosoft avatar Sep 29 '22 13:09 flosoft

@flosoft @AMDmi3 stumbled upon this just recently, have updated my pull request from latest and is working. However I’m new to GitHub actions/CI so unclear what’s needed so the checks complete?

manuerwin avatar Jan 26 '24 18:01 manuerwin

@AMDmi3 after much trial and error I've got CI passing, although as you can see with ubuntu-20.04 (latest = 22 = missing arch x64 error) and only up until 3.12 (3.13 gives the same missing arch x64 error). Hopefully this is ok?

manuerwin avatar Jan 27 '24 01:01 manuerwin