= 2009-04-19 = * [http://www.wretch.cc/blog/yaoyoungcor/8889267 洪瑞珍三明治 中山店 vs 自由店 PK (圖)] * [http://ldn.linuxfoundation.org/article/using-sed-editor Using the sed Editor] - sed 跟 awk 在一些場合還蠻常用的。簡單瞄過一次指令,才發現原來還有多重過濾這一招啊!!學起來!! (這個範例是把 sample_one 這個檔案裡,遇到 two 那一行的 1 換成 2, 把 three 那一行的 1 換成 3) {{{ $ sed ' > /two/ s/1/2/ > /three/ s/1/3/' sample_one }}} * [http://osdc.tw/schedule_2009_day3.html OSDC.TW 2009] == Trac 0.11 == * 由於把系統從 Etch 升級到 Lenny, Python 環境因而從 2.4 升級到 2.5, Trac 從 0.10 升級到 0.11, 不管是 trac 舊的設定檔以及 plugin 都不管用了。只好從頭把 Trac Plugin 重裝一次。 * 設定檔的部分:先用 trac-admin testbed initenv 產生一個全新的範本目錄,然後用 vimdiff 比對有哪些新參數要加進去。 * Plugin 部分: * 首先要注意的是 Trac 0.11 已經把 !TracAccountManager 跟 !TracWebAdmin 納入,因此不可以再裝,否則會有一堆錯誤。 * [http://trac-hacks.org/wiki/GraphvizPlugin Graphviz Plugin] - 用 graphviz 語法畫圖的擴充套件 {{{ $ w3m "http://trac-hacks.org/changeset/latest/graphvizplugin/0.11-0.7.4?old_path=/&filename=graphvizplugin/0.11-0.7.4&format=zip" $ unzip unzip graphvizplugin_0.11-0.7.4-r5537.zip $ cd graphvizplugin/0.11-0.7.4 graphvizplugin/0.11-0.7.4$ sudo python setup.py bdist_egg graphvizplugin/0.11-0.7.4$ sudo easy_install dist/graphviz-0.7.4-py2.5.egg }}} * [http://trac-hacks.org/wiki/WikiIncludePlugin WikiInclude] - 讓用 ![[WikiInclude(WikiStart)]] 語法來包含其他 Wiki 頁面中的內容 {{{ $ wget "http://trac-hacks.org/attachment/wiki/WikiIncludePlugin/0.11.versions.tbz2?format=raw" -O wikiincludeplugin-0.11.tar.gz $ tar jxvf wikiincludeplugin-0.11.tar.gz $ cd 0.11 0.11$ cat > setup.py << EOF from setuptools import setup PACKAGE = 'WikiInclude' VERSION = '0.2' DESCRIPTION = 'Page include plugin for Trac Wiki' setup(name=PACKAGE, version=VERSION, packages=['wikiinclude'], entry_points={'trac.plugins': ['wikiinclude.wikiinclude=wikiinclude.wikiinclude']}) EOF 0.11$ sudo python setup.py bdist_egg 0.11$ sudo easy_install dist/WikiInclude-0.2-py2.5.egg }}} * [http://svn.ipd.uni-karlsruhe.de/trac/javaparty/wiki/TracRedirect TracRedirect] - 用 ![[redirect(網址)]] 語法來作頁面自動轉址 {{{ $ svn co http://svn.ipd.uka.de/repos/javaparty/JP/trac/plugins/redirect-0.11/ $ cd redirect-0.11/ redirect-0.11$ sudo python setup.py bdist_egg redirect-0.11$ sudo easy_install dist/TracRedirect-0.11.3.dev_r3272-py2.5.egg }}} * [http://trac-hacks.org/wiki/SvnAuthzAdminPlugin Svnauthz File Administration Plugin] - 用來管理誰有權限讀取 SVN 目錄的擴充套件 {{{ $ svn co http://trac-hacks.org/svn/svnauthzadminplugin/0.11/ svnauthzadminplugin-0.11 $ cd svnauthzadminplugin-0.11 svnauthzadminplugin-0.11$ sudo python setup.py bdist_egg svnauthzadminplugin-0.11$ sudo easy_install dist/SvnAuthzAdminPlugin-0.1.2._Moved.to.Trac.0.11_-py2.5.egg }}} * 過去習慣會修改的字型大小 {{{ #!diff --- /usr/share/pyshared/trac/htdocs/css/trac.css.old 2009-04-19 19:38:06.000000000 +0800 +++ /usr/share/pyshared/trac/htdocs/css/trac.css 2009-04-19 19:37:47.000000000 +0800 @@ -1,6 +1,6 @@ body { background: #fff; color: #000; margin: 10px; padding: 0; } body, th, td { - font: normal 12px Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif; + font: normal 16px Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif; } h1, h2, h3, h4 { font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; }}}