Text this: Generation of Basis Vectors for Magnetic Structures and Displacement Modes