This commit is contained in:
cheney
2022-12-22 14:57:51 +08:00
parent 95f09d0ad7
commit 635587335b
2277 changed files with 408903 additions and 16 deletions
+59
View File
@@ -0,0 +1,59 @@
# MetaSelector
元数据选择器,用于文件、笔记、物体筛选,服务器规划、微服务调度等众多领域。
规则参考了 CSS 属性选择器,JQuery 属性选择器。
- 便于生成、书写
- 便于解析、阅读
- 便于执行
- 支持 url 形式属性编码
- 支持异步属性加载
多语言支持
- `java` 实现去往 [这里](https://github.com/CheneyWong/MetaSelector.js)。
- `javascript` 实现去往[这里](https://github.com/CheneyWong/MetaSelector)。
- 语法实验室去往这里。
## 语法介绍
元数据以属性(attribute) 和值 (value) 的形式描述,包裹在 `[]` 之中。
### 基本选择器
- `[attribute]` 包含某个属性
- `[attribute=undefined]` 不包含某个属性
- `[attribute=value]` 属性等于某值
- `[attribute*=value]` 属性包含某个值
- `[attribute|=value]` 属性以某值标记的开头(value 后面必须有内容且不能紧跟字母和数字,eg. `btn-user`、`btn-*`、`btn-`、`btn.user`)。
- `[attribute^=value]` 属性以某值开头
- `[attribute$=value]` 属性以某值结尾
- `[attribute!=value]` 属性不等于某值
### 特殊符号
- 特殊符号(组1):`[`,`]`,`=`,`*`,`|`,`^`,`$`,`!`,`,`
- 特殊符号(组2):`'`,`"`
- 特殊符号(组3):`/`
- 特殊符号(组4):`undefined`
> 特殊符号使用注意
- 默认属性和值中间不能包含特殊符号(组1)。
- 如果属性和值中确实需要使用特殊符号(组1),那么需要将属性或值用单引号或双引号包裹起来。此时可以使用特殊符号(组1)但是不能使用特殊符号(组2)
- 当操作符是 `=` 时, 属性或值如果以 `//` 包裹起来,则以正则规则处理。
- `undefined` 表示不存在, 字符串 `undefined` 也等于不存在。
- 空格(其他空白字符)不是特殊符号,按照其原本的样子匹配,属性和值都可以以空白开头和结尾,书写时请注意避免不必要的空白。
## 数值选择器
- `[attribute==number]` 属性等于某值
- `[attribute>number]` 属性大于某值
- `[attribute>=number]` 属性大于等于某值
- `[attribute<number]` 属性小于某值
- `[attribute<=number]` 属性小于等于某值
## 组合选择器
- 逻辑与 `[s1][s2]`
- 逻辑或 `[s1],[s2]`
- 组合逻辑 `[s1],[s2][s3],[s4]` 逻辑与总是优先于逻辑或执行。
## 联系
postmaster(a)fullstack.club
+1 -1
View File
@@ -1,5 +1,5 @@
- title: 万荣3D
url: https://honor3.com/
url: http://honor3.com/
description: 万荣3D荣耀立方
- title: 个人博客
url: https://gpio.me
+21 -1
View File
@@ -29,6 +29,26 @@
list:
- term: 在线工具
links:
- title: ASN.1
url: /swa/window.html?to=%2Fswa%2Fasn1%2Findex.html
logo: duolao.png
description: 解析 ASN.1
- title: 无线支付密码器
url: /swa/window.html?to=%2Fswa%2Fcpe%2Findex.html
logo: svgomg.png
description: 无线支付密码器
- title: Key 发行器
url: /swa/window.html?to=%2Fswa%2Fu%2Findex.html
logo: u.png
description: UKey 发行器
- title: IC 卡发行器
url: /swa/window.html?to=%2Fswa%2Fic%2Findex.html
logo: ic.png
description: IC 卡发行器
- title: JS Playground
url: https://jsfiddle.net/
logo: uikitme.png
description: 共享前端设计代码
- title: tinypng
url: https://tinypng.com/
logo: tinypng.png
@@ -54,7 +74,7 @@
logo: svgomg.png
description: SVG 在线压缩平台。
- title: 稿定抠图
url: https://www.gaoding.com
url: https://koutu.gaoding.com/
logo: gaoding.png
description: 免费在线抠图软件,图片快速换背景-抠白底图。
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -7,8 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="viggo" />
<title>{{ .Site.Title }}</title>
<meta name="keywords" content="Webstack Hugo theme">
<meta name="description" content="Webstack Hugo theme">
<link rel="shortcut icon" href="../assets/images/favicon.ico">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Arimo:400,700,400italic">
<link rel="stylesheet" href="../assets/css/fonts/linecons/css/linecons.css">
@@ -52,7 +50,7 @@
</a>
</div>
<div class="navbar-mobile-clear"></div>
<a href="{{ $.Site.Params.repository }}" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="../assets/images/forkme_on_github_right_darkblue.png" alt="Fork me on GitHub"></a>
<!-- <a href="{{ $.Site.Params.repository }}" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="../assets/images/forkme_on_github_right_darkblue.png" alt="Fork me on GitHub"></a>-->
</div>
</nav>
<div class="page-container">
-10
View File
@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
@@ -55,7 +55,7 @@ a img.aligncenter{display:block;margin-left:auto;margin-right:auto}
.sidebar-logo{height:74px;transition:background-color .2s}
.sidebar-logo img{max-height:40px}
.sidebar-menu{transition:all .3s;}
.sidebar-nav .flex-bottom a,.sidebar-menu-inner a{display:block;overflow:hidden;padding-left:1.125rem;line-height:40px;max-height:40px;color:#b2b8be;transition:all .3s}
.sidebar-nav .flex-bottom a,.sidebar-menu-inner a{display:block;overflow:hidden;padding-left:1.5rem;line-height:40px;max-height:40px;color:#b2b8be;transition:all .3s}
.sidebar-menu ul:first-child > li> a,.sidebar-menu ul:first-child > li> a span{ line-height:50px;max-height:50px;}
.sidebar-menu-inner .sidebar-item .sidebar-item >ul>li a span{margin-left:60px}
.sidebar-item{position:relative;display:block}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB