Text this: Generalized approach for rapid entropy calculation of liquids and solids