Last active
August 1, 2023 12:58
-
-
Save mrhalix/4be647fe4bcfb6af92e2b605b0e2653f to your computer and use it in GitHub Desktop.
Replace newlines in gitlab issue exported file's description, mostly needed by UTF-8 people
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
file = open("issues.csv", "r") | |
text = file.read() | |
for i in re.findall(r'\".*?\"', text, flags=re.DOTALL): | |
text = text.replace(i, i.replace("\n", "'----'")) # replace \n with '----' in issue title and description | |
newf = open('issues-fixed.csv', 'w') | |
newf.write(text) | |
newf.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment