Line Break 변환기?

cppig1995의 이미지

제가 리눅스 시스템에서 윈도그로 자료를 좀 백업해 왔습니다.
8-in-a-Cube (8목) 게임인데... 직접 만든 놀이입니다.
구현은 되지 않아 있고, 문서만 있습니다.
한글 문서가 좀 있어서 인코딩은 UHC 로 저장했습니다.
그런데 문제는 Line Break 였습니다.

여기서! cppig1995 군은...
인터넷에서 변환기 찾는 것이 귀찮아서 직접 코드를 짰습니다.

초특급 허접 -- uwconv 0.1 코드입니다.

- exe 는 허가되지 않아서 귀찮음으로 인해 그냥 안 올립니다.

- uwconv 는 현재 LF only --> CR/LF 만 지원하므로,
현재 Windows 용으로 exe 만 있습니다.
- uwconv 0.2 에서는 옵션을 통해 CR/LF --> LF only 역시
지원할 계획입니다.
- 현재의 0.1 은 원본, 대상을 직접 지정해야 하지만,
0.2 부터는 덮어쓰기 옵션을 제공합니다.
- uwconv 는 GNU GPL 을 따릅니다.

File attachments: 
첨부파일 크기
파일 uwconv.c867바이트
파일 uwconv-0.2.c2.1 KB
Plain text icon 8mBoard.txt720바이트
파일 8mok.c3.73 KB
Plain text icon 8mRule.txt1.92 KB
Forums: 
송효진의 이미지

윈도기본 : 워드패드
메모장 외의 거의 모든 에디터가 LF 를 인식합니다.

리눅스를 사용한다면 정규식의 매력에 빠져보세요.

perl -pi -e "s/\n/\r\n/g" file.txt

cppig1995의 이미지

이틀 만에 0.2 를 만들었는데, 변환이 잘 되지 않는 버그가 있네요.
누가 문제를 좀 찾아 주셨으면 합니다. :?
버그 리포트 전자 우편으로 하라고 적혀 있는데,
혹시라도 찾으시면 그냥 답글로 달아 주세요.
미리 감사드리옵니다. :P

댓글 첨부 파일: 
첨부파일 크기
파일 0바이트

Real programmers /* don't */ comment their code.
If it was hard to write, it should be /* hard to */ read.

cppig1995의 이미지

송효진 wrote:
윈도기본 : 워드패드
메모장 외의 거의 모든 에디터가 LF 를 인식합니다.

리눅스를 사용한다면 정규식의 매력에 빠져보세요.

perl -pi -e "s/\n/\r\n/g" file.txt

정말요? :wink: 이런.

Real programmers /* don't */ comment their code.
If it was hard to write, it should be /* hard to */ read.

cppig1995의 이미지

혹시나 궁금해하실까 해서 8목 게임이 뭔지 보여드리겠습니다.
문서 공개합니다.

MUGGINS 랑 좀 비슷하죠. :roll:

댓글 첨부 파일: 
첨부파일 크기
Plain text icon 0바이트
파일 0바이트
Plain text icon 0바이트

Real programmers /* don't */ comment their code.
If it was hard to write, it should be /* hard to */ read.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.