Skip to content

Instantly share code, notes, and snippets.

@matori
matori / convertWp2Html.js
Created December 28, 2019 14:09
WordPressのREST APIで引っ張った全postデータをいい感じに加工してファイルとして出力する
const fs = require("fs")
const dayjs = require("dayjs")
const json = require("./wpdata.json")
console.log(`ファイル数:${json.length}`)
json.forEach((post, index) => {
const date = `${post.date}+09:00`
const modified = `${post.modified}+09:00`
{
"type": "Document",
"raw": "a《《1》》b《2》c《《《3》》》d|《《4》》e《《5》》f",
"range": [
0,
32
],
"loc": {
"start": {
"line": 1,
@matori
matori / example.js
Created May 26, 2024 12:53
カクヨム用一字下げスクリプト
// ==UserScript==
// @name カクヨム一字下げスクリプト
// @namespace http://tampermonkey.net/
// @version 2024-05-24
// @description try to take over the world!
// @author You
// @match https://kakuyomu.jp/works/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=kakuyomu.jp
// @grant none
// ==/UserScript==