banner
acevs

acevs

x
mastodon

Obsidian to Hugo MD format cursor Python exe program generation

hugo page ACEVS
Long time no update
Previously, I manually modified each document to Hugo's format and then operated with git.
Due to laziness, I accumulated over 100 documents.
I tried two Obsidian plugins but failed.
There were no error messages.
I might still be unfamiliar with Obsidian.
There was also a JavaScript that didn't run successfully.
I installed vscode again.
I found it very similar to the cursor interface, even the plugin library is quite similar.
I had used cursor a few times before for prompts.
I wrote a Tetris game in Python.
Then I installed the dependencies as prompted.
Then I could directly play Tetris.

This time the prompt was to use Python to convert Obsidian MD to Hugo MD.
I found that the format after conversion was Hugo's default,
which was different from what I originally had.
Again prompted +++ title etc. +++
Cursor said it was Hugo TOML format.
After conversion, it was successful,
but I still had to input the folder address twice via keyboard.
I suggested directly changing it to mouse selection for the folder,
then packaging it into zip format, and running it directly after extraction.
Testing was successful.
I found that Hugo's time still needed to be opened for modification.
The batch processing used the current time.
I suggested using the creation time to replace that time.
I found it didn't work, and later looked closely to find it was the modification time replacing that time.
In the end, I basically achieved the current requirements.
Upload to cloud storage.
I don't know if it works on all computers.
explorer_IZHdRRzC5P.png
Obsidian2Hugo_yIAL0g7Uy8.png
File shared via cloud storage: Obsidian2Hugo.zip
Link: https://pan.baidu.com/s/1ONC2FcERyy3RKogHmquUIw?pwd=vpxx Extraction code: vpxx Copy this content and open the Baidu Cloud Storage mobile app for easier operation.

Other references
Small script for converting Obsidian to Hugo - Hotine's little nest
Obsidian to Hugo converter user guide - CSDN Blog
Writing Hugo blog posts elegantly with Obsidian | Ziyantang - Yuk's Blog

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.