Skip to content

Instantly share code, notes, and snippets.

@ucpwang
Last active November 27, 2017 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ucpwang/56d2db9fbc2d9abd8229a727c542bfcd to your computer and use it in GitHub Desktop.
Save ucpwang/56d2db9fbc2d9abd8229a727c542bfcd to your computer and use it in GitHub Desktop.
오픈소스 `plantuml`을 이용하여 다이어그램을 그려보자

오픈소스 plantuml을 이용하여 다이어그램을 그려보자

우선 MAC에서 plantuml 패키지를 설치

$ brew install plantuml

plantuml의 workspace로 사용할 폴더를 생성하자

$ mkdir ~/workspace/plantuml

test.txt파일을 만들고

$ vi ~/workspace/plantuml/test.txt

아래와 같이 입력하고 저장

@startuml
class Class01 {
  String data
  void methods()
}
Class01 <|-- Class02
@enduml

plantumlcli를 이용하여 test.txt로 다이어그램을 빌드해보자

$ plantuml ~/workspace/plantuml/test.txt

(plantuml은 java application 이다.)

$ tree ~/workspace/plantuml
/Users/jacob-c/workspace/plantuml
├── test.png
└── test.txt

0 directories, 2 files

test.png파일이 생성된것을 확인할 수 있다. 열어보면 클래스 다이어그램이 짠하고 그려져 있을것이다.

test.png

@startuml
class Class01 {
String data
void methods()
}
Class01 <|-- Class02
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment