├── .gitignore ├── packages ├── html2sb │ ├── .gitignore │ ├── src │ │ ├── index.ts │ │ ├── command │ │ │ ├── index.ts │ │ │ └── command.ts │ │ └── main.ts │ ├── biome.json │ ├── tsconfig.json │ ├── test │ │ ├── evernote-html.test.ts │ │ └── fixtures │ │ │ ├── scrapbox │ │ │ └── evernote │ │ │ │ └── test.txt │ │ │ └── html │ │ │ └── evernote │ │ │ └── test.html │ ├── README.md │ ├── LICENSE │ ├── package.json │ └── CHANGELOG.md ├── md2sb │ ├── .gitignore │ ├── test │ │ ├── fixtures │ │ │ ├── md │ │ │ │ ├── strike.md │ │ │ │ ├── strong-italic.md │ │ │ │ ├── italic.md │ │ │ │ ├── strong.md │ │ │ │ ├── code.md │ │ │ │ ├── image.md │ │ │ │ ├── link-includes-image.md │ │ │ │ ├── blockquote.md │ │ │ │ ├── link.md │ │ │ │ ├── hr.md │ │ │ │ ├── heading.md │ │ │ │ ├── paragraph.md │ │ │ │ ├── list-strong-style-text.md │ │ │ │ ├── list.md │ │ │ │ ├── codeblock.md │ │ │ │ ├── table.md │ │ │ │ └── sample-ja.md │ │ │ └── scrapbox │ │ │ │ ├── strike.txt │ │ │ │ ├── strong-italic.txt │ │ │ │ ├── image.txt │ │ │ │ ├── italic.txt │ │ │ │ ├── strong.txt │ │ │ │ ├── code.txt │ │ │ │ ├── link-includes-image.txt │ │ │ │ ├── link.txt │ │ │ │ ├── blockquote.txt │ │ │ │ ├── hr.txt │ │ │ │ ├── heading.txt │ │ │ │ ├── paragraph.txt │ │ │ │ ├── table.txt │ │ │ │ ├── list-strong-style-text.txt │ │ │ │ ├── list.txt │ │ │ │ └── codeblock.txt │ │ ├── complexText.test.ts │ │ ├── simpleReteral.test.ts │ │ ├── textDecoration.test.ts │ │ └── helpers │ │ │ └── loadAndAssert.ts │ ├── biome.json │ ├── src │ │ ├── index.ts │ │ ├── command │ │ │ ├── index.ts │ │ │ └── command.ts │ │ ├── libs │ │ │ ├── addListItemCount.ts │ │ │ ├── generateCodeBlock.ts │ │ │ └── compiler.ts │ │ └── main.ts │ ├── tsconfig.json │ ├── README.md │ ├── package.json │ └── CHANGELOG.md ├── html2sb-compiler │ ├── .npmignore │ ├── test │ │ ├── fixtures │ │ │ ├── entities.txt │ │ │ ├── entities.html │ │ │ ├── evernote-multipage-1.txt │ │ │ ├── evernote-multipage-2.txt │ │ │ ├── evernote-multipage-3.txt │ │ │ ├── invalid-list-in-list.txt │ │ │ ├── hr.html │ │ │ ├── invalid-list-in-list.html │ │ │ ├── simple-paragraph.txt │ │ │ ├── simple-paragraph.html │ │ │ ├── invalid-text-in-table.txt │ │ │ ├── table-in-div.txt │ │ │ ├── complex-paragraph.txt │ │ │ ├── evernote.txt │ │ │ ├── links-empty.txt │ │ │ ├── hr.txt │ │ │ ├── list-of-links.txt │ │ │ ├── images.txt │ │ │ ├── invalid-text-in-table.html │ │ │ ├── images.html │ │ │ ├── complex-paragraph.html │ │ │ ├── table.txt │ │ │ ├── styled-code.txt │ │ │ ├── list-of-links.html │ │ │ ├── formatting.txt │ │ │ ├── list-skipped-inheritance.txt │ │ │ ├── text-styles.txt │ │ │ ├── links-empty.html │ │ │ ├── links.txt │ │ │ ├── entities.json │ │ │ ├── list.txt │ │ │ ├── blocks.txt │ │ │ ├── evernote.json │ │ │ ├── list-in-list.txt │ │ │ ├── text-styles.html │ │ │ ├── evernote-multipage-1.json │ │ │ ├── evernote-multipage-2.json │ │ │ ├── evernote-multipage-3.json │ │ │ ├── links.html │ │ │ ├── table-in-div.html │ │ │ ├── header.txt │ │ │ ├── hr.json │ │ │ ├── images.json │ │ │ ├── list-wrong-inheritance.txt │ │ │ ├── list-of-links.json │ │ │ ├── code.txt │ │ │ ├── invalid-list-in-list.json │ │ │ ├── blocks.html │ │ │ ├── list.html │ │ │ ├── evernote.html │ │ │ ├── header.html │ │ │ ├── styled-code.html │ │ │ ├── list-in-list.html │ │ │ ├── simple-paragraph.json │ │ │ ├── invalid-text-in-table.json │ │ │ ├── list-skipped-inheritance.html │ │ │ ├── table.html │ │ │ ├── formatting.html │ │ │ ├── links-empty.json │ │ │ ├── styled-code.json │ │ │ ├── links.json │ │ │ ├── list-wrong-inheritance.html │ │ │ ├── complex-paragraph.json │ │ │ ├── code.json │ │ │ ├── table-in-div.json │ │ │ ├── formatting.json │ │ │ ├── code.html │ │ │ ├── text-styles.json │ │ │ ├── evernote-multipage.html │ │ │ ├── blocks.json │ │ │ ├── list.json │ │ │ ├── complex.txt │ │ │ ├── header.json │ │ │ ├── list-in-list.json │ │ │ ├── list-skipped-inheritance.json │ │ │ ├── table.json │ │ │ ├── list-wrong-inheritance.json │ │ │ └── complex.html │ │ └── fixtures.test.ts │ ├── .gitignore │ ├── .eslintrc.js │ ├── tsconfig.build.json │ ├── src │ │ ├── index.ts │ │ ├── guessTitle.ts │ │ ├── toScrapbox.ts │ │ └── parse.ts │ ├── tsconfig.json │ ├── biome.json │ ├── package.json │ └── CHANGELOG.md ├── scrapbox-converter │ ├── .gitignore │ ├── biome.json │ ├── src │ │ ├── index.ts │ │ ├── libs │ │ │ ├── loader │ │ │ │ ├── md.ts │ │ │ │ ├── enex.ts │ │ │ │ └── html.ts │ │ │ └── findAndLoadFiles.ts │ │ └── command.ts │ ├── tsconfig.json │ ├── README.md │ ├── package.json │ ├── LICENSE │ └── CHANGELOG.md └── enex2sb │ ├── .gitignore │ ├── biome.json │ ├── src │ ├── index.ts │ ├── command │ │ ├── index.ts │ │ └── command.ts │ ├── node.ts │ ├── browser.ts │ ├── libs │ │ └── uploadImage.ts │ ├── browser │ │ └── uploadImage.ts │ └── main.ts │ ├── tsconfig.json │ ├── test │ ├── fixtures │ │ ├── example.sb.txt │ │ └── multiple.enex │ ├── multiple.test.ts │ └── example.test.ts │ ├── README.md │ ├── LICENSE │ ├── package.json │ └── CHANGELOG.md ├── pnpm-workspace.yaml ├── .changeset └── config.json ├── tsconfig.base.json ├── README.md ├── package.json ├── .github └── workflows │ ├── nodejs.yml │ └── npmpublish.yml ├── biome.json └── CHANGELOG.md /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /packages/html2sb/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/md2sb/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /packages/scrapbox-converter/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/enex2sb/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/**' 3 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/md/strike.md: -------------------------------------------------------------------------------- 1 | ~~strike text~~ 2 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/scrapbox/strike.txt: -------------------------------------------------------------------------------- 1 | [- strike text] 2 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/entities.txt: -------------------------------------------------------------------------------- 1 | Untitled 2 | 寿司 3 | -------------------------------------------------------------------------------- /packages/html2sb/src/index.ts: -------------------------------------------------------------------------------- 1 | module.exports = require("./main"); 2 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/md/strong-italic.md: -------------------------------------------------------------------------------- 1 | ***strong italic*** 2 | -------------------------------------------------------------------------------- /packages/enex2sb/biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../biome.json"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/html2sb/biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../biome.json"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/md2sb/biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../biome.json"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/md/italic.md: -------------------------------------------------------------------------------- 1 | _italic_ 2 | 3 | *alt italic* 4 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/scrapbox/strong-italic.txt: -------------------------------------------------------------------------------- 1 | [/* strong italic] 2 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/entities.html: -------------------------------------------------------------------------------- 1 |
寿司
2 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/evernote-multipage-1.txt: -------------------------------------------------------------------------------- 1 | ノート1 2 | 本文1 3 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/evernote-multipage-2.txt: -------------------------------------------------------------------------------- 1 | ノート2 2 | 本文2 3 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/evernote-multipage-3.txt: -------------------------------------------------------------------------------- 1 | ノート3 2 | 本文3 3 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/invalid-list-in-list.txt: -------------------------------------------------------------------------------- 1 | List (?) 2 | 3 | -------------------------------------------------------------------------------- /packages/md2sb/src/index.ts: -------------------------------------------------------------------------------- 1 | import main from "./main"; 2 | export default main; 3 | -------------------------------------------------------------------------------- /packages/md2sb/test/fixtures/md/strong.md: -------------------------------------------------------------------------------- 1 | __string__ 2 | 3 | **alt string** 4 | -------------------------------------------------------------------------------- /packages/enex2sb/src/index.ts: -------------------------------------------------------------------------------- 1 | import main from "./node"; 2 | export default main; 3 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/.gitignore: -------------------------------------------------------------------------------- 1 | yarn.lock 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/hr.html: -------------------------------------------------------------------------------- 1 |Hello
World
| cell |
2 | Hello
3 |World
4 |paragraph 1
writing


4 |
5 | Some text other than an image and bold as well
6 | | whos | 6 |house | 7 |runs | 8 |
7 |9 |A little bit of this, a little bit of that, a little bit of everything lets me8 |
10 |12 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/list.html: -------------------------------------------------------------------------------- 1 |11 |Indent a little further


| whos | 5 |house | 6 |runs | 7 |
superhouse |
10 | I |
11 | 12 | |
| 16 | | ||
whos |
21 | house? | 22 |
6 | function foo () {}
7 |
8 |
9 | function bar () {}
10 |
11 |
12 | warn $user->name;
13 |
14 | 15 | user.name 16 |-------------------------------------------------------------------------------- /packages/enex2sb/src/command/command.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "node:fs"; 2 | import * as path from "node:path"; 3 | import { program } from "commander"; 4 | import enex2sb from "./../node"; 5 | const settings = require("../../package.json"); // eslint-disable-line @typescript-eslint/no-var-requires 6 | 7 | let stdin = ""; 8 | 9 | program 10 | .version(settings.version) 11 | .description((settings as any).description) 12 | .usage("\n\tenex2sb [file] \n\tcat hoge.enex | enex2sb") 13 | .arguments("[file]") 14 | .action(async (file) => { 15 | if (!process.env.GYAZO_ACCESS_TOKEN) 16 | return console.error( 17 | "You should set env-value GYAZO_ACCESS_TOKEN to your Gyazo access token get from https://gyazo.com/oauth/applications", 18 | ); 19 | const pages = await enex2sb(fs.readFileSync(path.resolve(file))); 20 | console.log(JSON.stringify({ pages }, null, 2)); 21 | }); 22 | 23 | if (process.stdin.isTTY) { 24 | program.parse(process.argv); 25 | } else { 26 | process.stdin.on("readable", () => { 27 | const chunk = process.stdin.read(); 28 | if (chunk !== null) { 29 | stdin += chunk; 30 | } 31 | }); 32 | process.stdin.on("end", async () => { 33 | if (!process.env.GYAZO_ACCESS_TOKEN) 34 | return console.error( 35 | "You should set env-value GYAZO_ACCESS_TOKEN to your Gyazo access token get from https://gyazo.com/oauth/applications", 36 | ); 37 | console.log(JSON.stringify({ pages: await enex2sb(stdin) }, null, 2)); 38 | }); 39 | } 40 | -------------------------------------------------------------------------------- /packages/html2sb-compiler/test/fixtures/text-styles.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": null, 3 | "children": [ 4 | { 5 | "type": "text", 6 | "bold": true, 7 | "italic": true, 8 | "text": "text" 9 | }, 10 | { 11 | "type": "text", 12 | "italic": true, 13 | "bold": true, 14 | "text": "text" 15 | }, 16 | { 17 | "type": "text", 18 | "children": [ 19 | { 20 | "type": "text", 21 | "bold": true, 22 | "text": "a text" 23 | }, 24 | { 25 | "type": "text", 26 | "text": "not really but" 27 | }, 28 | { 29 | "type": "text", 30 | "bold": true, 31 | "text": "b text" 32 | } 33 | ], 34 | "italic": true 35 | }, 36 | { 37 | "type": "br", 38 | "force": true 39 | }, 40 | { 41 | "type": "text", 42 | "children": [ 43 | { 44 | "type": "text", 45 | "strike": true, 46 | "text": "Strikethrough text" 47 | }, 48 | { 49 | "type": "text", 50 | "text": "and" 51 | } 52 | ], 53 | "bold": true 54 | }, 55 | { 56 | "type": "br", 57 | "force": true 58 | }, 59 | { 60 | "type": "text", 61 | "italic": true, 62 | "underline": true, 63 | "text": "Italic underline text too!" 64 | }, 65 | { 66 | "type": "text", 67 | "text": "some unknown tag" 68 | } 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /packages/enex2sb/test/fixtures/multiple.enex: -------------------------------------------------------------------------------- 1 | 2 | 3 |

| 1x1 | 1x2 |
2x1 | 2x2 |
) 60 | 61 | HTMLをバッククォートでインラインコード→(`
`) 62 | 63 | ## 水平線(`
`)です。`body { visibility: hidden; }`
140 |
141 | ## リンク
142 |
143 | markdownでテキストリンク [WIRED.jp](http://wired.jp/ "WIRED.jp")
144 |
145 | <カッコ>でくくってリンク whos | house | runs |
house | I | |
whos | house? |
A little bit of this, a little bit of that, a little bit of everything lets me
Indent a little further