I developed FLaPFLaP, a python script which replaces \input, \include and other inclusion directives by the file they refer to while supporting \includeonly. In addition it move graphic files around and adjusts graphic inclusion directive (\includegraphics, includesvg and \overpic) accordingly. It supports the \graphicspath directive and SVG, EPS and PDF images.
change pythonhosted dead link to pypi