Set up note files (typera + picgo + gitee) in ubuntu system (whole process record)
System configuration: Ubuntu 18.04
1. Install typora
Execute the following commands from the command line:
# or run: # sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add - # add Typora's repository sudo add-apt-repository 'deb https://typora.io/linux ./' sudo apt-get update # install typora sudo apt-get install typora
2. Install PicGo
- Picgo hairstyle catalog Select the distribution with suffix AppImage to download.
- After downloading, right-click picgo-2.3.0. Appimage - > properties - > select allow file as the execution program.
- Double click to run and this sign will appear on the desktop.
- Right click - > open the details window - > select plug-in settings - > select gitee for installation.
- Then open the Gitee drawing bed (like the one below), OK, hold it like this, and we begin to prepare the contents that cover the red part below.
Create Gitee's drawing bed warehouse
- You need a Gitee account( Gitee official website).
- Create a new warehouse.
- Back to the home page
- Click private token - > generate token.
- Check all permissions - > submit - > enter password - > get token - > save your token.
Installing nodejs
- If there is an old version of nodejs, uninstall it first.
sudo apt-get remove nodejs
- nodejs official website Download the latest version.
- After downloading, unzip and find these in it.
- Let's first create a nodejs folder under the / usr/local/lib folder.
cd /usr/local/lib mkdir nodejs
- Then move the extracted nodejs files to the / usr/local/lib/nodejs folder, and create environment variables.
sudo cp -r node-v12.8.3-linux-x64/* /usr/local/lib/nodejs echo "export export PATH=/usr/local/lib/nodejs/bin:$PATH" >> ~/.bashrc echo "export export PATH=/usr/local/lib/nodejs/bin:$PATH" >> ~/.bashrc . ~/.profile . ~/.bashrc
- Test whether the installation was successful (the version number is displayed).
node -v npm -v
- Then provide some soft connections to the command line execution of ubuntu.
sudo ln -s /usr/local/lib/nodejs/bin/node /usr/bin/node sudo ln -s /usr/local/lib/nodejs/bin/npm /usr/bin/npm sudo ln -s /usr/local/lib/nodejs/bin/npx /usr/bin/npx sudo ln -s /usr/local/lib/nodejs/bin/cnpm /usr/local/bin/cnpm sudo ln -s /usr/local/lib/nodejs/bin/picgo /usr/local/bin/picgo
- Configure cnpm.
sudo npm install -g cnpm
- Install picgo core.
sudo cnpm install picgo -g
- Install the plug-in picgo plugin gitee uploader
picgo install gitee-uploader
- Modify the configuration file of picgo core.
Then fill in your own according to the settings below.gedit ~/.picgo/config.json
{ "picBed": { "current": "gitee", "uploader": "gitee", "smms": { "token": "" }, "gitee": { "message": null, "owner": "guo_song_hui",#Fill in the gitee user name yourself "path": "img", "repo": "guo_song_hui/image", #User name / warehouse name "token": "11111111111111111111111111" #Write your own token } }, "picgoPlugins": { "picgo-plugin-gitee": true, "picgo-plugin-gitee-uploader": true }, "picgo-plugin-gitee-uploader": { "lastSync": "2021-11-04 04:47:42" } }
Configure Typora integrated picgo core
- Click on Typora's preferences
- Configure Typora integration PicGo-c
According to the above settings, fill in / usr/local/lib/nodejs/bin/node /usr/local/lib/nodejs/bin/picgo upload in the command
Then click to verify the image upload to see if it can succeed