Sequence Section Destroyer

Hello programmers!
I was looking for a script similar to this one:
COB_SSD-Sequence Section Destroyer
It would be a nice feature for Blender’s VSE, and nice way to clean bad frames during rendering.
And because I am not a programmer myself, I am curious about your opinion.

I imagine the procedure for deletion of section of a image sequence as follows.

1. Import the image sequence in Blender as strip.
2. Hard Cut the strip in places that you want to remove later - this will result in smaller strips lined together.
3. Select the strips that hold the files that you want to delete from the disk and use the script.

Options for the deletion could be:
1. Delete files from disk and delete the corresponding strips (Cleanup)
2. Delete only the files from disk but keep the strips.(Re-render and reload the blendfile).
3. Option to move the files to backup folder.

How hard is to do such script?

I’m going to say really hard.

I was poking around in the VSE py-api the other day and there isn’t much there to work with plus the sequencer itself is kind of confusing so I’m not too sure how all the parts fit together to even begin to start expanding on the api. Probably doesn’t help that I’ve never used it and the C code is extra-difficult to follow.

You might be able to do this stuff with bpy.ops but I kind of doubt that’ll give you the kind of control you need (and I never encourage people to use bpy.ops if they can avoid it).

OK I did some research and was playing with the Blender’s Console.
One can find the files in the “strip” using ImageSequence and SequenceElement objects.
Also collecting the selected strips with bpy.context
The deletion or removal of the files can be done with external os and shutil modules
I’ve made a simple script that seems to do the job - but it is not “fool-proof”, and without a GUI.
And that script can potentially do some undesired damage - like deleting files irreversibly.
As I said I am not a programmer.