Skip to content

Commit

Permalink
Add more tags
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Jan 9, 2025
1 parent 6f484ad commit 7242a02
Show file tree
Hide file tree
Showing 20 changed files with 3,427 additions and 16 deletions.
2,908 changes: 2,892 additions & 16 deletions build/tags/area.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions build/tags/canvas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "AST_LAYOUT_TYPE_CANVAS",
"is_mother": true,
"generate_name": "canvas",
"text": {
"EN": [
"canvas"
],
"FA": [
"بوم"
]
},
"attributes": [
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_WIDTH",
"generate_name": "width",
"type": "AST_TYPE_NUMBER",
"text": {
"EN": [
"width"
],
"FA": [
"عرض"
]
},
"is_required": false,
"reserved_values": []
},
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_HEIGHT",
"generate_name": "height",
"type": "AST_TYPE_NUMBER",
"text": {
"EN": [
"height"
],
"FA": [
"ارتفاع"
]
},
"is_required": false,
"reserved_values": []
}
]
}
37 changes: 37 additions & 0 deletions build/tags/canvas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from type import Type
from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("canvas")
element.set_text(Lang.EN, "canvas")
element.set_text(Lang.FA, "بوم")

element.add_attribute() \
.set_generate_name("width") \
.set_type(Type.Number) \
.add_text(Lang.EN, "width") \
.add_text(Lang.FA, "عرض") \

element.add_attribute() \
.set_generate_name("height") \
.set_type(Type.Number) \
.add_text(Lang.EN, "height") \
.add_text(Lang.FA, "ارتفاع") \

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
24 changes: 24 additions & 0 deletions build/tags/caption.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("caption")
element.set_text(Lang.EN, "caption")
element.set_text(Lang.FA, "سند")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
24 changes: 24 additions & 0 deletions build/tags/cite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("cite")
element.set_text(Lang.EN, "cite")
element.set_text(Lang.FA, "ارجاع")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
24 changes: 24 additions & 0 deletions build/tags/code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("code")
element.set_text(Lang.EN, "code")
element.set_text(Lang.FA, "کد")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
37 changes: 37 additions & 0 deletions build/tags/col.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

import rels
import targets
import languages
import mediatypes
import referrerpolicies
from lang import Lang
from type import Type
from value import Value
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("col")
element.set_text(Lang.EN, "col")
element.set_text(Lang.FA, "کول")

element.add_attribute() \
.set_generate_name("span") \
.set_type(Type.PositiveInt) \
.add_text(Lang.EN, "span") \
.add_text(Lang.FA, "اسپن") \

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
37 changes: 37 additions & 0 deletions build/tags/colgroup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

import rels
import targets
import languages
import mediatypes
import referrerpolicies
from lang import Lang
from type import Type
from value import Value
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("colgroup")
element.set_text(Lang.EN, "colgroup")
element.set_text(Lang.FA, "کول گروه")

element.add_attribute() \
.set_generate_name("span") \
.set_type(Type.PositiveInt) \
.add_text(Lang.EN, "count") \
.add_text(Lang.FA, "تعداد") \

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
37 changes: 37 additions & 0 deletions build/tags/data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

import rels
import targets
import languages
import mediatypes
import referrerpolicies
from lang import Lang
from type import Type
from value import Value
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("data")
element.set_text(Lang.EN, "data")
element.set_text(Lang.FA, "داده")

element.add_attribute() \
.set_generate_name("value") \
.set_type(Type.AnyNoEmpty) \
.add_text(Lang.EN, "value") \
.add_text(Lang.FA, "مقدار") \

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
24 changes: 24 additions & 0 deletions build/tags/datalist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("datalist")
element.set_text(Lang.EN, "datalist")
element.set_text(Lang.FA, "لیست داده")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
24 changes: 24 additions & 0 deletions build/tags/dd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("dd")
element.set_text(Lang.EN, "dd")
element.set_text(Lang.FA, "دی دی")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
14 changes: 14 additions & 0 deletions build/tags/del.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "AST_LAYOUT_TYPE_DEL",
"is_mother": true,
"generate_name": "del",
"text": {
"EN": [
"del"
],
"FA": [
"خط خورده"
]
},
"attributes": []
}
24 changes: 24 additions & 0 deletions build/tags/del.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import json
from pathlib import Path

parent_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(parent_dir))
sys.path.append(os.path.join(parent_dir, "data"))

from lang import Lang
from element import Element

if __name__ == "__main__":
element = Element()
element.set_is_mother(True)
element.set_generate_name("del")
element.set_text(Lang.EN, "del")
element.set_text(Lang.FA, "خط خورده")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
print(j)
open(Path(__file__).stem + ".json", "w", encoding="utf-8").write(j)
30 changes: 30 additions & 0 deletions build/tags/details.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"id": "AST_LAYOUT_TYPE_DETAILS",
"is_mother": true,
"generate_name": "details",
"text": {
"EN": [
"details"
],
"FA": [
"جزییات"
]
},
"attributes": [
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_OPEN",
"generate_name": "open",
"type": "AST_TYPE_BOOLEAN",
"text": {
"EN": [
"open"
],
"FA": [
"باز"
]
},
"is_required": false,
"reserved_values": []
}
]
}
Loading

0 comments on commit 7242a02

Please sign in to comment.