Etherpad:修訂版本之間的差異

出自福留子孫
跳轉到: 導覽搜尋
附錄、DS218上共筆頁列表
附錄、DS218上共筆頁列表
第 94 行: 第 94 行:
 
#pad:頁名:revs:數字:版本
 
#pad:頁名:revs:數字:版本
 
#pad:頁名:chat:數字:聊天
 
#pad:頁名:chat:數字:聊天
 +
 +
其中「052402」頁,是 2021.5.24 上課時,第二組的紀錄

2021年5月26日 (三) 21:27的修訂版本

一、安裝

前置準備:

  1. 一個 OS 專用於 etherpad 的帳號,如 adminNas
  2. root 權限

安裝步驟

  1. 進 OS 取得 root 權限
  2. cd 到 web 服務的根目錄
  3. git clone https://github.com/ether/etherpad-lite.git
    會建立 etherpad-lite 目錄
  4. chown -R adminNas:administrators ./etherpad-lite
  5. 回復到 adminNas 的帳號身份
  6. cd etherpad-lite
  7. bin/run.sh

納入排程:

  1. 去「DSM/控制台/任務排程表/新增」
  2. 任務名稱:可取「run etherpad」(無法用英文)
  3. 使用者帳號:adminNas
  4. 「排程/在以下日期執行/不重複」
  5. 任務設定:「bash /volume1/web/etherpad-lite/bin/run.sh」
  6. 回到「控制台/任務排程表」挑選剛才新增的任務,按「執行」按鈕

額外的安裝布驟:

  1. bin/run.sh --root
  2. export NODE_ENV=production

二、使用

  1. http://jendo.org:9001
  2. http://jendo.org:9001/p/頁名 // 進入某頁
  3. http://jendo.org:9001/admin // 安裝 Plugin 或編輯設定檔(暫未能進入)

刪除一篇便箋(pad)

http://網址:9001/api/1/deletePad?padID=便箋名&apikey=.......
apikey 去 APIKEY.txt 中查閱

三、進階設定

編輯 settings.json

(一)使用 MySQL 在資料

用多行註解註解掉:

"dbType": "dirty",
"dbSettings": {
  "filename": "var/dirty.db"
},

改成:

"dbType" : "mysql",
"dbSettings" : {
  "user":     "某使用者",
  "host":     "localhost",
  "port":     3306,
  "password": "密碼",
  "database": "etherpad",
  "charset":  "utf8mb4"
},

(二)須登入(至今皆失敗)

  1. "requireAuthentication" : true,
  2. "users":{} // 諸帳號

三、圖示

圖示是被做成字型使用,並且套用「Font_Awesome_5」

  • 由主介面看原始碼,查 button 標籤的 class 屬性,查到諸圖示類別有:
    1. buttonicon-bold
    2. buttonicon-italic
    3. buttonicon-underline
    4. buttonicon-strikethrough
    5. buttonicon-insertorderedlist
    6. buttonicon-insertunorderedlist
    7. buttonicon-indent
    8. buttonicon-outdent
    9. buttonicon-undo
    10. buttonicon-redo
    11. buttonicon-clearauthorship
    12. buttonicon-import_export
    13. buttonicon-history
    14. buttonicon-savedRevision
    15. buttonicon-settings
    16. buttonicon-embed
    17. buttonicon-showusers
    18. btn-primary
    19. btn-default
    20. chatloadmessages
  • 由 src/static/css/pad/icons.css 中查到上述各類別的字形編碼
  • 由 src/static/font/fontawesome-etherpad.svg 中的各 glyph 標籤 unicode 屬性,查出其向量繪圖資料

四、參考文件

  1. https://benson82208.pixnet.net/blog/post/44426446-線上多人共同編輯-etherpad-安裝
  2. https://docs.gandi.net/zh-hant/cloud/tutorials/etherpad_lite.html
  3. https://gis90.github.io/articles/7544/
  4. http://www.unixlinux.online/unixlinux/gdliunx/linuxj/201703/96960.html
  5. 以太墊的安裝與使用

附錄、DS218上共筆頁列表

SQL 指令:SELECT `key` FROM store WHERE `key` LIKE 'pad:%' AND `key` NOT LIKE '%:revs:%' AND `key` NOT LIKE '%:chat:%'

key:

  1. pad:頁名:該頁當前版本內容
  2. pad:頁名:revs:數字:版本
  3. pad:頁名:chat:數字:聊天

其中「052402」頁,是 2021.5.24 上課時,第二組的紀錄