Extract index generation task.
Move into main package.
Remove date formatter.
Add tests for task.