Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to pass newline character for output files #14

Merged
merged 4 commits into from Apr 13, 2019

Conversation

ALFNeT
Copy link

@ALFNeT ALFNeT commented Apr 9, 2019

I've run into a situation where I need to make sure the output files are written with a specific EOL. In this particular case I need to read files with CRLF EOLs and write them in LF regardless of OS.

Ideally I think the EOL from the source files should be respected but I don't think that's a simple problem to solve at point so adding a new flag to specify the OEL for the output files feels like a good compromise.

I'm unsure if this is needed but many people or if this is the best way of going about it but I'm happy to make changes as required.

@coveralls
Copy link

coveralls commented Apr 9, 2019

Coverage Status

Coverage increased (+0.5%) to 86.111% when pulling ca42b16 on ALFNeT:master into d9529c9 on elmotec:master.

@elmotec
Copy link
Owner

elmotec commented Apr 9, 2019

I never faced the issue, but that's a useful addition. Thank you. Could you add at least one test case so I can see how to use it? I am concerned that passing \n or \r\n will not be interpreted the way we want.

@ALFNeT
Copy link
Author

ALFNeT commented Apr 10, 2019

Fair enough, I'll try adding a couple of tests in the next few days.

@ALFNeT
Copy link
Author

ALFNeT commented Apr 11, 2019

@elmotec I've added a test now. Let me know what you think or if you have any concerns.

@elmotec
Copy link
Owner

elmotec commented Apr 13, 2019

I'll merge the addition. Thank you.

Out of curiosity though. How do you pass \n to the program at the command line on Windows? I've seen https://superuser.com/questions/150116 but that seems quite convoluted. I'd be interested to know.

@elmotec elmotec merged commit c36633f into elmotec:master Apr 13, 2019
@ALFNeT
Copy link
Author

ALFNeT commented Apr 15, 2019

Woohoo! Thanks for that @elmotec, much appreciated.

To be honest I'm not entirely sure what's the best way to do it in the command prompt, Powershell is a bit easier though you can pass `n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants