Skip to content

Conversation

@adewyer
Copy link
Contributor

@adewyer adewyer commented Jan 19, 2022

No description provided.

if (name === materialNameFromFile || !materialNameFromFile) {
return name;
}
return materialNameFromFile;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Add a general utility - getLineFromContent(lineNumber)
  2. materialNameFromFileContents -> getNameFromContents
  3. getNameFromContents(fileContent) => {return getLineFromContent(1)} for POSCAR, and 0 for XYZ
    The default name and everything on lines 152-154 should not be dealt with here. We could add a function named: getNameFromFIleContent(type, fileContent, failoverName = "material") and use as a proxy.

@timurbazhirov timurbazhirov changed the title Feature/sof 5462 Feature/sof 5462 - get name from file content Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants