From c33c52a00f05a5ccaf1f278c1c0fb98fddbc7a2d Mon Sep 17 00:00:00 2001 From: "ALI Mohammadiyeh (Max Base)" Date: Fri, 10 Jan 2025 19:42:23 +0100 Subject: [PATCH] run save for all scripts in build/data/tags --- build/data/tags/countries.json | 2 +- build/data/tags/countries.py | 4 +- build/data/tags/crossorigins.json | 26 +++++ build/data/tags/dirs.json | 30 +++++ build/data/tags/languages.json | 2 +- build/data/tags/languages.py | 4 +- build/data/tags/mediatypes.json | 76 +++++++------ build/data/tags/mediatypes.py | 4 +- build/data/tags/methods.json | 26 +++++ build/data/tags/referrerpolicies.json | 86 ++++++++++++++ build/data/tags/rels.json | 158 ++++++++++++++++++++++++++ build/data/tags/targets.json | 50 ++++++++ 12 files changed, 423 insertions(+), 45 deletions(-) create mode 100644 build/data/tags/crossorigins.json create mode 100644 build/data/tags/dirs.json create mode 100644 build/data/tags/methods.json create mode 100644 build/data/tags/referrerpolicies.json create mode 100644 build/data/tags/rels.json create mode 100644 build/data/tags/targets.json diff --git a/build/data/tags/countries.json b/build/data/tags/countries.json index c0f3e270..7c8bf8f6 100644 --- a/build/data/tags/countries.json +++ b/build/data/tags/countries.json @@ -959,4 +959,4 @@ "name": "zimbabwe", "code": "zw" } -] \ No newline at end of file +] diff --git a/build/data/tags/countries.py b/build/data/tags/countries.py index 36420990..cb3a0553 100644 --- a/build/data/tags/countries.py +++ b/build/data/tags/countries.py @@ -254,8 +254,6 @@ country["code"] = country["code"].lower().strip() if __name__ == '__main__': - strings = Prebuild.to_string( - [value.to_dict() for value in countries] - ) + strings = Prebuild.to_string(countries) Prebuild.print(strings) Prebuild.save(strings, __file__) diff --git a/build/data/tags/crossorigins.json b/build/data/tags/crossorigins.json new file mode 100644 index 00000000..3981a62a --- /dev/null +++ b/build/data/tags/crossorigins.json @@ -0,0 +1,26 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ANONYMOUS", + "generate_name": "anonymous", + "text": { + "EN": [ + "anonymous" + ], + "FA": [ + "ناشناس" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_USE_CREDENTIALS", + "generate_name": "use-credentials", + "text": { + "EN": [ + "use credentials" + ], + "FA": [ + "یوز کرید" + ] + } + } +] diff --git a/build/data/tags/dirs.json b/build/data/tags/dirs.json new file mode 100644 index 00000000..79c4ee2b --- /dev/null +++ b/build/data/tags/dirs.json @@ -0,0 +1,30 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_LTR", + "generate_name": "ltr", + "text": { + "EN": [ + "ltr", + "left" + ], + "FA": [ + "چپ به راست", + "چپ" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_RTL", + "generate_name": "rtl", + "text": { + "EN": [ + "rtl", + "right" + ], + "FA": [ + "راست به چپ", + "راست" + ] + } + } +] diff --git a/build/data/tags/languages.json b/build/data/tags/languages.json index 8bb42a3a..052a7e5f 100644 --- a/build/data/tags/languages.json +++ b/build/data/tags/languages.json @@ -799,4 +799,4 @@ "name": "zulu", "code": "zu" } -] \ No newline at end of file +] diff --git a/build/data/tags/languages.py b/build/data/tags/languages.py index db4c61bc..e9f9d9ee 100644 --- a/build/data/tags/languages.py +++ b/build/data/tags/languages.py @@ -214,8 +214,6 @@ language["code"] = language["code"].lower().strip() if __name__ == '__main__': - strings = Prebuild.to_string( - [value.to_dict() for value in languages] - ) + strings = Prebuild.to_string(languages) Prebuild.print(strings) Prebuild.save(strings, __file__) diff --git a/build/data/tags/mediatypes.json b/build/data/tags/mediatypes.json index 3780231f..0ad9bb7e 100644 --- a/build/data/tags/mediatypes.json +++ b/build/data/tags/mediatypes.json @@ -268,7 +268,7 @@ "code": "application/eat-ucs+cbor" }, { - "name": "ecmascript (obsoleted in favor of text/javascript)", + "name": "ecmascript", "code": "application/ecmascript" }, { @@ -872,9 +872,13 @@ "code": "application/sipc" }, { - "name": "smil (obsoleted in favor of application/smil+xml)", + "name": "smil", "code": "application/smil" }, + { + "name": "smil+xml)", + "code": "application/smil+xml" + }, { "name": "smpte336m", "code": "application/smpte336m" @@ -1780,9 +1784,13 @@ "code": "application/vnd.gentoo.xpak" }, { - "name": "vnd.geo+json (obsoleted by [rfc7946] in favor of application/geo+json)", + "name": "vnd.geo+json", "code": "application/vnd.geo+json" }, + { + "name": "geo+json", + "code": "application/geo+json" + }, { "name": "vnd.geogebra.file", "code": "application/vnd.geogebra.file" @@ -1816,7 +1824,7 @@ "code": "application/vnd.google-earth.kml+xml" }, { - "name": "vnd.gov.sk.e-form+xml (obsoleted by request)", + "name": "vnd.gov.sk.e-form+xml", "code": "application/vnd.gov.sk.e-form+xml" }, { @@ -1892,9 +1900,13 @@ "code": "application/vnd.ibm.electronic-media" }, { - "name": "vnd.ibm.modcap (obsoleted in favor of application/vnd.afpc.modca)", + "name": "vnd.ibm.modcap", "code": "application/vnd.ibm.modcap" }, + { + "name": "vnd.afpc.modca", + "code": "application/vnd.afpc.modca" + }, { "name": "vnd.ibm.secure-container", "code": "application/vnd.ibm.secure-container" @@ -1936,9 +1948,13 @@ "code": "application/vnd.infotech.project" }, { - "name": "vnd.informix-visionary (obsoleted in favor of application/vnd.visionary)", + "name": "vnd.informix-visionary", "code": "application/vnd.informix-visionary" }, + { + "name": "vnd.visionary", + "code": "application/vnd.visionary" + }, { "name": "vnd.insors.igm", "code": "application/vnd.insors.igm" @@ -3172,7 +3188,11 @@ "code": "application/vnd.yaoweme" }, { - "name": "vnd.youtube.yt (obsoleted in favor of video/vnd.youtube.yt)", + "name": "vnd.youtube.yt", + "code": "video/vnd.youtube.yt" + }, + { + "name": "vnd.youtube.yt", "code": "application/vnd.youtube.yt" }, { @@ -3287,10 +3307,6 @@ "name": "zlib", "code": "application/zlib" }, - { - "name": "name", - "code": "template" - }, { "name": "32kadpcm", "code": "audio/32kadpcm" @@ -3611,10 +3627,6 @@ "name": "vorbis", "code": "audio/vorbis" }, - { - "name": "name", - "code": "template" - }, { "name": "otf", "code": "font/otf" @@ -3800,12 +3812,12 @@ "code": "image/webp" }, { - "name": "x-emf - deprecated in favor of image/emf", + "name": "x-emf", "code": "image/x-emf" }, { - "name": "name", - "code": "template" + "name": "emf", + "code": "image/emf" }, { "name": "cpim", @@ -3852,13 +3864,9 @@ "code": "message/sipfrag" }, { - "name": "vnd.si.simp (obsoleted by request)", + "name": "vnd.si.simp", "code": "message/vnd.si.simp" }, - { - "name": "name", - "code": "template" - }, { "name": "e57", "code": "model/e57" @@ -3939,10 +3947,6 @@ "name": "x3d+fastinfoset", "code": "model/x3d+fastinfoset" }, - { - "name": "name", - "code": "template" - }, { "name": "appledouble", "code": "multipart/appledouble" @@ -3975,10 +3979,6 @@ "name": "voice-message", "code": "multipart/voice-message" }, - { - "name": "name", - "code": "template" - }, { "name": "cache-manifest", "code": "text/cache-manifest" @@ -3996,13 +3996,21 @@ "code": "text/csv" }, { - "name": "directory - deprecated by rfc6350", + "name": "directory", "code": "text/directory" }, { - "name": "ecmascript (obsoleted in favor of text/javascript)", + "name": "ecmascript", "code": "text/ecmascript" }, + { + "name": "javascript", + "code": "text/javascript" + }, + { + "name": "css", + "code": "text/css" + }, { "name": "enriched", "code": "text/enriched" @@ -4355,4 +4363,4 @@ "name": "vp8", "code": "video/vp8" } -] \ No newline at end of file +] diff --git a/build/data/tags/mediatypes.py b/build/data/tags/mediatypes.py index 8d7c63ab..bd696824 100644 --- a/build/data/tags/mediatypes.py +++ b/build/data/tags/mediatypes.py @@ -1105,8 +1105,6 @@ mediatype["code"] = mediatype["code"].lower().strip() if __name__ == '__main__': - strings = Prebuild.to_string( - [value.to_dict() for value in mediatypes] - ) + strings = Prebuild.to_string(mediatypes) Prebuild.print(strings) Prebuild.save(strings, __file__) diff --git a/build/data/tags/methods.json b/build/data/tags/methods.json new file mode 100644 index 00000000..2dffba52 --- /dev/null +++ b/build/data/tags/methods.json @@ -0,0 +1,26 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_GET", + "generate_name": "get", + "text": { + "EN": [ + "get" + ], + "FA": [ + "گت" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_POST", + "generate_name": "post", + "text": { + "EN": [ + "post" + ], + "FA": [ + "پست" + ] + } + } +] diff --git a/build/data/tags/referrerpolicies.json b/build/data/tags/referrerpolicies.json new file mode 100644 index 00000000..97e6ca3a --- /dev/null +++ b/build/data/tags/referrerpolicies.json @@ -0,0 +1,86 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NO_REFERRER", + "generate_name": "no-referrer", + "text": { + "EN": [ + "no-referrer" + ], + "FA": [ + "بدون ارجاع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NO_REFERRER_WHEN_DOWNGRADE", + "generate_name": "no-referrer-when-downgrade", + "text": { + "EN": [ + "no-referrer-when-downgrade" + ], + "FA": [ + "منبع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ORIGIN", + "generate_name": "origin", + "text": { + "EN": [ + "origin" + ], + "FA": [ + "منبع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ORIGIN_WHEN_CROSS_ORIGIN", + "generate_name": "origin-when-cross-origin", + "text": { + "EN": [ + "origin-when-cross-origin" + ], + "FA": [ + "منبع در صورت عبور از منبع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_SAME_ORIGIN", + "generate_name": "same-origin", + "text": { + "EN": [ + "same-origin" + ], + "FA": [ + "منبع یکسان" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_STRICT_ORIGIN_WHEN_CROSS_ORIGIN", + "generate_name": "strict-origin-when-cross-origin", + "text": { + "EN": [ + "strict-origin-when-cross-origin" + ], + "FA": [ + "حساس به منبع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_UNSAFE_URL", + "generate_name": "unsafe-url", + "text": { + "EN": [ + "unsafe-url" + ], + "FA": [ + "آدرس ناامن" + ] + } + } +] diff --git a/build/data/tags/rels.json b/build/data/tags/rels.json new file mode 100644 index 00000000..d59aeebd --- /dev/null +++ b/build/data/tags/rels.json @@ -0,0 +1,158 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ALTERNATE", + "generate_name": "alternate", + "text": { + "EN": [ + "alternate" + ], + "FA": [ + "متناوب" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_AUTHOR", + "generate_name": "author", + "text": { + "EN": [ + "author" + ], + "FA": [ + "نویسنده" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_BOOKMARK", + "generate_name": "bookmark", + "text": { + "EN": [ + "bookmark" + ], + "FA": [ + "بوکمارک" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_EXTERNAL", + "generate_name": "external", + "text": { + "EN": [ + "external" + ], + "FA": [ + "خارجی" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_HELP", + "generate_name": "help", + "text": { + "EN": [ + "help" + ], + "FA": [ + "کمک" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_LICENSE", + "generate_name": "license", + "text": { + "EN": [ + "license" + ], + "FA": [ + "مجوز" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NEXT", + "generate_name": "next", + "text": { + "EN": [ + "next" + ], + "FA": [ + "بعدی" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NOFOLLOW", + "generate_name": "nofollow", + "text": { + "EN": [ + "nofollow" + ], + "FA": [ + "بدون دنبال" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NOREFERRER", + "generate_name": "noreferrer", + "text": { + "EN": [ + "noreferrer" + ], + "FA": [ + "بدون ارجاع" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_NOOPENER", + "generate_name": "noopener", + "text": { + "EN": [ + "noopener" + ], + "FA": [ + "بدون بازکردن" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_PREV", + "generate_name": "prev", + "text": { + "EN": [ + "prev" + ], + "FA": [ + "قبلی" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_SEARCH", + "generate_name": "search", + "text": { + "EN": [ + "search" + ], + "FA": [ + "جستجو" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_TAG", + "generate_name": "tag", + "text": { + "EN": [ + "tag" + ], + "FA": [ + "برچسب" + ] + } + } +] diff --git a/build/data/tags/targets.json b/build/data/tags/targets.json new file mode 100644 index 00000000..e0a8a1bb --- /dev/null +++ b/build/data/tags/targets.json @@ -0,0 +1,50 @@ +[ + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE__BLANK", + "generate_name": "_blank", + "text": { + "EN": [ + "blank" + ], + "FA": [ + "جدید" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE__SELF", + "generate_name": "_self", + "text": { + "EN": [ + "self" + ], + "FA": [ + "خود" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE__PARENT", + "generate_name": "_parent", + "text": { + "EN": [ + "parent" + ], + "FA": [ + "والدین" + ] + } + }, + { + "id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE__TOP", + "generate_name": "_top", + "text": { + "EN": [ + "top" + ], + "FA": [ + "بالا" + ] + } + } +]