Emacsã§ã¹ã ã¼ãºã«å³å½¢ç·¨éãã§ããããã«ãªãcacoo.elãä½ã£ã¦ã¿ã
- ææ°è¨äº -> cacoo.el v2.0 リリース - 技術日記@kiwanami (2012/11/17 追è¨)
Cacoo(http://cacoo.com/)ã¨ããWebä¸ã®å³å½¢æç»ãã¼ã«ããEmacsããã·ã¼ã ã¬ã¹ã«ä½¿ãã cacoo.el ãä½ãã¾ããã
Emacsã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ã¯ä»ã®WordãExcelãªã©ã®ã¢ããªãè¶
ããææ¸ä½æç°å¢ã«ãªãã®ã§ã¯ãªããã¨ãåæã«å¦æ³ãã¦ãã¾ãã
Cacooã«ã¤ãã¦ã¯ä»¥ä¸ã®ãµã¤ããè¦ã¦ãã ãããèªåã¯Cacooã§æ¹ç¼ç´Excelãããããã¨ãåºæ¥ã¾ããã
- 日本発のCacooは複数ユーザーがリアルタイムで協調しながらデザイン作業ができるすぐれもの | TechCrunch Japan
- Online Diagram & Collaboration Features Tour | Cacoo
ã¤ã³ã¹ãã¼ã«æ¹æ³
å¿ è¦ãªãã®ã¯ãEmacs22以ä¸ï¼ãã¶ãï¼ãImageMagickãwgetã§ããMac, Linuxã ã¨ãã¾ãåé¡ãªãã¨æãã¾ããWindowsã®å ´åã¯ãCygwinãªã©ã¨çµã¿åããããã¨ã«ãªããã¨æãã¾ãããä»ã®ã¨ããconvertã®ãã¼ã¸ã§ã³ãå¤ãã¨pngã®ééè²ããã¾ãæ±ããªãåé¡ãããã¾ãã
auto-install.elãæã£ã¦ãã人ã¯ã以ä¸ã®å¼ãè©ä¾¡ãããã¨ã§åã£ã¦æ¥ãã¾ãã
(auto-install-from-url "http://github.com/kiwanami/emacs-cacoo/raw/master/cacoo.el")
æåã§å ¥ããå ´åã¯ã以ä¸ã®ãªã³ã¯å ãload-pathã«ä¿åãã¦ãã ããã
ãã¨ã¯ã以ä¸ã®ãããªå¼ã³åºãã®å 容ã .emacs ãªã©ã«æ¸ãã¾ãã
(require 'cacoo) (global-set-key (kbd "M--") 'toggle-cacoo-minor-mode)
ãã®å ´åãAltãã¼ãæ¼ããªããã-(ãã¤ãã³)ããæ¼ãã¨On/Offãåãæ¿ããããã«ãªãã¾ãã
使ãæ¹æµã
ã¾ããCacooã«ãã°ã¤ã³ãã¦çµµãæãã¾ãã
ãã®å³ãå ¬éã®è¨å®ã§ä¿åãã¦å³ä¸ã®ãæ»ãããã¿ã³ãæ¼ãã¨è©³ç´°ç»é¢ã«æ¥ã¾ããï¼2010/05/08 追è¨ï¼
ããã§å³ä¸ã®ããªã³ã¯ããã¯ãªãã¯ããã¨ç»åã®URLãåºã¾ãã®ã§ãã¯ãªãã¯ãã¦ã¯ãªãããã¼ãã«ã³ãã¼ãã¾ãã
ä»åº¦ã¯Emacsä¸ã§ã®ä½æ¥ã§ããCacooã¢ã¼ããæå¹ã«ãã¾ãï¼ä¸ã®è¨å®ã§ããã°ãAltãã¼ãæ¼ããªãããã¤ãã³ãæ¼ãï¼ãæå¹ã«ãªãã¨ã¢ã¼ãã©ã¤ã³ã«ãCacooãã¨åºã¦ãã¾ãã
ããã§ãC-c , yãã¨æã¤ããã¯ãªãããã¼ãã®ããã¹ããè²¼ãä»ãã¦æã§ä»¥ä¸ã®ããã«å ¥åãã¾ãã
[img:https://cacoo.com/diagrams/6m4ATG1ddlUiHPqd-0FAF7.png]
æå¾ã«ãC-c , Dãã¨å ¥åãã¦ãã°ããå¾ ã¤ã¨ããã¹ããå³ã«ç½®ãæããã¾ãã
ã¾ãããã¹ãã«æ»ãããå ´åã¯ãããä¸åº¦ãAlt+-ãã§Cacooã¢ã¼ããOffã«ãããããC-c , Tãã§ããã¹ãã«æ»ãã¾ãã
å³ãã¯ãªãã¯ããã¨Cacooã®ç·¨éç»é¢ãéãã¾ãã®ã§ãããã«ç·¨éã§ãã¾ããç·¨éããå³ã¯ããC-c , Rãã§ãªãã¼ããããã¨ã§å³åº§ã«åæ ããããã¨ãåºæ¥ã¾ãã
Cacooã®çµµä»¥å¤ã§ããWebä¸ã§ã¢ã¯ã»ã¹ã§ããå³ã§ããã°å¤§æµè¡¨ç¤ºã§ãã¾ãã以ä¸ãå¯è½ãªURLã®ä¾ã§ãããã¡ããç·¨éã¯ã§ãã¾ããã
[img:http://example.com/xxx.jpg] [img:file:///ãã¼ã«ã«ã®ãã¡ã¤ã«ã¸ã®ãã«ãã¹] [img:ãã¼ã«ã«ã®ãã¡ã¤ã«ã¸ã®ç¸å¯¾ãã¹]
以ä¸ãç°¡åãªä½¿ç¨ã®æµãã§ãã
æ´»ç¨æ¹æ³
ãã¤ãã¼ã¢ã¼ãã§ãã®ã§ã©ã®ã¡ã¸ã£ã¼ã¢ã¼ãã¨ãçµã¿åããã¦ä½¿ãã¾ãã
å人çã«ã¯hatenaãwikiã®ä¸æ¸ããhowmã§æ¸ããã¨ãå¤ãã®ã§ãããããã§çµµã表示ããããã¨ã§ã¤ã¡ã¼ã¸ã確èªããªããæ¸ããã¨ãã§ãã¾ããç¹ã«ãã¹ã¯ãªã¼ã³ã·ã§ãããåãã¨ãã«Cacooã便å©ã§ããã¾ããããã«å³ãä¿®æ£ã§ããã®ã§ãã¡ãã£ã¨ããä¿®æ£ã§ãæãã¤ããã¨ãã«ä½æ¥ã§ãã¾ãã
ã½ã¼ã¹ã³ã¼ãã«ã³ã¡ã³ãã ãã§ãªããCacooã®çµµãè²¼ããã¨ã«ãã£ã¦ã¯ã©ã¹å³ãªã©ã®çµµãã¡ã³ããã³ã¹å¯è½ãªå½¢ã§è²¼ããã¨ãã§ããããã«ãªãã¾ãã詳細ãªã³ã¡ã³ãã¨ãã¦Backlogãªã©ã®BTSãWikiã®URLãè²¼ã£ã¦ãããã¨ã¯è¯ããã£ã¦ããã®ã§ãããçµµãã¯ããã¨ããã«åããããããªãã¨æãã¾ããï¼ãã ããEmacsã«éãã¾ãããããï¼
ãã¼ãã¤ã³ã
以ä¸ã¯ããã©ã«ãã®æåã§ãã使ããããããã«cacoo-minor-mode-keymapãã«ã¹ã¿ãã¤ãºãã¦ãã ããã
- ãããã¡å
¨ä½ã«å¯¾ãã¦
- C-c , T : ãããã¡ã®ãã¹ã¦ã®å³ãããã¹ãã«æ»ã
- C-c , D : ãããã¡ã®ãã¹ã¦ã®å³ã表示ããï¼ãã£ãã·ã¥ãããã°ãããã¯ã¼ã¯ã«æ¥ç¶ããªãï¼
- C-c , R : ãããã¡ã®ãã¹ã¦ã®å³ãåå¾ãç´ã
- ã«ã¼ã½ã¼ã«ç´å¾ã®å³ã«å¯¾ãã¦
- C-c , t : ããã¹ãã«æ»ã
- C-c , d : å³ã表示ããï¼ãã£ãã·ã¥ãããã°ãããã¯ã¼ã¯ã«æ¥ç¶ããªãï¼
- C-c , r : å³ãåå¾ãç´ãã¦è¡¨ç¤ºãã
- C-c , e : å³ã®ç·¨éç»é¢ã表示ãã
- C-c , v : å³ã®è©³ç´°ç»é¢ã表示ãã
- C-c , V : ãã¼ã«ã«ã®å³ãå¤é¨ãã¥ã¼ã¢ã¼ã§éã
- Cacooã®æ©è½ã«å¯¾ãã¦
- C-c , N : æ°è¦å³ã®ä½æç»é¢ããã©ã¦ã¶ã§éã
- C-c , l : å³ã®ä¸è¦§ç»é¢ããã©ã¦ã¶ã§éã
- ããã²ã¼ã·ã§ã³ãç·¨é
- C-c , n : 次ã®å³ã«ç§»å
- C-c , p : åã®å³ã«ç§»å
- C-c , i : å³ã®ãã¼ã¯ã¢ãããæ¿å ¥
- C-c , y : ã¯ãªãããã¼ãã®ããã¹ãã使ã£ã¦å³ã®ãã¼ã¯ã¢ãããæ¿å ¥
- ãã®ä»
- C-c , C : ãã£ãã·ã¥ãã£ã¬ã¯ããªã空ã«ãã
- å³ã®ã¯ãªã㯠: å³ã®ç·¨éç»é¢ã表示ãã
åä½è©³ç´°ãã«ã¹ã¿ãã¤ãºãªã©
å³ã¯ãã¼ã«ã«ã«ãã£ãã·ã¥ããã¾ãããã£ãã·ã¥ã¯ç¾å¨ã®ãã£ã¬ã¯ããªï¼ãããã¡ãä¿åããããã£ã¬ã¯ããªï¼ã®ãªãã®ã.cimgãã¨ãããã£ã¬ã¯ããªã«ä¿åããã¾ãããªãªã¸ãã«ã®å³ã¨ãªãµã¤ãºãããå³ãä¿åããã¾ãã
ãã£ãã·ã¥ãããã°ãããã¯ã¼ã¯ã«æ¥ç¶ã«ããã¾ããããªãã¼ãããã¨ãã£ãã·ã¥ãæ¶ãã¦åãã«è¡ãã¾ãããªãµã¤ãºããã®ã¨ãã«è¡ãããã®ã§ããµã¤ãºãå¤ãããã¨ãã¯ãªãã¼ããã¦ãã ããã
éåæã§åãã«è¡ã£ãã縮å°ããããããããEmacsã¯ããã»ã©åºã¾ããªãã¯ãã ã¨æãã¾ãããã ããã¾ãè³¢ãå¶å¾¡ããã¦ããªããããåä¸ãããã¡ã§åä¸ç»åã¯è¤æ°å表示ãããã¨ãã§ãã¾ãããï¼2010/05/08追è¨ï¼
convertã§ã¨ã©ã¼ãåºãããå³ã®èæ¯ãé»ããªã£ã¦ãã¾ãå ´åã¯ã以ä¸ã®è¨å®ãå ¥ãã¦ãã ãããconvertã§æ°ããè¨å®ã使ãã®ãæ¢ãã¦ãå¼·å¼ã«èæ¯ãç½ãå¡ãã¤ã¶ãã¾ããï¼2010/05/08追è¨ï¼
(setq cacoo:png-background "white")
ãã©ã¦ã¶ã¼ã¯Emacsã§è¨å®ãã¦ããããã©ã«ããã©ã¦ã¶ã¼ã使ãã¾ãããã¾ãéããªãå ´å㯠browse-url-browser-function å¨è¾ºãè¨å®ãã¦ã¿ã¦ãã ããã
æ£è¦è¡¨ç¾ã§å³ã®ãã¼ã¯ã¢ããã調ã¹ã¾ããcacoo:img-regexp, cacoo:img-pattern ãå¤æ´ãããã¨ã§ãWikiè¨æ³ãªã©ã«ãããããã¨ãã§ãã¾ãã
ãã£ãã·ã¥ç¨ã®ãã£ã¬ã¯ããªå㯠cacoo:img-dir ã§æå®ãã¾ãããã¡ãã¡ãã£ã¬ã¯ããªä½æã§ç¢ºèªãå¿ è¦ãªããã°ã cacoo:img-dir-ok ã t ã«è¨å®ãã¦ãã ããã
ç»åã®ç¸®å°ãµã¤ãºã¯ cacoo:max-size ã§æå®ãã¾ãã以ä¸ã®ããã«ã¹ãã¼ã¹åºåãã§æ¸ããã¨ã§ç»åãã¨ã«ãæå®ã§ãã¾ãã
[img:file:///xxx/yyy/zzz.png 600]
å¤é¨ç»åãã¥ã¼ã¢ã¼ã®ããã°ã©ã 㯠cacoo:external-viewer ã§æå®ãã¾ããnilã«è¨å®ããã¨Emacsã®image-modeã§éããã¨ãã¾ãã
èªåã®ã¨ããã§ã¯ã以ä¸ã®ãããªæã㧠.emacs ã«æ¸ãã¦ãã¾ãã
(require 'cacoo) (global-set-key (kbd "M--") 'toggle-cacoo-minor-mode) (setq cacoo:img-dir-ok t) (setq cacoo:max-size 450) (setq cacoo:external-viewer nil)
ãããã
å¥ã®ã¨ã³ããªã¼ãæ¸ããã¨ãã¦ãã¦ãã¹ã¯ãªã¼ã³ã·ã§ãããå³ã®ç·¨éããã¦ããã®ã§ããããã¡ãã¡Cacooã®ç»é¢ããã©ã¦ã¶ã§éãã®ãé¢åã«ãªã£ãã®ã§ä½ãã¾ããããã¨ãã¨æ¨å¹´ã®Cacooãªãªã¼ã¹å¾ããæ§æ³ã¯ãã£ã¦ãä»æ§ã ãã¯ã¡ã¢ãã¦ããã®ã§ãæè¡æ¤è¨¼ã ãã§ããã¨æ©ãã§ãã¾ããã
ä¼¼ããããªãã®ã«ãiimageã¨ããæ¨æºæ·»ä»ã®elãããã¾ãããããæ¹é ãããã¨ãèããã®ã§ããããªãµã¤ãºãã§ããªãã£ãã®ã§ãw3mããã®ä»ã®ç»åãæ±ãelãåèã«ãã¦ãã¡ããä½ããã¨ã«ãã¾ããã
ç¹ã«èªåã¯ä»äºæãªãã©ã¤ã³ç°å¢ãå¤ãããããã¼ã«ã«ã«Cacooã®çµµãæ®ããã¨ãéè¦ã§ããããã¾ã¾ã§ã¯ãã¡ãã¡ååãã¤ãã¦ä¿åãã¦ãã¾ããã
å人çã«ã¯Emacsã¨Cacooã®çµã¿åããã¯ãããªãç ´å£åã®ããç°å¢ã§ã¯ãªãããªã¨æã£ã¦ãã¾ããWordãã»ãã®ææ¸ä½æãã¼ã«ãããã¼ãã¼ã«ã®çµã¿åããã§ã¯ãããã¾ã§å¿«é©ã«ç·¨éã¯ã§ããªãã£ãã§ããCacooã®æ¹ã§APIã¨ãæä¾ãã¦ããããã¨ãç»åã®ä¸è¦§ãAnythingã§çµãè¾¼ãã ãã§ãããããã®ã§ãããã«ä¾¿å©ã«ãªãããã ãªã¼ã¨æã£ã¦ãã¾ãã
ã¨ãããã¨ã§ããã²ã©ããã
â»ä»ã®ã¨ãããWindowsãªã©ã§å¤ãImageMagickï¼6.3.x以åãªã©ï¼ã使ãã¨ã¨ã©ã¼ã«ãªãåé¡ãããã¾ããå¾ã»ã©ä¿®æ£ããäºå®ã§ããä¿®æ£ãã¾ããã
ï¼2010/05/07 追è¨ï¼rubikitchããã«ãææããã ãããã¼ãã¤ã³ããä¿®æ£ãã¾ããããããã¨ããããã¾ãããï¼
ï¼2010/05/08 追è¨ï¼ããã¤ãæ©è½è¿½å ãä¿®æ£ãã¾ãããã¨ã©ã¼ã®ç®æã«è²ãä»ããããå¦çç¶æ³ã表示ããããã«ãã¾ãããæ¬æã«ç¾ç¶ã®å¶éãªã©ã追è¨ãã¾ãããï¼