-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,007 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<div> | ||
<div class="details custom-block !p-10px"> | ||
<input class="w-full" v-model="inputText" placeholder="这里输入原始文本, 比如网页源码" /> | ||
</div> | ||
<div class="details custom-block !p-10px"> | ||
<input class="w-full" v-model="rule" placeholder="这里输入规则, 比如 xpath, jsonpath 等等组合" /> | ||
</div> | ||
<div class="details custom-block !p-10px"> | ||
<div class="min-h-40px"> | ||
{{ outputText || '' }} | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
|
||
<script setup> | ||
import { ref, watch, nextTick } from 'vue' | ||
import { createAnalyzerManager } from '@any-reader/core/browser' | ||
const analyzerManager = createAnalyzerManager() | ||
const inputText = ref('') | ||
const rule = ref('') | ||
const outputText = ref('') | ||
watch([inputText, rule], v => { | ||
nextTick(async () => { | ||
outputText.value = await analyzerManager.getString(rule.value, inputText.value) | ||
}) | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,50 @@ | ||
import { withMermaid } from "vitepress-plugin-mermaid"; | ||
import { withMermaid } from 'vitepress-plugin-mermaid'; | ||
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'; | ||
|
||
const guide = [ | ||
{ text: '桌面端', link: '/desktop/' }, | ||
{ text: 'VSCode 插件', link: '/vsc/' }, | ||
{ text: '网页端', link: '/browser/' }, | ||
{ text: 'Docker', link: '/docker/' }, | ||
{ text: '命令行工具', link: '/cli/' }, | ||
{ text: '规则解析库', link: '/core/' } | ||
]; | ||
|
||
export default withMermaid({ | ||
base: '/any-reader/', | ||
lang: "zh-cn", | ||
title: "any-reader", | ||
titleTemplate: "any-reader", | ||
description: "", | ||
outDir: "./dist", | ||
lang: 'zh-cn', | ||
title: 'any-reader', | ||
titleTemplate: 'any-reader', | ||
description: '', | ||
outDir: './dist', | ||
head: [], | ||
lastUpdated: true, | ||
cleanUrls: true, | ||
|
||
markdown: { | ||
codeTransformers: [transformerTwoslash()] | ||
}, | ||
mermaid:{ | ||
}, | ||
mermaid: {}, | ||
|
||
themeConfig: { | ||
logo: "/logo.svg", | ||
logo: '/logo.svg', | ||
nav: [ | ||
{ text: "VSCode 插件", link: "/vsc/" }, | ||
{ text: "桌面端", link: "/desktop/" }, | ||
{ text: "网页端", link: "/browser/" }, | ||
{ text: "Docker", link: "/docker/" }, | ||
{ text: "命令行工具", link: "/cli/" }, | ||
{ text: "规则解析库", link: "/core/" }, | ||
{ text: "规则", link: "/rule/" } | ||
{ text: '指南', link: '/desktop/' }, | ||
{ text: '规则', link: '/rule/' }, | ||
{ text: '规则测试', link: '/play/' }, | ||
], | ||
search: { | ||
provider: "local", | ||
provider: 'local' | ||
}, | ||
sidebar: {}, | ||
sidebar: guide.reduce((p, v) => { | ||
p[v.link] = guide; | ||
return p; | ||
}, {}), | ||
editLink: { | ||
pattern: "https://github.com/aooiuu/any-reader/edit/master/docs/:path", | ||
text: "编辑此页面", | ||
pattern: 'https://github.com/aooiuu/any-reader/edit/master/docs/:path', | ||
text: '编辑此页面' | ||
}, | ||
socialLinks: [{ icon: "github", link: "https://github.com/aooiuu/any-reader" }], | ||
footer: {}, | ||
}, | ||
socialLinks: [{ icon: 'github', link: 'https://github.com/aooiuu/any-reader' }], | ||
footer: {} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import Theme from "vitepress/theme"; | ||
import Theme from 'vitepress/theme'; | ||
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'; | ||
import '@shikijs/vitepress-twoslash/style.css'; | ||
import 'uno.css' | ||
import RulePlay from '../components/RulePlay/index.vue'; | ||
|
||
export default { | ||
...Theme, | ||
|
||
enhanceApp({ app }) { | ||
app.use(TwoslashFloatingVue); | ||
app.component('RulePlay', RulePlay); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
> 开发中, 目前规则部分不支持 `@filter` `@js`, 暂不支持解析流程测试 | ||
<RulePlay /> | ||
|
Oops, something went wrong.