Scrapbox:メモする
HTML + JavaScript
code:memo.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Scrapbox Memo</title>
<script type="text/javascript">
project = 'suto3' // 自分のプロジェクト名
d = new Date()
year = d.getYear() + 1900
month = ('0' + (d.getMonth()+1)).slice(-2)
day = ('0' + d.getDate()).slice(-2)
hour = ('0' + d.getHours()).slice(-2)
min = ('0' + d.getMinutes()).slice(-2)
sec = ('0' + d.getSeconds()).slice(-2)
location.href = https://scrapbox.io/${project}/${year}${month}${day}${hour}${min}${sec}
</script>
</head>
</html>
Ruby
code:memo.rb
project = 'suto3' # 自分のプロジェクト名
title = Time.now.strftime('%Y-%m-%d-%H:%M:%S')
Python
code:memo.py
# -*- coding: utf-8 -*-
import subprocess
from datetime import datetime
browser="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
output = subprocess.run(browser,url, check=True, stdout=subprocess.PIPE).stdout 実行
$ memo.py
bash
code:memo.sh
macos では、open を使う
code:memo1.sh
Linuxでは、xdg-open を使う
code:memo2.sh
Windows バッチファイル
code:memo.bat
@echo off
REM 日付を年、月、日に分解する
set d=%date%
set year=%d:~-10,4%
set month=%d:~-5,2%
set day=%d:~-2,2%
REM 時間を時、分、秒に分解する
set t=%time: =0%
set hour=%t:~0,2%
set minute=%t:~3,2%
set second=%t:~6,2%
exit
Windows PowerShell
code:memo.ps1
$Today = (Get-Date).ToString("yyyy-MM-dd-HH:mm:ss")
Scrapbox-tools.icon
memo.icon