This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require('vendor/autoload.php'); | |
use League\HTMLToMarkdown\HtmlConverter; | |
/* 將 xuite 的 mt text 轉換為 hugo 的 md 檔 | |
requirement: https://github.com/thephpleague/html-to-markdown | |
注意: 檔名 blog_YYYYmmdd.md based on date, 也就是 mt 檔案中的 DATE 欄位. 若一天有兩篇則要另外改寫此程式處理. | |
md 會放在 posts/ | |
images 會放在 assets/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""---------------------------------------------------------------------------------- | |
Imports (do not change) | |
----------------------------------------------------------------------------------""" | |
import datetime | |
import os | |
import os.path | |
import subprocess | |
import sys | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## KiTTY can do auto-login, and initial command. | |
## | |
## start first Kitty to get OTP | |
$app = Start-Process -FilePath C:\Users\happyman\Desktop\kitty_portable-0.74.4.13.exe -ArgumentList '-load soptima' -passthru | |
Write-Output "get OTP and sleep 15 secs" | |
Start-Sleep -s 15 | |
taskkill /PID $app.Id /f | |
Write-Output "re-spawn kitty soptima" | |
$otp = (python .\otp.py) |