Is it possible to rename images when downloading them from the camera with chdkptp?
...
Something like img001.jpg, img002.jpg, img003.jpg OR img001_l.jpg, img001_r.jpg, img002_l.jpg, img002_r.jpg, etc for the left and right pages.
Yes, you can use the -d option to name the images. There are various "substitution variables" you can use to set the name. Try "help imdl" for all the details.
If you want sequential numbers for each session, you can use ${dlseq}, like
imdl -rm -d=img_${dlseq}_r${ext}
Note you'll want to protect the $ from the shell if you are using it in a bash script rather than just in the chdkptp prompt, like
-e'imdl -rm -d=img_${dlseq}_r${ext}'
If your bash script identifies the left and right cams, you can do separate versions of the above the r and l.
edit:
if you want to include devnum from your bash script, you can just put it outside the single quotes, like
-e'imdl -rm -d=img_'$devnum'_${dlseq}_r${ext}'
You can set the starting number for ${dlseq} with the -seq option.
You can use ${shotseq} instead of dlseq if you want jpeg and dng of the same shot to use the same number.
You can use -pretend to show what would be done without actually downloading everything.