CTAN has a new package: varsfromjobname