Typora結合Git打造完美的個人雲筆記本


Typera是一款非常好用的markdown編輯器,我之前一直用這個軟件記錄自己的學習筆記,但是由於一些原因,我僅僅只能將這些筆記存在本地,昨天突然突發奇想
假如我將它和Git結合一下會不會就能打造自己的雲筆記本了?上網搜索后,發現已經有人這樣做了,我自己也實驗了一下,確實很香。

安裝軟件

Typora

https://www.typora.io/windows/typora-setup-x64.exe

Git

https://git-scm.com/download/win

由於Git需要一些基本的配置,我已經配置好了,當初我是跟着廖雪峰老師的教程配置的:https://www.liaoxuefeng.com/wiki/1177760294764384

配置遠程倉庫

首先我們要注冊一個github,然后開一個倉庫作為自己的筆記倉庫

修改typera圖片默認的位置

文件->偏好設置->圖像->輸入相對路徑,我這里輸入的是./images,保持相對路徑同步到github上才可以順利的看到自己的圖片

修改主題

文件->偏好設置->外觀->從網站上下載一個主題壓縮包->將解壓后的文件夾中的所有文件粘貼到主題目錄中

主題目錄位置在:

文件->偏好設置->外觀->打開主題文件夾

進入自己的本地文件夾

依次輸入命令

git init
git add *
git commit -m "first commit"
git remote add origin https://gitee.com/xxxx/markdownFile.git
git push -u origin master

創建推送分支和拉取分支的腳本

GitPull.bat

echo "git pull orgin master...."

git pull origin master

GitPush.bat

echo "Start submitting code to the local repository"
echo "The current directory is:%cd%"
git add *
echo;



echo "Commit the changes to the local repository"
echo "please enter the commit info...."
set /p message=
set now=%date% %time%
echo %now%
git commit -m "%now% %message%"
echo;
 
echo "Commit the changes to the remote git server"
git push
echo;
 
echo "Batch execution complete!"
echo;

之后當你寫完推送上去點擊推送腳本就可以了,獲取最新筆記只需要點擊拉取腳本就可以了,很方便

參考:https://blog.csdn.net/oPengXiaoLiang/article/details/100678908


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM