
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
본 제품은 한글과컴퓨터의 한/글 문서 파일(.hwp) 공개 문서를 참고하여 개발하였습니다.
HWP 버전 5 문서를 여는 Node.js 라이브러리를 만드는 시도를 하는 중입니다.
현재, 이 패키지는 대부분의 한글 문서를 읽을 수 있게 읽을 수 있는 객체 종류를 계속 늘리고 있으며, 아직 다른 프로젝트에 사용될 준비가 되어 있지 않습니다.
라이센스는 LICENSE.md를 참고 해 주세요.
여기 있는 것은 당연히 모든 것을 포함하는 목록이 아닙니다.
ole-doc을 브라우저에서도 쓸 수 있도록 바꿔 놓기.test/read.js의 주석에 적혀 있는 의문점들 해결하기.우선 간단하게 다음과 같이 HWP 파일을 읽어와 HWPML로 출력할 수 있습니다.
var hwp = require('hwp');
hwp.open('file.hwp', function(err, doc){
console.log(doc.toHML());
});
hwp.open(file, [option], callback)주어진 경로로부터 HWP 문서를 읽습니다.
인자
option.type이 지정된 것으로 인식합니다.
hwp만을 지원합니다.hwp.HWPHWP 문서를 나타내는 객체입니다. 아래와 같은 속성들과 메소드들이 있습니다.
_docHWP 문서로부터 문서를 읽어왔다면, 이 속성에 원본 문서를 나타내는 오브젝트가 저장됩니다.
_hmlHWPML같은 형식으로 (루트는 <HWPML>) HWP 문서가 표현되어 있습니다. (아래 HWPNode를 참조 해 주세요.)
_hwp_metaHWP 문서로부터 문서를 읽어왔다면, 이 속성에 그 문서의 메타데이터가 저장됩니다.
toHML([verbose])HWP 문서를 HWPML형식으로 표현한 문자열을 반환합니다.
convertTo(converter)converter 메소드에 HML 객체를 인자로 넣어 호출하고 결과를 반환합니다.
예 doc.convertTo(new hwp.converter.plainText)
인자
HWPNode직접적으로 드러나 있지는 않지만, hwp.HWP 객체의 _hml을 표현하는 데 사용되는 프로토타입입니다.
name노드의 이름입니다.
attr노드의 속성을 담고 있는 오브젝트입니다.
value노드의 텍스트 값입니다.
children노드의 자식들을 포함하고 있는 배열입니다.
add(elem)노드에 elem을 자식으로 추가하고, 만약 attr.Count 속성이 있을 경우 그것을 업데이트 합니다.
findChild(name), go(name)노드에서 주어진 이름을 가지고 있는 첫 번째 자식 노드를 찾아 반환합니다. 없을 경우 null을 반환합니다.
getChild(name)findChild(name)과 같으나, 만약 그러한 노드가 없을 경우 주어진 이름을 가지는 새 노드를 추가하고 그것을 반환합니다.
findChildWith(name, attr_name, attr_val)노드에서 주어진 이름을 가지고 있고, 주어진 인자의 값이 주어진 값인 노드를 찾아 반환합니다. 없을 경우 null을 반환합니다.
getChildWith(name, attr_name, attr_val)findChildWith(name, attr_name, attr_val)과 같으나, 만약 그러한 노드가 없을 경우 해당하는 새 노드를 추가하고 그것을 반환합니다.
findChildren(name)노드에서 주어진 이름을 가지고 있는 모든 자식 노드들을 반환해 줍니다.
toHML([verbose])노드를 HWPML형식으로 표현한 문자열을 반환합니다.
FAQs
HWP 5.0 library in Node.js
We found that node-hwp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.