markit은(는) 무엇을 하나요?
모든 것을 마크다운으로 변환합니다.
CLI
# 파일 변환
npx @shiftlabs/markit report.pdf -q
# URL 변환
npx @shiftlabs/markit https://en.wikipedia.org/wiki/Markdown -q
# GitHub URL (저장소, 파일, Gist, 이슈, PR)
npx @shiftlabs/markit https://github.com/owner/repo -q
npx @shiftlabs/markit https://github.com/owner/repo/issues/42 -q
npx @shiftlabs/markit https://gist.github.com/user/id -q
# 파일로 저장
npx @shiftlabs/markit document.docx -q -o output.md
# 모든 옵션 보기
npx @shiftlabs/markit --help
# 지원 형식 보기
npx @shiftlabs/markit formats
-q 플래그는 원시 마크다운을 출력합니다. --json 플래그는 { markdown, title } 객체를 반환합니다.
SDK
import { Markit } from "@shiftlabs/markit";
const markit = new Markit();
const { markdown } = await markit.convertFile("report.pdf");
const { markdown } = await markit.convertUrl("https://example.com");
const { markdown } = await markit.convert(buffer, { extension: ".docx" });