Text this: From density functional theory to spin Hamiltonians