-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates with new tests. not finished
- Loading branch information
Showing
16 changed files
with
2,047 additions
and
2,118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
from pathlib import Path | ||
import sys | ||
|
||
|
||
""" | ||
This is a PreCmd script designed to rewrite input file names. | ||
""" | ||
|
||
for arg in sys.argv[1:]: | ||
try: | ||
name, newname = arg.split('=',1) | ||
if '/' in newname: | ||
newname = Path(newname) | ||
newname.parent.mkdir(parents=True, exists_ok=True) | ||
os.rename(name, newname) | ||
except Exception: | ||
print(f'Cannot move inputfile {name} to {newname}', file=sys.stderr) | ||
raise |
Oops, something went wrong.