extract from field
This commit is contained in:
parent
da86d3b5d2
commit
01c28aead2
50
frontend/wizard-vue/src/components/RadioButtons.vue
Normal file
50
frontend/wizard-vue/src/components/RadioButtons.vue
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {getCurrentInstance} from "vue";
|
||||||
|
import type {Enum} from "@/urlmaker/specs.ts";
|
||||||
|
|
||||||
|
const {name, label, values} = defineProps<{
|
||||||
|
name: string
|
||||||
|
label: string,
|
||||||
|
values: Enum,
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const componentId = 'field' + getCurrentInstance()?.uid;
|
||||||
|
|
||||||
|
const model = defineModel();
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="field">
|
||||||
|
<span class="field-label"><label>{{ label }}</label></span>
|
||||||
|
<template class="value" v-for="enumValue in values">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
:name="name"
|
||||||
|
:value="enumValue.value"
|
||||||
|
:id="`${componentId}_${enumValue.value}`"
|
||||||
|
v-model="model"
|
||||||
|
/>
|
||||||
|
<label class="radio-label" :for="`${componentId}_${enumValue.value}`">{{ enumValue.label }}</label>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
div.field {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
}
|
||||||
|
.field-label {
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.radio-label {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
input, .radio-label, .field-label {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,12 +1,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {fields, InputType} from '@/urlmaker/specs.ts';
|
import {fields, InputType, type SpecField} from '@/urlmaker/specs.ts';
|
||||||
import TextField from "@/components/TextField.vue";
|
import TextField from "@/components/TextField.vue";
|
||||||
|
import RadioButtons from "@/components/RadioButtons.vue";
|
||||||
import {useWizardStore} from "@/stores/wizard.ts";
|
import {useWizardStore} from "@/stores/wizard.ts";
|
||||||
import {groupBy} from "es-toolkit";
|
|
||||||
|
|
||||||
const store = useWizardStore();
|
const store = useWizardStore();
|
||||||
|
|
||||||
const groups = groupBy(fields, item => item.group || '');
|
const groups: SpecField[][] = [];
|
||||||
|
for (const field of fields) {
|
||||||
|
if(groups.length === 0 || groups[groups.length - 1][0].group != field.group) {
|
||||||
|
groups.push([field]);
|
||||||
|
} else {
|
||||||
|
groups[groups.length - 1].push(field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -16,12 +23,22 @@ const groups = groupBy(fields, item => item.group || '');
|
|||||||
<template v-for="field in group">
|
<template v-for="field in group">
|
||||||
<TextField
|
<TextField
|
||||||
v-if="field.input_type === InputType.Url || field.input_type === InputType.Text"
|
v-if="field.input_type === InputType.Url || field.input_type === InputType.Text"
|
||||||
|
v-show="!field.show_if || field.show_if(store.specs)"
|
||||||
:name="field.name"
|
:name="field.name"
|
||||||
:label="field.label"
|
:label="field.label"
|
||||||
:input_type="field.input_type"
|
:input_type="field.input_type"
|
||||||
:model-value="store.specs[field.name]"
|
:model-value="store.specs[field.name]"
|
||||||
@update:model-value="event => store.updateSpec(field.name, event)"
|
@update:model-value="event => store.updateSpec(field.name, event)"
|
||||||
></TextField>
|
></TextField>
|
||||||
|
<RadioButtons
|
||||||
|
v-if="field.input_type === InputType.Radio"
|
||||||
|
v-show="!field.show_if || field.show_if(store.specs)"
|
||||||
|
:name="field.name"
|
||||||
|
:label="field.label"
|
||||||
|
:values="field.enum!"
|
||||||
|
:model-value="store.specs[field.name]"
|
||||||
|
@update:model-value="event => store.updateSpec(field.name, event)"
|
||||||
|
></RadioButtons>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -29,6 +46,6 @@ const groups = groupBy(fields, item => item.group || '');
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
div.group {
|
div.group {
|
||||||
margin: 6px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import {defineStore} from "pinia";
|
import {defineStore} from "pinia";
|
||||||
import {emptySpecs, type SpecField, fields, type Specs} from "@/urlmaker/specs.ts";
|
import {emptySpecs, type SpecField, fields, type Specs, type SpecValue} from "@/urlmaker/specs.ts";
|
||||||
import {computed, reactive} from "vue";
|
import {computed, reactive} from "vue";
|
||||||
import {debounce} from "es-toolkit";
|
import {debounce} from "es-toolkit";
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ export const useWizardStore = defineStore('wizard', () => {
|
|||||||
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(specs));
|
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(specs));
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
function updateSpec(fieldName: keyof Specs, newValue: string) {
|
function updateSpec(fieldName: keyof Specs, newValue: SpecValue) {
|
||||||
specs[fieldName] = newValue;
|
specs[fieldName] = newValue;
|
||||||
updateLocalStorage();
|
updateLocalStorage();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export namespace rssalchemy {
|
|||||||
selector_author?: string;
|
selector_author?: string;
|
||||||
selector_created?: string;
|
selector_created?: string;
|
||||||
created_extract_from?: ExtractFrom;
|
created_extract_from?: ExtractFrom;
|
||||||
|
created_attribute_name?: string;
|
||||||
selector_content?: string;
|
selector_content?: string;
|
||||||
selector_enclosure?: string;
|
selector_enclosure?: string;
|
||||||
cache_lifetime?: string;
|
cache_lifetime?: string;
|
||||||
@ -51,6 +52,9 @@ export namespace rssalchemy {
|
|||||||
if ("created_extract_from" in data && data.created_extract_from != undefined) {
|
if ("created_extract_from" in data && data.created_extract_from != undefined) {
|
||||||
this.created_extract_from = data.created_extract_from;
|
this.created_extract_from = data.created_extract_from;
|
||||||
}
|
}
|
||||||
|
if ("created_attribute_name" in data && data.created_attribute_name != undefined) {
|
||||||
|
this.created_attribute_name = data.created_attribute_name;
|
||||||
|
}
|
||||||
if ("selector_content" in data && data.selector_content != undefined) {
|
if ("selector_content" in data && data.selector_content != undefined) {
|
||||||
this.selector_content = data.selector_content;
|
this.selector_content = data.selector_content;
|
||||||
}
|
}
|
||||||
@ -110,6 +114,12 @@ export namespace rssalchemy {
|
|||||||
set created_extract_from(value: ExtractFrom) {
|
set created_extract_from(value: ExtractFrom) {
|
||||||
pb_1.Message.setField(this, 11, value);
|
pb_1.Message.setField(this, 11, value);
|
||||||
}
|
}
|
||||||
|
get created_attribute_name() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
|
||||||
|
}
|
||||||
|
set created_attribute_name(value: string) {
|
||||||
|
pb_1.Message.setField(this, 12, value);
|
||||||
|
}
|
||||||
get selector_content() {
|
get selector_content() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
||||||
}
|
}
|
||||||
@ -137,6 +147,7 @@ export namespace rssalchemy {
|
|||||||
selector_author?: string;
|
selector_author?: string;
|
||||||
selector_created?: string;
|
selector_created?: string;
|
||||||
created_extract_from?: ExtractFrom;
|
created_extract_from?: ExtractFrom;
|
||||||
|
created_attribute_name?: string;
|
||||||
selector_content?: string;
|
selector_content?: string;
|
||||||
selector_enclosure?: string;
|
selector_enclosure?: string;
|
||||||
cache_lifetime?: string;
|
cache_lifetime?: string;
|
||||||
@ -166,6 +177,9 @@ export namespace rssalchemy {
|
|||||||
if (data.created_extract_from != null) {
|
if (data.created_extract_from != null) {
|
||||||
message.created_extract_from = data.created_extract_from;
|
message.created_extract_from = data.created_extract_from;
|
||||||
}
|
}
|
||||||
|
if (data.created_attribute_name != null) {
|
||||||
|
message.created_attribute_name = data.created_attribute_name;
|
||||||
|
}
|
||||||
if (data.selector_content != null) {
|
if (data.selector_content != null) {
|
||||||
message.selector_content = data.selector_content;
|
message.selector_content = data.selector_content;
|
||||||
}
|
}
|
||||||
@ -187,6 +201,7 @@ export namespace rssalchemy {
|
|||||||
selector_author?: string;
|
selector_author?: string;
|
||||||
selector_created?: string;
|
selector_created?: string;
|
||||||
created_extract_from?: ExtractFrom;
|
created_extract_from?: ExtractFrom;
|
||||||
|
created_attribute_name?: string;
|
||||||
selector_content?: string;
|
selector_content?: string;
|
||||||
selector_enclosure?: string;
|
selector_enclosure?: string;
|
||||||
cache_lifetime?: string;
|
cache_lifetime?: string;
|
||||||
@ -215,6 +230,9 @@ export namespace rssalchemy {
|
|||||||
if (this.created_extract_from != null) {
|
if (this.created_extract_from != null) {
|
||||||
data.created_extract_from = this.created_extract_from;
|
data.created_extract_from = this.created_extract_from;
|
||||||
}
|
}
|
||||||
|
if (this.created_attribute_name != null) {
|
||||||
|
data.created_attribute_name = this.created_attribute_name;
|
||||||
|
}
|
||||||
if (this.selector_content != null) {
|
if (this.selector_content != null) {
|
||||||
data.selector_content = this.selector_content;
|
data.selector_content = this.selector_content;
|
||||||
}
|
}
|
||||||
@ -246,6 +264,8 @@ export namespace rssalchemy {
|
|||||||
writer.writeString(7, this.selector_created);
|
writer.writeString(7, this.selector_created);
|
||||||
if (this.created_extract_from != ExtractFrom.InnerText)
|
if (this.created_extract_from != ExtractFrom.InnerText)
|
||||||
writer.writeEnum(11, this.created_extract_from);
|
writer.writeEnum(11, this.created_extract_from);
|
||||||
|
if (this.created_attribute_name.length)
|
||||||
|
writer.writeString(12, this.created_attribute_name);
|
||||||
if (this.selector_content.length)
|
if (this.selector_content.length)
|
||||||
writer.writeString(8, this.selector_content);
|
writer.writeString(8, this.selector_content);
|
||||||
if (this.selector_enclosure.length)
|
if (this.selector_enclosure.length)
|
||||||
@ -285,6 +305,9 @@ export namespace rssalchemy {
|
|||||||
case 11:
|
case 11:
|
||||||
message.created_extract_from = reader.readEnum();
|
message.created_extract_from = reader.readEnum();
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
message.created_attribute_name = reader.readString();
|
||||||
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
message.selector_content = reader.readString();
|
message.selector_content = reader.readString();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
validateAttribute,
|
||||||
validateDuration,
|
validateDuration,
|
||||||
validateSelector,
|
validateSelector,
|
||||||
validateUrl,
|
validateUrl,
|
||||||
@ -16,10 +17,16 @@ export enum InputType {
|
|||||||
Radio = 'radio'
|
Radio = 'radio'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumValue = {
|
||||||
|
label: string
|
||||||
|
value: number
|
||||||
|
}
|
||||||
|
export type Enum = EnumValue[]
|
||||||
|
|
||||||
export interface SpecField {
|
export interface SpecField {
|
||||||
name: keyof Specs
|
name: keyof Specs
|
||||||
input_type: InputType
|
input_type: InputType
|
||||||
enum_values?: {[k: number]: string}
|
enum?: Enum,
|
||||||
label: string
|
label: string
|
||||||
default: SpecValue
|
default: SpecValue
|
||||||
validate: validator
|
validate: validator
|
||||||
@ -84,13 +91,25 @@ export const fields: SpecField[] = [
|
|||||||
{
|
{
|
||||||
name: 'created_extract_from',
|
name: 'created_extract_from',
|
||||||
input_type: InputType.Radio,
|
input_type: InputType.Radio,
|
||||||
enum_values: rssalchemy.ExtractFrom,
|
enum: [
|
||||||
|
{label: 'Inner Text', value: rssalchemy.ExtractFrom.InnerText},
|
||||||
|
{label: 'Attribute', value: rssalchemy.ExtractFrom.Attribute},
|
||||||
|
],
|
||||||
label: 'Extract from',
|
label: 'Extract from',
|
||||||
default: rssalchemy.ExtractFrom.InnerText,
|
default: rssalchemy.ExtractFrom.InnerText,
|
||||||
validate: value => Object.values(rssalchemy.ExtractFrom).includes(value),
|
validate: value => Object.values(rssalchemy.ExtractFrom).includes(value),
|
||||||
group: 'created',
|
group: 'created',
|
||||||
show_if: specs => !!specs.selector_created,
|
show_if: specs => !!specs.selector_created,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'created_attribute_name',
|
||||||
|
input_type: InputType.Text,
|
||||||
|
label: 'Attribute name',
|
||||||
|
default: '',
|
||||||
|
validate: validateAttribute,
|
||||||
|
show_if: specs => specs.created_extract_from === rssalchemy.ExtractFrom.Attribute,
|
||||||
|
group: 'created',
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'selector_content',
|
name: 'selector_content',
|
||||||
|
|||||||
@ -26,6 +26,10 @@ export function validateSelector(s: SpecValue): boolean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function validateAttribute(s: SpecValue): boolean {
|
||||||
|
return /([^\t\n\f \/>"'=]+)/.test(s as string);
|
||||||
|
}
|
||||||
|
|
||||||
export function validateDuration(s: SpecValue): boolean {
|
export function validateDuration(s: SpecValue): boolean {
|
||||||
return /^\d+[smh]$/.test(s as string);
|
return /^\d+[smh]$/.test(s as string);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,20 +69,21 @@ func (ExtractFrom) EnumDescriptor() ([]byte, []int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Specs struct {
|
type Specs struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url" validate:"url"`
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url" validate:"url"`
|
||||||
SelectorPost string `protobuf:"bytes,2,opt,name=selector_post,json=selectorPost,proto3" json:"selector_post" validate:"selector"`
|
SelectorPost string `protobuf:"bytes,2,opt,name=selector_post,json=selectorPost,proto3" json:"selector_post" validate:"selector"`
|
||||||
SelectorTitle string `protobuf:"bytes,3,opt,name=selector_title,json=selectorTitle,proto3" json:"selector_title" validate:"selector"`
|
SelectorTitle string `protobuf:"bytes,3,opt,name=selector_title,json=selectorTitle,proto3" json:"selector_title" validate:"selector"`
|
||||||
SelectorLink string `protobuf:"bytes,4,opt,name=selector_link,json=selectorLink,proto3" json:"selector_link" validate:"selector"`
|
SelectorLink string `protobuf:"bytes,4,opt,name=selector_link,json=selectorLink,proto3" json:"selector_link" validate:"selector"`
|
||||||
SelectorDescription string `protobuf:"bytes,5,opt,name=selector_description,json=selectorDescription,proto3" json:"selector_description" validate:"omitempty,selector"`
|
SelectorDescription string `protobuf:"bytes,5,opt,name=selector_description,json=selectorDescription,proto3" json:"selector_description" validate:"omitempty,selector"`
|
||||||
SelectorAuthor string `protobuf:"bytes,6,opt,name=selector_author,json=selectorAuthor,proto3" json:"selector_author" validate:"selector"`
|
SelectorAuthor string `protobuf:"bytes,6,opt,name=selector_author,json=selectorAuthor,proto3" json:"selector_author" validate:"selector"`
|
||||||
SelectorCreated string `protobuf:"bytes,7,opt,name=selector_created,json=selectorCreated,proto3" json:"selector_created" validate:"selector"`
|
SelectorCreated string `protobuf:"bytes,7,opt,name=selector_created,json=selectorCreated,proto3" json:"selector_created" validate:"selector"`
|
||||||
CreatedExtractFrom ExtractFrom `protobuf:"varint,11,opt,name=created_extract_from,json=createdExtractFrom,proto3,enum=rssalchemy.ExtractFrom" json:"created_extract_from"`
|
CreatedExtractFrom ExtractFrom `protobuf:"varint,11,opt,name=created_extract_from,json=createdExtractFrom,proto3,enum=rssalchemy.ExtractFrom" json:"created_extract_from"`
|
||||||
SelectorContent string `protobuf:"bytes,8,opt,name=selector_content,json=selectorContent,proto3" json:"selector_content" validate:"omitempty,selector"`
|
CreatedAttributeName string `protobuf:"bytes,12,opt,name=created_attribute_name,json=createdAttributeName,proto3" json:"created_attribute_name"`
|
||||||
SelectorEnclosure string `protobuf:"bytes,9,opt,name=selector_enclosure,json=selectorEnclosure,proto3" json:"selector_enclosure" validate:"selector"`
|
SelectorContent string `protobuf:"bytes,8,opt,name=selector_content,json=selectorContent,proto3" json:"selector_content" validate:"omitempty,selector"`
|
||||||
CacheLifetime string `protobuf:"bytes,10,opt,name=cache_lifetime,json=cacheLifetime,proto3" json:"cache_lifetime"`
|
SelectorEnclosure string `protobuf:"bytes,9,opt,name=selector_enclosure,json=selectorEnclosure,proto3" json:"selector_enclosure" validate:"selector"`
|
||||||
unknownFields protoimpl.UnknownFields
|
CacheLifetime string `protobuf:"bytes,10,opt,name=cache_lifetime,json=cacheLifetime,proto3" json:"cache_lifetime"`
|
||||||
sizeCache protoimpl.SizeCache
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Specs) Reset() {
|
func (x *Specs) Reset() {
|
||||||
@ -171,6 +172,13 @@ func (x *Specs) GetCreatedExtractFrom() ExtractFrom {
|
|||||||
return ExtractFrom_InnerText
|
return ExtractFrom_InnerText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Specs) GetCreatedAttributeName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.CreatedAttributeName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Specs) GetSelectorContent() string {
|
func (x *Specs) GetSelectorContent() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.SelectorContent
|
return x.SelectorContent
|
||||||
@ -198,7 +206,7 @@ var file_proto_specs_proto_rawDesc = string([]byte{
|
|||||||
0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2e, 0x70, 0x72,
|
0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x72, 0x73, 0x73, 0x61, 0x6c, 0x63, 0x68, 0x65, 0x6d, 0x79, 0x1a,
|
0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x72, 0x73, 0x73, 0x61, 0x6c, 0x63, 0x68, 0x65, 0x6d, 0x79, 0x1a,
|
||||||
0x13, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x70,
|
0x13, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x74, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x07, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x30,
|
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x08, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x30,
|
||||||
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x9a, 0x84, 0x9e,
|
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x9a, 0x84, 0x9e,
|
||||||
0x03, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x75, 0x72, 0x6c, 0x22, 0x20, 0x76, 0x61, 0x6c,
|
0x03, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x75, 0x72, 0x6c, 0x22, 0x20, 0x76, 0x61, 0x6c,
|
||||||
0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x22, 0x75, 0x72, 0x6c, 0x22, 0x52, 0x03, 0x75, 0x72, 0x6c,
|
0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x22, 0x75, 0x72, 0x6c, 0x22, 0x52, 0x03, 0x75, 0x72, 0x6c,
|
||||||
@ -243,28 +251,34 @@ var file_proto_specs_proto_rawDesc = string([]byte{
|
|||||||
0x42, 0x20, 0x9a, 0x84, 0x9e, 0x03, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x72, 0x65,
|
0x42, 0x20, 0x9a, 0x84, 0x9e, 0x03, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x72, 0x65,
|
||||||
0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x66, 0x72, 0x6f,
|
0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x66, 0x72, 0x6f,
|
||||||
0x6d, 0x22, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x74, 0x72, 0x61,
|
0x6d, 0x22, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x74, 0x72, 0x61,
|
||||||
0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x65, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x58, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x42, 0x3a, 0x9a, 0x84, 0x9e, 0x03, 0x35, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x73, 0x65, 0x6c,
|
0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0x9a, 0x84, 0x9e, 0x03, 0x1d, 0x6a, 0x73, 0x6f,
|
||||||
0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x20, 0x76,
|
0x6e, 0x3a, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69,
|
||||||
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x22, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70,
|
0x62, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61,
|
||||||
0x74, 0x79, 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x0f, 0x73, 0x65,
|
0x74, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65,
|
||||||
0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a,
|
0x12, 0x65, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e,
|
||||||
0x12, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x73,
|
0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x9a, 0x84, 0x9e, 0x03,
|
||||||
0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0x9a, 0x84, 0x9e, 0x03, 0x2d,
|
0x35, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f,
|
||||||
0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x65,
|
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||||
0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
0x65, 0x3a, 0x22, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x73, 0x65, 0x6c,
|
||||||
0x74, 0x65, 0x3a, 0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x11, 0x73,
|
0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65,
|
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x65, 0x6c, 0x65, 0x63,
|
||||||
0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69,
|
0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20,
|
||||||
0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x9a, 0x84, 0x9e, 0x03, 0x15, 0x6a,
|
0x01, 0x28, 0x09, 0x42, 0x32, 0x9a, 0x84, 0x9e, 0x03, 0x2d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22,
|
||||||
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74,
|
0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x75,
|
||||||
0x69, 0x6d, 0x65, 0x22, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x74,
|
0x72, 0x65, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x22, 0x73, 0x65,
|
||||||
0x69, 0x6d, 0x65, 0x2a, 0x2b, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x46, 0x72,
|
0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
|
||||||
0x6f, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x65, 0x78, 0x74, 0x10,
|
0x72, 0x45, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61,
|
||||||
0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x10, 0x01,
|
0x63, 0x68, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
|
||||||
0x42, 0x16, 0x5a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69,
|
0x28, 0x09, 0x42, 0x1a, 0x9a, 0x84, 0x9e, 0x03, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63,
|
||||||
0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x61, 0x63, 0x68, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x52, 0x0d,
|
||||||
|
0x63, 0x61, 0x63, 0x68, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x2b, 0x0a,
|
||||||
|
0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x0d, 0x0a, 0x09,
|
||||||
|
0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41,
|
||||||
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x10, 0x01, 0x42, 0x16, 0x5a, 0x14, 0x69, 0x6e,
|
||||||
|
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f,
|
||||||
|
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@ -21,6 +21,7 @@ message Specs {
|
|||||||
|
|
||||||
string selector_created = 7 [(tagger.tags) = "json:\"selector_created\" validate:\"selector\""];
|
string selector_created = 7 [(tagger.tags) = "json:\"selector_created\" validate:\"selector\""];
|
||||||
ExtractFrom created_extract_from = 11 [(tagger.tags) = "json:\"created_extract_from\""];
|
ExtractFrom created_extract_from = 11 [(tagger.tags) = "json:\"created_extract_from\""];
|
||||||
|
string created_attribute_name = 12 [(tagger.tags) = "json:\"created_attribute_name\""];
|
||||||
|
|
||||||
string selector_content = 8 [(tagger.tags) = "json:\"selector_content\" validate:\"omitempty,selector\""];
|
string selector_content = 8 [(tagger.tags) = "json:\"selector_content\" validate:\"omitempty,selector\""];
|
||||||
string selector_enclosure = 9 [(tagger.tags) = "json:\"selector_enclosure\" validate:\"selector\""];
|
string selector_enclosure = 9 [(tagger.tags) = "json:\"selector_enclosure\" validate:\"selector\""];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user