--- title: '開發控制PPT' disqus: hackmd --- 開發控制PPT === ## Table of Contents [TOC] ## 1. 整體架構 1.訂閱頻道(PPT_COMMAND),接收來自Redis傳過來的command 2.接收後執行虛擬按鍵(keyboard)控制ppt動作 ex:上下頁 回首頁等 ## 2. 下載位置(尚未完成) 用repo 下載會包含錄音APP資料夾 缺repo 或單純下載ppt_control ```gherkin= $ git clone https://github.com/masteree108/OS_PPT_control.git ``` ## 3. 安裝python套件包 由於在python上開發,需要如下的套件模組 ```gherkin= $ pip install redis $ pip install keyboard $ pip install pyinstaller $ pip install ujson ``` ## 4. 按鍵定義解說 接收command後,做出相對應的動作 左邊為聲音辨視command,右邊為做出相對應動作 ```gherkin= yes: no: up: Home按鍵(回首頁) down: End按鍵(至最後一頁) left: n按鍵(上一頁) right: p按鍵(下一頁) on: off: stop: go: F5按鍵(全螢幕) silence: zero: cat: bird: marvin: bed: house: wow: happy: sheila: dog: _silence_: one: two: three: four: five: six: seven: eight: nine: ``` ## 5. 製作IP+密碼文件 為了方便讀取IP和密碼(自己管理不要上傳) 請在ip_pwd.json填入相關訊息,也可用ip_pwd_format.json修改 ```gherkin= {"ip":"填入ip","pwd":"填入密碼"} ``` ## 6. 製作ppt_control.exe 請到project位置,執行build_exe.sh ```gherkin= $ cd project_path $ ./build_exe.sh *注意window10請自行下載cygwin來執行 製作完成會在project資料夾上產生ppt_control.exe ``` ## 7. 使用ppt_control.exe 請照以下步驟在執行ppt_control.exe ```gherkin= 連vpn 執行ppt_control.exe,確認出現"connected to redis server!!"訊息 打開ppt,等帶接收指令 ``` ## 參考文件 [虛擬keyboard](https://github.com/boppreh/keyboard) [python thread queue](https://blog.gtwang.org/programming/python-threading-multithreaded-programming-tutorial/)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up