Code Monkey home page Code Monkey logo

node-nfd2nfc's Introduction

node-nfd2nfc

File rename for NFD Unicode characters to NFC

맥을 사용하면서 겪는 큰 고충중 하나가 파일명의 한글 자모가 깨어진 상태로 클라우드나 윈도우에 전송되는 경우일껍니다. 윈도우에 Node가 설치된 경우 사용할 수 있도록 깨진한글 파일/폴더를 복원하는 스크립트를 만들어봤습니다.

변환 전
NFD파일
변환 후
NFC파일

윈도우에서 사용하기 위해 작성된 코드이며 모든 테스트는 Windows 10 에서 수행되었습니다. 아래 명령어를 복사해서 파일을 생성하면 자모가 분리된 파일을 생성할 수 있습니다.

옵션처리 optimist

npm install optimist

require('optimist')

Options:
  -d, --directory  [required]  [default: "."]
  -r, --recursive

테스트용 폴더와 파일 생성

mkdir "%USERPROFILE%\Downloads\node-nfd2nfc\test"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\ABC_경영_1.txt"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\ABC_경영_2.txt"
mkdir "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFC폴더"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFC폴더\ABC_경영_1.txt"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFC폴더\ABC_경영_2.txt"
mkdir "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFD폴더"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFD폴더\ABC_경영_1.txt"
echo "1" > "%USERPROFILE%\Downloads\node-nfd2nfc\test\NFD폴더\ABC_경영_2.txt"

폴더 변환 실행

node nfd2nfc.js -d "%USERPROFILE%\\Downloads\\node-nfd2nfc\\test\\"

폴더 변환 실행 (Recursive)

node nfd2nfc.js -d "%USERPROFILE%\\Downloads\\node-nfd2nfc\\test\\" -r

node-nfd2nfc's People

Contributors

kiros33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.