shoot error. When I terminate shoot with a semicolon to allow more commands on one line, it fails.
Shoot is a CLI command. You can only enter one CLI command per line, ';' has no special meaning to the CLI. The CLI commands that accept Lua code (exec, lua, luar) just pass ; to the Lua interpreter, where it follows the normal rules of Lua syntax
http://www.lua.org/manual/5.1/manual.html#2.4.1QUESTION: What resources do you currently have available that would allow me to do this? Or something equivalent? Could you please give me an example using your currently available resources? I am open to other better suggestions than my pseudocode.
As I mentioned earlier, there's currently no really easy way to get the name of the last shot image. This is something I intend to add when I get a chance. When that is done, I will probably add an option to shoot to download it.
Assuming you never want to keep *any* images around on the camera, a simple approach would be to do something like
shoot -tv=2 -sv=200
mdl -fmatch=%.[JD][PN]G$ DCIM <path to download to>
rm -fmatch=%.[JD][PN]G$ -nodirs DCIM
This will shoot and then download and delete all available JPG and DNG files in any subdirectories of the DCIM directory. It would also get anything else matching the pattern, but offhand I can't think of anything it would hit.
You may find the -pretend option to mdl and rm useful for to verify that it behaves as expected, I haven't tested it extensively.
As mentioned above, you cannot do this all on one line from the CLI. You can put CLI command in a file and execute it with the 'source' command, but this will not let you adjust the shooting parameters.
You can execute CLI commands using lua, e.g.
!cli:execute('shoot -tv=2 -sv=200');cli:execute('mdl -fmatch=%.[JD][PN]G$ DCIM <path to download to>');...
Note this does not do any error checking
With a little Lua code, you could define your own CLI command (or simple function to call with !) that combines all of the above. If you want to find the last shot image, rather than just assuming it's the only image that exists on the camera, you'll need to write some more code. I think we discussed ways to use a lua file to define your own functions in an earlier thread.