symfonyã§graphvizã使ã£ã¦DBãªã¬ã¼ã·ã§ã³å³ãå³å¼åãã
以åããGraphvizã«ã¯èå³ããã£ãã®ã§ãã
symfony1.2ã§ã¯ã¹ãã¼ãå®ç¾©ãç°¡åãªã³ãã³ãã§Graphvizã®å³å¼åãã§ããããã§ãã
以åæ¸ããè¨äºã«ã¦Graphvizã§askeetã®ãªã¬ã¼ã·ã§ã³å³ãå³å¼åãç´¹ä»ãã¾ããããã¾ãã«ãã®ã¾ã¾ç§ã®æãã§ããæ©è½ãsymfony1.2ã«çµã¿è¾¼ã¾ãã¦ãã¾ããããã¯ç´ æµã
ç§ã¯Emacsã使ã£ã¦ããã®ã§å¿ç¨ã§Emacsã¨é£åãã¦ä½¿ã£ã¦ãã£ã¦ã¿ããã¨æãã¾ãã
schema.ymlãã "ã.dot"ãã¡ã¤ã«ãä½ã
graphvizã解éã§ãã"ã.dot"ãã¡ã¤ã«ãä½ãã¾ãã
Emacsã§ãpngå½¢å¼ã®ãã¡ã¤ã«ãã¤ãããã¨ãã§ãã¾ãã詳細ã¯å¾åã§ã
ããã§symfonyããã¸ã§ã¯ããã£ã¬ã¯ããªä»¥ä¸ã«
$ symfony propel:graphviz
ã¨ãããã¡ã¤ã«ãã§ãã¾ãã
graph/propel.shema.dot
Graphvizã®ã¤ã³ã¹ãã¼ã«
Graphvizãæã£ã¦ããªãå ´åã
ãã¡ãããã¤ã³ã¹ãã¼ã«ãã¦ãã ãã
Windowsï¼
http://www.graphviz.org/Download_windows.php
macOSXï¼
http://www.pixelglow.com/graphviz/download/
Fedoraãªã©ã®ãã£ã¹ããªãã¥ã¼ã·ã§ã³ï¼
ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ã
$ sudo yum install graphviz
ã.dotãã¡ã¤ã«ãç»åã«å¤æ
ãã®ã¾ã¾ã ã¨"propel.schema.dot"ã¯dotè¨èªã§æ¸ãããã¾ã¾ã§ããgraphvizã«è§£éããã¦ç»åã«ãã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ããéãå ´åããã®ã¾ã¾"propel.schema.dot"ãã¡ã¤ã«ãã¢ããªããéãã¦ãè¦ãã¾ãã
ç»åã«ãã¦ä¿åãã¢ããªããã§ãã¾ãã
ã³ãã³ãã§å®è¡ããå ´åã¯ãdotã³ãã³ãã使ã£ã¦ "ã.dot" ãã¡ã¤ã«ãç»åå½¢å¼ã«å¤æãã¦ããã¾ãã
-K ã¯graphvizãã©ããªæ§é ã«ãããã®æå®ãã¦ãããã¾ãã
$ dot -Kdot -Tgif graph/propel.schema.dot -o graph/propel.schema.gif
æ®æ®µã¯"dot"ã§é層æ§é ã«ãªã£ã¦ãã¾ãã"neato"ãªã©ãæå®ãã¦ãããã¨æ¾å°ç¶ã«ãªãã¾ãã
-T ã¯ç»åå½¢å¼ã§ã
-o ã¯çæãããã¡ã¤ã«ã®ååã§ã
Emacsã§dotãã¡ã¤ã«ãç»ååãã¦ã¿ã
Emacsã§"ã.dot"ãã¡ã¤ã«ãç»ååãã¦è¦ãã¾ãã
Emacsã«graphviz-dot-mode.elãå ¥ãã
以ä¸ã®ãµã¤ãããå
¥æã§ãã¾ãã
http://users.skynet.be/ppareit/projects/graphviz-dot-mode/graphviz-dot-mode.html
ã¾ãã¯wgetã³ãã³ãã§
macOSXã§ã¢ããªã±ã¼ã·ã§ã³ã®Emacsã使ã£ã¦ããå ´åã¯
$ wget http://users.skynet.be/ppareit/projects/graphviz-dot-mode/graphviz-dot-mode.el
$ sudo cp graphviz-dot-mode.el /usr/share/emacs/site-lisp
以ä¸ã«ãã®graphviz-dot-mode.elãç½®ãã¾ãã
/Applications/Emacs.app/Contents/Resources/site-lisp/
次ã«ãEmacsã®è¨å®ãã¡ã¤ã«ã«
ãªã©ã©è¨å®ãã¦ããã¾ã
;;graphviz mode
(load "graphviz-dot-mode.el")
(add-hook 'graphviz-dot-mode-hook (lambda () (local-set-key [f5] "\C-x\C-s\C-cc\C-m\C-cp")))
ãã¨ã¯Emacsã§"ã.dot"ãã¡ã¤ã«ãéãã¦
C-c cã§pngãã¡ã¤ã«ã®"ã.png"ãä½ãã¾ããããã¦
C-c pã§ç»åããã¬ãã¥ã¼ãããã¨ãã§ãã¾ãã
ãã¾ãã«ç»åã®ãµã¤ãºã大ããã¨Emacsã§ã¯è¦ããªãããã§ãã®ã§ãã¬ãã¥ã¼ã¯Graphvizã使ããã¨ããå§ããã¾ãã