Skip to content

Instantly share code, notes, and snippets.

View drobune's full-sized avatar

Yuichi Sano drobune

View GitHub Profile
#!/bin/bash -e
# take screenshot to clipboard
#flameshot gui -r | xclip -selection clipboard -t image/png
selection=$(hacksaw -f "-i %i -g %g")
shotgun $selection - | xclip -t 'image/png' -selection clipboard
@drobune
drobune / convert.js
Last active March 14, 2025 07:14
cosense_to_google_docs
// 代表的なページタイプを取得して、最終的な移行計画を作成
const fileContent = await window.fs.readFile('tdwda.json', { encoding: 'utf8' });
// ページタイトルとIDのマッピングを作成(後でディレクトリ構造に使用)
const titleToIdMap = {};
const pagePattern = /"title":"([^"]+)","created":(\d+),"updated":(\d+),"id":"([^"]+)","views":(\d+)/g;
let match;
while ((match = pagePattern.exec(fileContent))) {
const title = match[1];