Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE directory name as file prefix #4

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

manuerwin
Copy link
Contributor

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

@AMDmi3
Copy link
Owner

AMDmi3 commented May 3, 2018

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
Copy link
Owner

AMDmi3 commented May 4, 2018

Oh, now I understand. Looks useful.

@flosoft
Copy link

flosoft commented Sep 29, 2022

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.

manuerwin and others added 5 commits January 26, 2024 22:41
* main:
  Update CHANGES
  Updated link to silly GoPro naming conventions
  Add support for Hero 9 video files which produce files with GX and GL prefixes
  Remove travis leftovers
  Update changelog
  Update badge
  Rollback assignment exprs to loosen python version requirement
  Remove python 2 leftovers
  Update python version requirement
  Update changelog
  Update copyrights
  Modernize code
  Add type annotations
  Add CI facilities
  Update regular expression for more GoPro file name patterns
  Fix shebang for python3
tests: clarify logging
Remove python 3.6.
Extend to 3.13.
@manuerwin
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants