[PicGo+OSS to build a picture bed&& AutoHotKey to modify the Typora font]

0.Write in front

If you are preparing to write a blog but don’t know how to start, or you are already writing a blog but don’t know the meaning of the nouns in my title, I highly recommend you to read this article, because they are all useful tools for blogging and can greatly improve your blogging skills. It can help you improve the efficiency of your writing with Typora. That is why "if you want to do your job well, you must first sharpen your tools". Sharpen your knife and chop wood without losing sight of it. So without further ado, let's get started!

Through this article you will learn:

  1. Build a picture bed and put the pictures on the network server instead of locally. From now on, the pictures will not be displayed due to local pictures being moved or accidentally deleted.
  2. Modify font color and beautify blog page with one click

1. Alibaba Cloud Storage builds a picture bed

Software prerequisite: typora, picgo, Alibaba Cloud account installed

Recommended related video materials:

1. What is a picture bed?

2. How to use Alibaba Cloud Storage to build a picture bed

1. Operation on Alibaba Cloud official website

Step 1: Open [ Alibaba Cloud official website , search: OSS

image-20230329154252355

Step 2: Click to buy and complete the purchase

image-20230329154324000

image-20230329154652206

Step 3: Click on the management console and create the Bucket. Note that the read and write permissions here must be selected: public read

The Bucket name you created here (mine is songyonghong) is recommended to be temporarily saved in your own notepad, which will be used later when configuring picgo.

image-20230329154758595

image-20230329154945537

image-20230329155124847

Step 4: Create a directory

It is recommended to temporarily save the path you created here (my here is Blog/) to your own notepad, which will be used later when configuring picgo.

image-20230329155801051

image-20230329155853990

Step 5: Select AccessKey management and create AccessKey

It is recommended to temporarily save the t ( AccessKey ID and AccessKey Secret ) in Secret here to your own notepad, which will be used later when configuring picgo.

image-20230329155301220

image-20230329155621591

image-20230329160711855

2. Operations in PicGo

image-20230329160835173

image-20230329161117210

image-20230329161917282

3. Operations in Typora

image-20230329161342645

image-20230329161750897

Finally, if successful, click: The screenshot of the successful page to verify the image upload option is as follows:

image-20230329162009569

2. AutoHotkey changes font color

Basic software prerequisite: Typora installed

Related article information:

[1.Getting started with the AutoHotKey script](https://www.bilibili.com/video/BV1tK411T7kY/?spm_id_from=333.337.search-card.all.click&vd_source=1996bef0ab189ba0145ffc80af08a55c autohotkey)

2. How to install AutoHot and use it to modify typora font color

Step 0: Double-click to open the AutoHotKey software. Note: This software is the same as PicGo. There is no pop-up reminder when opening.

Step 1: Create a new text document on the desktop: text document.txt

image-20230329163341314

Step 2: Copy the following script language in the document

explain:

alt+1 key: change the font color to blue

alt+2 key: change the font color to orange

…(You can add or customize the button-color yourself)

#IfWinActive ahk_exe Typora.exe
{
    
    
    !1::addFontColor("blue")
    !2::addFontColor("orange")
    !3::addFontColor("red") 
    !/::addFontColor("green")
}
addFontColor(color){
    
    
    clipboard := "" 
    Send {
    
    ctrl down}c{
    
    ctrl up} 
    ; SendInput {
    
    Text} 
    SendInput {
    
    TEXT}<font color='%color%'>
    SendInput {
    
    ctrl down}v{
    
    ctrl up}
    If(clipboard = ""){
    
    
        SendInput {
    
    TEXT}</font>
    }else{
    
    
        SendInput {
    
    TEXT}</ 
    }
}

Step 3: Change the file extension to .ahk

image-20230329163811321

Step 4: Double-click to open this file

You're done here. You can try it by selecting the typora text and using the shortcut keys.

ps: You can explore other fun ways to play AutoHotKey, such as entering a few specific characters (which can be understood as shortcut keys) to enter a large section of prepared text.
You can also add this modify font color .ahk && picgo.exe && AutoHotKey.exe file to the auto-start folder to avoid having to manually double-click and double-click to open it every time.
Insert image description here

Insert image description here

Guess you like

Origin blog.csdn.net/qq_64428099/article/details/129835683