ssc_codegen 0.5.3__tar.gz → 0.5.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/workspace.xml +162 -148
  2. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/PKG-INFO +1 -1
  3. ssc_codegen-0.5.4/examples/a.py +144 -0
  4. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/generate_code.sh +1 -0
  5. ssc_codegen-0.5.4/examples/testDoc/index.html +23 -0
  6. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/pyproject.toml +1 -1
  7. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/__init__.py +1 -1
  8. ssc_codegen-0.5.4/ssc_codegen/converters/__init__.py +0 -0
  9. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/py_base.py +1 -1
  10. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.gitignore +0 -0
  11. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/.gitignore +0 -0
  12. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  13. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  14. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/libraries/Dart_Packages.xml +0 -0
  15. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/libraries/Dart_SDK.xml +0 -0
  16. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/misc.xml +0 -0
  17. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/modules.xml +0 -0
  18. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/selector_schema_codegen.iml +0 -0
  19. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/.idea/vcs.xml +0 -0
  20. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/LICENSE +0 -0
  21. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/README.md +0 -0
  22. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/README.md +0 -0
  23. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/booksToScrapePage.html +0 -0
  24. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/booksToScrapePage50.html +0 -0
  25. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/dart/booksToScrape.dart +0 -0
  26. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/dart/main.dart +0 -0
  27. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/ex_extended.py +0 -0
  28. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/go/booksToScrape.go +0 -0
  29. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/go/main.go +0 -0
  30. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/js/booksToScrape.js +0 -0
  31. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/js/booksToScrapeTests.js +0 -0
  32. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/js/main.js +0 -0
  33. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/manual_make.py +0 -0
  34. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/python/booksToScrape.py +0 -0
  35. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/python/main.py +0 -0
  36. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/python/main2.py +0 -0
  37. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/runtime_compile.py +0 -0
  38. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/schemas/booksToScrape.py +0 -0
  39. {ssc_codegen-0.5.3/examples → ssc_codegen-0.5.4/examples/booksToScrape}/schemas/booksToScrapeTests.py +0 -0
  40. /ssc_codegen-0.5.3/ssc_codegen/converters/__init__.py → /ssc_codegen-0.5.4/examples/testDoc/schema.py +0 -0
  41. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/main.py +0 -0
  42. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/o.py +0 -0
  43. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/scripts/check.sh +0 -0
  44. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/scripts/fix.sh +0 -0
  45. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/scripts/ver_patch.sh +0 -0
  46. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/scripts/version.py +0 -0
  47. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/ast_builder.py +0 -0
  48. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/ast_ssc.py +0 -0
  49. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/cli.py +0 -0
  50. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/cli_utils.py +0 -0
  51. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/compiler.py +0 -0
  52. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/consts.py +0 -0
  53. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/ast_utils.py +0 -0
  54. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/base.py +0 -0
  55. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/dart_universal_html.py +0 -0
  56. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/go_goquery.py +0 -0
  57. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/js_pure.py +0 -0
  58. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/py_bs4.py +0 -0
  59. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/py_parsel.py +0 -0
  60. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/py_scrapy.py +0 -0
  61. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/py_selectolax.py +0 -0
  62. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/templates/dart.py +0 -0
  63. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/templates/go.py +0 -0
  64. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/templates/js.py +0 -0
  65. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/templates/py.py +0 -0
  66. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/templates/utils.py +0 -0
  67. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/tools.py +0 -0
  68. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/converters/utils.py +0 -0
  69. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/document.py +0 -0
  70. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/document_utlis.py +0 -0
  71. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/schema.py +0 -0
  72. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/selector_utils.py +0 -0
  73. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/ssc_codegen/tokens.py +0 -0
  74. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/converter_tools/test_str_utils.py +0 -0
  75. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/converter_tools/test_variable.py +0 -0
  76. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/converters/helpers_converters.py +0 -0
  77. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/converters/test_buildin_converters.py +0 -0
  78. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_array.py +0 -0
  79. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_assert.py +0 -0
  80. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_invalid_expr.py +0 -0
  81. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_regex.py +0 -0
  82. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_select.py +0 -0
  83. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_document_text.py +0 -0
  84. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_nested.py +0 -0
  85. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/document/test_selector_converters.py +0 -0
  86. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/schema/helpers.py +0 -0
  87. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/schema/test_sc_magic_methods.py +0 -0
  88. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/schema/test_sc_mro.py +0 -0
  89. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/utils/test_convert_query.py +0 -0
  90. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/utils/test_go_unimport.py +0 -0
  91. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/tests/utils/test_validate_query.py +0 -0
  92. {ssc_codegen-0.5.3 → ssc_codegen-0.5.4}/uv.lock +0 -0
@@ -4,13 +4,26 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="9c5efa3e-dda3-4c3a-8055-fa28924643ed" name="Changes" comment="add test converters implementation status">
8
- <change afterPath="$PROJECT_DIR$/examples/ex_extended.py" afterDir="false" />
9
- <change afterPath="$PROJECT_DIR$/examples/python/main2.py" afterDir="false" />
10
- <change afterPath="$PROJECT_DIR$/examples/schemas/booksToScrapeTests.py" afterDir="false" />
7
+ <list default="true" id="9c5efa3e-dda3-4c3a-8055-fa28924643ed" name="Changes" comment="bump">
8
+ <change afterPath="$PROJECT_DIR$/examples/booksToScrape/ex_extended.py" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/examples/booksToScrape/python/main2.py" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/examples/booksToScrape/schemas/booksToScrapeTests.py" afterDir="false" />
11
+ <change afterPath="$PROJECT_DIR$/examples/testDoc/index.html" afterDir="false" />
12
+ <change afterPath="$PROJECT_DIR$/examples/testDoc/schema.py" afterDir="false" />
11
13
  <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
12
- <change beforePath="$PROJECT_DIR$/ssc_codegen/converters/js_pure.py" beforeDir="false" afterPath="$PROJECT_DIR$/ssc_codegen/converters/js_pure.py" afterDir="false" />
13
- <change beforePath="$PROJECT_DIR$/ssc_codegen/converters/templates/js.py" beforeDir="false" afterPath="$PROJECT_DIR$/ssc_codegen/converters/templates/js.py" afterDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/examples/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/README.md" afterDir="false" />
15
+ <change beforePath="$PROJECT_DIR$/examples/dart/booksToScrape.dart" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/dart/booksToScrape.dart" afterDir="false" />
16
+ <change beforePath="$PROJECT_DIR$/examples/dart/main.dart" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/dart/main.dart" afterDir="false" />
17
+ <change beforePath="$PROJECT_DIR$/examples/generate_code.sh" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/generate_code.sh" afterDir="false" />
18
+ <change beforePath="$PROJECT_DIR$/examples/go/booksToScrape.go" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/go/booksToScrape.go" afterDir="false" />
19
+ <change beforePath="$PROJECT_DIR$/examples/go/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/go/main.go" afterDir="false" />
20
+ <change beforePath="$PROJECT_DIR$/examples/js/booksToScrape.js" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/js/booksToScrape.js" afterDir="false" />
21
+ <change beforePath="$PROJECT_DIR$/examples/js/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/js/main.js" afterDir="false" />
22
+ <change beforePath="$PROJECT_DIR$/examples/manual_make.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/manual_make.py" afterDir="false" />
23
+ <change beforePath="$PROJECT_DIR$/examples/python/booksToScrape.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/python/booksToScrape.py" afterDir="false" />
24
+ <change beforePath="$PROJECT_DIR$/examples/python/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/python/main.py" afterDir="false" />
25
+ <change beforePath="$PROJECT_DIR$/examples/runtime_compile.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/runtime_compile.py" afterDir="false" />
26
+ <change beforePath="$PROJECT_DIR$/examples/schemas/booksToScrape.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/booksToScrape/schemas/booksToScrape.py" afterDir="false" />
14
27
  </list>
15
28
  <option name="SHOW_DIALOG" value="false" />
16
29
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -80,115 +93,115 @@
80
93
  <option name="hideEmptyMiddlePackages" value="true" />
81
94
  <option name="showLibraryContents" value="true" />
82
95
  </component>
83
- <component name="PropertiesComponent"><![CDATA[{
84
- "keyToString": {
85
- "Dart Command Line App.dart_sscgen.dart.executor": "Debug",
86
- "Dart Command Line App.main.dart.executor": "Debug",
87
- "DefaultHtmlFileTemplate": "HTML File",
88
- "Python tests.Python tests for test_buildin_converters.test_converter_impl.executor": "Run",
89
- "Python tests.Python tests for test_convert_query.test_convert_css_to_xpath.executor": "Run",
90
- "Python tests.Python tests for test_convert_query.test_convert_xpath_to_css.executor": "Run",
91
- "Python tests.Python tests for test_document.test_expr.executor": "Run",
92
- "Python tests.Python tests for test_document.test_fail_attr_expr.executor": "Run",
93
- "Python tests.Python tests for test_document.test_valid_html_expr.executor": "Run",
94
- "Python tests.Python tests for test_document_array.test_list_document.executor": "Run",
95
- "Python tests.Python tests for test_document_array.test_list_str.executor": "Run",
96
- "Python tests.Python tests for test_document_assert.test_assert_expr.executor": "Run",
97
- "Python tests.Python tests for test_document_invalid_expr.test_raw_invalid_expr.executor": "Run",
98
- "Python tests.Python tests for test_document_regex.test_assert_expr.executor": "Run",
99
- "Python tests.Python tests for test_document_regex.test_fail_compile_regex.executor": "Run",
100
- "Python tests.Python tests for test_document_select.test_doc_to_str.executor": "Run",
101
- "Python tests.Python tests for test_document_select.test_document_to_list_document.executor": "Run",
102
- "Python tests.Python tests for test_document_text.test_fail_str_format.executor": "Run",
103
- "Python tests.Python tests for test_document_text.test_string_expr.executor": "Run",
104
- "Python tests.Python tests for test_go_unimport.test_go_unimport_naive.executor": "Run",
105
- "Python tests.Python tests for test_invalid_expr.test_invalid_doc_expr.executor": "Run",
106
- "Python tests.Python tests for test_invalid_expr.test_invalid_expr.executor": "Run",
107
- "Python tests.Python tests for test_nested.test_nested.executor": "Run",
108
- "Python tests.Python tests for test_nested.test_nested_2.executor": "Run",
109
- "Python tests.Python tests for test_sc.test_fail_init.executor": "Run",
110
- "Python tests.Python tests for test_sc.test_fail_schema_config.executor": "Run",
111
- "Python tests.Python tests for test_sc_magic_methods.test_fail_document_value_type.executor": "Run",
112
- "Python tests.Python tests for test_sc_magic_methods.test_fail_field_empty_expr.executor": "Run",
113
- "Python tests.Python tests for test_sc_magic_methods.test_fail_schema_dict_key.executor": "Run",
114
- "Python tests.Python tests for test_sc_magic_methods.test_fail_schema_magic.executor": "Run",
115
- "Python tests.Python tests for test_sc_magic_methods.test_fail_schema_split_doc_ret_type.executor": "Run",
116
- "Python tests.Python tests for test_sc_mro.test_schema_mro.executor": "Run",
117
- "Python tests.Python tests for test_select_document.test_valid_html_expr.executor": "Run",
118
- "Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath.executor": "Run",
119
- "Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath_queries.executor": "Run",
120
- "Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath_tokens.executor": "Run",
121
- "Python tests.Python tests for test_selector_converters.test_convert_xpath_to_css_tokens.executor": "Run",
122
- "Python tests.Python tests for test_selectors_converters.test_convert_css_to_xpath.executor": "Run",
123
- "Python tests.Python tests for test_selectors_converters.test_convert_xpath_to_css.executor": "Run",
124
- "Python tests.Python tests for test_str_utils.test_escape_str.executor": "Run",
125
- "Python tests.Python tests for test_str_utils.test_to_lower_camel_case.executor": "Run",
126
- "Python tests.Python tests for test_str_utils.test_to_snake_case.executor": "Run",
127
- "Python tests.Python tests for test_str_utils.test_to_upper_camel_case.executor": "Run",
128
- "Python tests.Python tests for test_str_utils.test_wrap_backtick.executor": "Run",
129
- "Python tests.Python tests for test_str_utils.test_wrap_double_quotes.executor": "Run",
130
- "Python tests.Python tests for test_utils.test_fail_validate_css_query.executor": "Run",
131
- "Python tests.Python tests for test_utils.test_fail_validate_xpath_query.executor": "Run",
132
- "Python tests.Python tests for test_utils.test_validate_css_query.executor": "Debug",
133
- "Python tests.Python tests for test_utils.test_validate_xpath_query.executor": "Run",
134
- "Python tests.Python tests for test_variable.test_left_right_var_names.executor": "Run",
135
- "Python tests.Python tests for test_variable.test_left_right_var_names_different_name.executor": "Run",
136
- "Python tests.Python tests for test_variable.test_left_right_var_names_first_variable.executor": "Run",
137
- "Python tests.Python tests for test_variable.test_left_right_var_names_multiple_variables.executor": "Run",
138
- "Python tests.Python tests for test_variable.test_left_right_var_names_non_first_variable.executor": "Run",
139
- "Python tests.Python tests in test_sc_magic_methods.py.executor": "Run",
140
- "Python tests.Python tests in test_variable.py.executor": "Run",
141
- "Python tests.Python tests in tests.executor": "Run",
142
- "Python.__init__.executor": "Run",
143
- "Python._demp.executor": "Run",
144
- "Python.a.executor": "Debug",
145
- "Python.aaaa.executor": "Run",
146
- "Python.animego_pro.executor": "Run",
147
- "Python.ast_builder.executor": "Debug",
148
- "Python.ast_ssc.executor": "Run",
149
- "Python.base (1).executor": "Run",
150
- "Python.base.executor": "Run",
151
- "Python.booksToScrape.executor": "Run",
152
- "Python.calc_hash.executor": "Run",
153
- "Python.cli.executor": "Run",
154
- "Python.constants.executor": "Debug",
155
- "Python.ex_extended.executor": "Run",
156
- "Python.expression.executor": "Run",
157
- "Python.fixer.executor": "Debug",
158
- "Python.generator.executor": "Debug",
159
- "Python.go_goquery.executor": "Run",
160
- "Python.main (1).executor": "Run",
161
- "Python.main.executor": "Debug",
162
- "Python.main2.executor": "Run",
163
- "Python.main_raw.executor": "Run",
164
- "Python.manual_make.executor": "Run",
165
- "Python.o.executor": "Run",
166
- "Python.py.executor": "Run",
167
- "Python.raw_main.executor": "Run",
168
- "Python.re_validator.executor": "Run",
169
- "Python.runtime_compile.executor": "Run",
170
- "Python.schema.executor": "Run",
171
- "Python.schemas (1).executor": "Run",
172
- "Python.schemas.executor": "Run",
173
- "Python.security.executor": "Run",
174
- "Python.tg_mini.executor": "Run",
175
- "Python.utils.executor": "Run",
176
- "RunOnceActivity.OpenProjectViewOnStart": "true",
177
- "RunOnceActivity.ShowReadmeOnStart": "true",
178
- "RunOnceActivity.git.unshallow": "true",
179
- "WebServerToolWindowFactoryState": "false",
180
- "dart.analysis.tool.window.visible": "false",
181
- "git-widget-placeholder": "main",
182
- "last_opened_file_path": "/home/georgiy/PycharmProjects/selector_schema_codegen/ssc_codegen/converters/ast_utils.py",
183
- "node.js.detected.package.eslint": "true",
184
- "node.js.detected.package.tslint": "true",
185
- "node.js.selected.package.eslint": "(autodetect)",
186
- "node.js.selected.package.tslint": "(autodetect)",
187
- "nodejs_package_manager_path": "npm",
188
- "settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
189
- "vue.rearranger.settings.migration": "true"
96
+ <component name="PropertiesComponent">{
97
+ &quot;keyToString&quot;: {
98
+ &quot;Dart Command Line App.dart_sscgen.dart.executor&quot;: &quot;Debug&quot;,
99
+ &quot;Dart Command Line App.main.dart.executor&quot;: &quot;Debug&quot;,
100
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
101
+ &quot;Python tests.Python tests for test_buildin_converters.test_converter_impl.executor&quot;: &quot;Run&quot;,
102
+ &quot;Python tests.Python tests for test_convert_query.test_convert_css_to_xpath.executor&quot;: &quot;Run&quot;,
103
+ &quot;Python tests.Python tests for test_convert_query.test_convert_xpath_to_css.executor&quot;: &quot;Run&quot;,
104
+ &quot;Python tests.Python tests for test_document.test_expr.executor&quot;: &quot;Run&quot;,
105
+ &quot;Python tests.Python tests for test_document.test_fail_attr_expr.executor&quot;: &quot;Run&quot;,
106
+ &quot;Python tests.Python tests for test_document.test_valid_html_expr.executor&quot;: &quot;Run&quot;,
107
+ &quot;Python tests.Python tests for test_document_array.test_list_document.executor&quot;: &quot;Run&quot;,
108
+ &quot;Python tests.Python tests for test_document_array.test_list_str.executor&quot;: &quot;Run&quot;,
109
+ &quot;Python tests.Python tests for test_document_assert.test_assert_expr.executor&quot;: &quot;Run&quot;,
110
+ &quot;Python tests.Python tests for test_document_invalid_expr.test_raw_invalid_expr.executor&quot;: &quot;Run&quot;,
111
+ &quot;Python tests.Python tests for test_document_regex.test_assert_expr.executor&quot;: &quot;Run&quot;,
112
+ &quot;Python tests.Python tests for test_document_regex.test_fail_compile_regex.executor&quot;: &quot;Run&quot;,
113
+ &quot;Python tests.Python tests for test_document_select.test_doc_to_str.executor&quot;: &quot;Run&quot;,
114
+ &quot;Python tests.Python tests for test_document_select.test_document_to_list_document.executor&quot;: &quot;Run&quot;,
115
+ &quot;Python tests.Python tests for test_document_text.test_fail_str_format.executor&quot;: &quot;Run&quot;,
116
+ &quot;Python tests.Python tests for test_document_text.test_string_expr.executor&quot;: &quot;Run&quot;,
117
+ &quot;Python tests.Python tests for test_go_unimport.test_go_unimport_naive.executor&quot;: &quot;Run&quot;,
118
+ &quot;Python tests.Python tests for test_invalid_expr.test_invalid_doc_expr.executor&quot;: &quot;Run&quot;,
119
+ &quot;Python tests.Python tests for test_invalid_expr.test_invalid_expr.executor&quot;: &quot;Run&quot;,
120
+ &quot;Python tests.Python tests for test_nested.test_nested.executor&quot;: &quot;Run&quot;,
121
+ &quot;Python tests.Python tests for test_nested.test_nested_2.executor&quot;: &quot;Run&quot;,
122
+ &quot;Python tests.Python tests for test_sc.test_fail_init.executor&quot;: &quot;Run&quot;,
123
+ &quot;Python tests.Python tests for test_sc.test_fail_schema_config.executor&quot;: &quot;Run&quot;,
124
+ &quot;Python tests.Python tests for test_sc_magic_methods.test_fail_document_value_type.executor&quot;: &quot;Run&quot;,
125
+ &quot;Python tests.Python tests for test_sc_magic_methods.test_fail_field_empty_expr.executor&quot;: &quot;Run&quot;,
126
+ &quot;Python tests.Python tests for test_sc_magic_methods.test_fail_schema_dict_key.executor&quot;: &quot;Run&quot;,
127
+ &quot;Python tests.Python tests for test_sc_magic_methods.test_fail_schema_magic.executor&quot;: &quot;Run&quot;,
128
+ &quot;Python tests.Python tests for test_sc_magic_methods.test_fail_schema_split_doc_ret_type.executor&quot;: &quot;Run&quot;,
129
+ &quot;Python tests.Python tests for test_sc_mro.test_schema_mro.executor&quot;: &quot;Run&quot;,
130
+ &quot;Python tests.Python tests for test_select_document.test_valid_html_expr.executor&quot;: &quot;Run&quot;,
131
+ &quot;Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath.executor&quot;: &quot;Run&quot;,
132
+ &quot;Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath_queries.executor&quot;: &quot;Run&quot;,
133
+ &quot;Python tests.Python tests for test_selector_converters.test_convert_css_to_xpath_tokens.executor&quot;: &quot;Run&quot;,
134
+ &quot;Python tests.Python tests for test_selector_converters.test_convert_xpath_to_css_tokens.executor&quot;: &quot;Run&quot;,
135
+ &quot;Python tests.Python tests for test_selectors_converters.test_convert_css_to_xpath.executor&quot;: &quot;Run&quot;,
136
+ &quot;Python tests.Python tests for test_selectors_converters.test_convert_xpath_to_css.executor&quot;: &quot;Run&quot;,
137
+ &quot;Python tests.Python tests for test_str_utils.test_escape_str.executor&quot;: &quot;Run&quot;,
138
+ &quot;Python tests.Python tests for test_str_utils.test_to_lower_camel_case.executor&quot;: &quot;Run&quot;,
139
+ &quot;Python tests.Python tests for test_str_utils.test_to_snake_case.executor&quot;: &quot;Run&quot;,
140
+ &quot;Python tests.Python tests for test_str_utils.test_to_upper_camel_case.executor&quot;: &quot;Run&quot;,
141
+ &quot;Python tests.Python tests for test_str_utils.test_wrap_backtick.executor&quot;: &quot;Run&quot;,
142
+ &quot;Python tests.Python tests for test_str_utils.test_wrap_double_quotes.executor&quot;: &quot;Run&quot;,
143
+ &quot;Python tests.Python tests for test_utils.test_fail_validate_css_query.executor&quot;: &quot;Run&quot;,
144
+ &quot;Python tests.Python tests for test_utils.test_fail_validate_xpath_query.executor&quot;: &quot;Run&quot;,
145
+ &quot;Python tests.Python tests for test_utils.test_validate_css_query.executor&quot;: &quot;Debug&quot;,
146
+ &quot;Python tests.Python tests for test_utils.test_validate_xpath_query.executor&quot;: &quot;Run&quot;,
147
+ &quot;Python tests.Python tests for test_variable.test_left_right_var_names.executor&quot;: &quot;Run&quot;,
148
+ &quot;Python tests.Python tests for test_variable.test_left_right_var_names_different_name.executor&quot;: &quot;Run&quot;,
149
+ &quot;Python tests.Python tests for test_variable.test_left_right_var_names_first_variable.executor&quot;: &quot;Run&quot;,
150
+ &quot;Python tests.Python tests for test_variable.test_left_right_var_names_multiple_variables.executor&quot;: &quot;Run&quot;,
151
+ &quot;Python tests.Python tests for test_variable.test_left_right_var_names_non_first_variable.executor&quot;: &quot;Run&quot;,
152
+ &quot;Python tests.Python tests in test_sc_magic_methods.py.executor&quot;: &quot;Run&quot;,
153
+ &quot;Python tests.Python tests in test_variable.py.executor&quot;: &quot;Run&quot;,
154
+ &quot;Python tests.Python tests in tests.executor&quot;: &quot;Run&quot;,
155
+ &quot;Python.__init__.executor&quot;: &quot;Run&quot;,
156
+ &quot;Python._demp.executor&quot;: &quot;Run&quot;,
157
+ &quot;Python.a.executor&quot;: &quot;Debug&quot;,
158
+ &quot;Python.aaaa.executor&quot;: &quot;Run&quot;,
159
+ &quot;Python.animego_pro.executor&quot;: &quot;Run&quot;,
160
+ &quot;Python.ast_builder.executor&quot;: &quot;Debug&quot;,
161
+ &quot;Python.ast_ssc.executor&quot;: &quot;Run&quot;,
162
+ &quot;Python.base (1).executor&quot;: &quot;Run&quot;,
163
+ &quot;Python.base.executor&quot;: &quot;Run&quot;,
164
+ &quot;Python.booksToScrape.executor&quot;: &quot;Run&quot;,
165
+ &quot;Python.calc_hash.executor&quot;: &quot;Run&quot;,
166
+ &quot;Python.cli.executor&quot;: &quot;Run&quot;,
167
+ &quot;Python.constants.executor&quot;: &quot;Debug&quot;,
168
+ &quot;Python.ex_extended.executor&quot;: &quot;Run&quot;,
169
+ &quot;Python.expression.executor&quot;: &quot;Run&quot;,
170
+ &quot;Python.fixer.executor&quot;: &quot;Debug&quot;,
171
+ &quot;Python.generator.executor&quot;: &quot;Debug&quot;,
172
+ &quot;Python.go_goquery.executor&quot;: &quot;Run&quot;,
173
+ &quot;Python.main (1).executor&quot;: &quot;Run&quot;,
174
+ &quot;Python.main.executor&quot;: &quot;Debug&quot;,
175
+ &quot;Python.main2.executor&quot;: &quot;Run&quot;,
176
+ &quot;Python.main_raw.executor&quot;: &quot;Run&quot;,
177
+ &quot;Python.manual_make.executor&quot;: &quot;Run&quot;,
178
+ &quot;Python.o.executor&quot;: &quot;Run&quot;,
179
+ &quot;Python.py.executor&quot;: &quot;Run&quot;,
180
+ &quot;Python.raw_main.executor&quot;: &quot;Run&quot;,
181
+ &quot;Python.re_validator.executor&quot;: &quot;Run&quot;,
182
+ &quot;Python.runtime_compile.executor&quot;: &quot;Run&quot;,
183
+ &quot;Python.schema.executor&quot;: &quot;Run&quot;,
184
+ &quot;Python.schemas (1).executor&quot;: &quot;Run&quot;,
185
+ &quot;Python.schemas.executor&quot;: &quot;Run&quot;,
186
+ &quot;Python.security.executor&quot;: &quot;Run&quot;,
187
+ &quot;Python.tg_mini.executor&quot;: &quot;Run&quot;,
188
+ &quot;Python.utils.executor&quot;: &quot;Run&quot;,
189
+ &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
190
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
191
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
192
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
193
+ &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
194
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
195
+ &quot;last_opened_file_path&quot;: &quot;/home/georgiy/PycharmProjects/anicli-api&quot;,
196
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
197
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
198
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
199
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
200
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
201
+ &quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot;,
202
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
190
203
  }
191
- }]]></component>
204
+ }</component>
192
205
  <component name="PyCoverageOptionsProvider">
193
206
  <option name="myUseBundledCoveragePy" value="true" />
194
207
  </component>
@@ -201,11 +214,11 @@
201
214
  <recent name="$PROJECT_DIR$/ssc_codegen/converters/templates/dart/universal_html" />
202
215
  </key>
203
216
  <key name="MoveFile.RECENT_KEYS">
217
+ <recent name="$PROJECT_DIR$/examples/booksToScrape" />
204
218
  <recent name="$PROJECT_DIR$/tests/schema" />
205
219
  <recent name="$PROJECT_DIR$/ssc_codegen/converters" />
206
220
  <recent name="$PROJECT_DIR$/examples" />
207
221
  <recent name="$PROJECT_DIR$/examples/python" />
208
- <recent name="$PROJECT_DIR$/tests/document" />
209
222
  </key>
210
223
  </component>
211
224
  <component name="RunManager" selected="Python tests.Python tests for test_buildin_converters.test_converter_impl">
@@ -223,7 +236,7 @@
223
236
  <option name="ADD_CONTENT_ROOTS" value="true" />
224
237
  <option name="ADD_SOURCE_ROOTS" value="true" />
225
238
  <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
226
- <option name="SCRIPT_NAME" value="$PROJECT_DIR$/examples/ex_extended.py" />
239
+ <option name="SCRIPT_NAME" value="$PROJECT_DIR$/examples/booksToScrape/ex_extended.py" />
227
240
  <option name="PARAMETERS" value="" />
228
241
  <option name="SHOW_COMMAND_LINE" value="false" />
229
242
  <option name="EMULATE_TERMINAL" value="false" />
@@ -394,31 +407,8 @@
394
407
  <workItem from="1738301565437" duration="8521000" />
395
408
  <workItem from="1738575037148" duration="22388000" />
396
409
  <workItem from="1738684052578" duration="6332000" />
397
- <workItem from="1738746990365" duration="27715000" />
398
- </task>
399
- <task id="LOCAL-00132" summary="mypy fix">
400
- <option name="closed" value="true" />
401
- <created>1738055157052</created>
402
- <option name="number" value="00132" />
403
- <option name="presentableId" value="LOCAL-00132" />
404
- <option name="project" value="LOCAL" />
405
- <updated>1738055157052</updated>
406
- </task>
407
- <task id="LOCAL-00133" summary="fix dart codegen">
408
- <option name="closed" value="true" />
409
- <created>1738067544204</created>
410
- <option name="number" value="00133" />
411
- <option name="presentableId" value="LOCAL-00133" />
412
- <option name="project" value="LOCAL" />
413
- <updated>1738067544205</updated>
414
- </task>
415
- <task id="LOCAL-00134" summary="fix XPATH js">
416
- <option name="closed" value="true" />
417
- <created>1738094439436</created>
418
- <option name="number" value="00134" />
419
- <option name="presentableId" value="LOCAL-00134" />
420
- <option name="project" value="LOCAL" />
421
- <updated>1738094439436</updated>
410
+ <workItem from="1738746990365" duration="28527000" />
411
+ <workItem from="1738827918820" duration="143000" />
422
412
  </task>
423
413
  <task id="LOCAL-00135" summary="add test for converter utils, fix lowerCamelCase func">
424
414
  <option name="closed" value="true" />
@@ -788,7 +778,31 @@
788
778
  <option name="project" value="LOCAL" />
789
779
  <updated>1738794557342</updated>
790
780
  </task>
791
- <option name="localTasksCounter" value="181" />
781
+ <task id="LOCAL-00181" summary="rename modules">
782
+ <option name="closed" value="true" />
783
+ <created>1738794901438</created>
784
+ <option name="number" value="00181" />
785
+ <option name="presentableId" value="LOCAL-00181" />
786
+ <option name="project" value="LOCAL" />
787
+ <updated>1738794901438</updated>
788
+ </task>
789
+ <task id="LOCAL-00182" summary="ruff fmt">
790
+ <option name="closed" value="true" />
791
+ <created>1738794911350</created>
792
+ <option name="number" value="00182" />
793
+ <option name="presentableId" value="LOCAL-00182" />
794
+ <option name="project" value="LOCAL" />
795
+ <updated>1738794911350</updated>
796
+ </task>
797
+ <task id="LOCAL-00183" summary="bump">
798
+ <option name="closed" value="true" />
799
+ <created>1738794935313</created>
800
+ <option name="number" value="00183" />
801
+ <option name="presentableId" value="LOCAL-00183" />
802
+ <option name="project" value="LOCAL" />
803
+ <updated>1738794935313</updated>
804
+ </task>
805
+ <option name="localTasksCounter" value="184" />
792
806
  <servers />
793
807
  </component>
794
808
  <component name="TypeScriptGeneratedFilesManager">
@@ -806,8 +820,6 @@
806
820
  </option>
807
821
  </component>
808
822
  <component name="VcsManagerConfiguration">
809
- <MESSAGE value="dev: add httpx dep" />
810
- <MESSAGE value="update readme" />
811
823
  <MESSAGE value="add schema tests" />
812
824
  <MESSAGE value="add check stacks expr len, extract_default_expr check stack len&#10;throw error if stack is empty" />
813
825
  <MESSAGE value="refactoring: ast utils to another module" />
@@ -826,12 +838,14 @@
826
838
  <MESSAGE value="add new schema factories, add new tests" />
827
839
  <MESSAGE value="Document marks: add optional default_value argument" />
828
840
  <MESSAGE value="ruff fix" />
829
- <MESSAGE value="bump" />
830
841
  <MESSAGE value="check: add run pytest&#10;fix: add ruff fix" />
831
842
  <MESSAGE value="ruff, mypy fix" />
832
843
  <MESSAGE value="js_pure:&#10;TokenType.EXPR_CSS_ALL:&#10;convert nodes to array&#10;&#10;TokenType.EXPR_RAW,TokenType.EXPR_TEXT:&#10;add check variable type document and node" />
833
844
  <MESSAGE value="add test converters implementation status" />
834
- <option name="LAST_COMMIT_MESSAGE" value="add test converters implementation status" />
845
+ <MESSAGE value="rename modules" />
846
+ <MESSAGE value="ruff fmt" />
847
+ <MESSAGE value="bump" />
848
+ <option name="LAST_COMMIT_MESSAGE" value="bump" />
835
849
  </component>
836
850
  <component name="XDebuggerManager">
837
851
  <breakpoint-manager>
@@ -857,7 +871,7 @@
857
871
  <option name="timeStamp" value="121" />
858
872
  </line-breakpoint>
859
873
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
860
- <url>file://$PROJECT_DIR$/examples/python/main2.py</url>
874
+ <url>file://$PROJECT_DIR$/examples/booksToScrape/python/main2.py</url>
861
875
  <line>6</line>
862
876
  <option name="timeStamp" value="125" />
863
877
  </line-breakpoint>
@@ -867,7 +881,7 @@
867
881
  <option name="timeStamp" value="132" />
868
882
  </line-breakpoint>
869
883
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
870
- <url>file://$PROJECT_DIR$/examples/ex_extended.py</url>
884
+ <url>file://$PROJECT_DIR$/examples/booksToScrape/ex_extended.py</url>
871
885
  <line>14</line>
872
886
  <option name="timeStamp" value="134" />
873
887
  </line-breakpoint>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ssc_codegen
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: Add your description here
5
5
  Project-URL: Documentation, https://github.com/vypivshiy/selector_schema_codegen#readme
6
6
  Project-URL: Issues, https://github.com/vypivshiy/selector_schema_codegen/issues
@@ -0,0 +1,144 @@
1
+ from typing import List, Optional, Sequence
2
+
3
+ from ssc_codegen import D, N, DictSchema, ItemSchema, ListSchema
4
+
5
+ # old domain - animego.org
6
+ URL_FMT = "https://animego.me" + "{{}}"
7
+
8
+
9
+ class OngoingPage(ListSchema):
10
+ """Get all available ongoings from the main page
11
+
12
+ GET https://animego.me
13
+ """
14
+
15
+ __SPLIT_DOC__ = D().css_all(".border-bottom-0.cursor-pointer")
16
+
17
+ url = D().attr("onclick").ltrim("location.href=").trim("'").format(URL_FMT)
18
+ title = D().css(".last-update-title").text()
19
+ thumbnail = D().css(".lazy").attr("style").ltrim("background-image: url(").rtrim(");")
20
+ episode = D().css(".text-truncate").text().re("(\d+)\s")
21
+ dub = D().css(".text-gray-dark-6").text().repl(")", "").repl("(", "")
22
+
23
+
24
+ class SearchPage(ListSchema):
25
+ """Get all search results by query
26
+
27
+ USAGE:
28
+
29
+ GET https://animego.me/search/anime
30
+ q={QUERY}
31
+
32
+ EXAMPLE:
33
+
34
+ GET https://animego.me/search/anime?q=LAIN
35
+ """
36
+
37
+ __SPLIT_DOC__ = D().css_all(".row > .col-ul-2")
38
+
39
+ title = D().css(".text-truncate a").attr("title")
40
+ thumbnail = D().css(".lazy").attr("data-original")
41
+ url = D().css(".text-truncate a").attr("href")
42
+
43
+
44
+ class AnimePage(ItemSchema):
45
+ """Anime page information. anime path contains in SearchView.url or Ongoing.url
46
+
47
+ - id needed for next API requests
48
+ - raw_json used for extract extra metadata (unescape required)
49
+
50
+ USAGE:
51
+
52
+ GET https://animego.me/anime/<ANIME_PATH>
53
+
54
+ EXAMPLE:
55
+
56
+ GET https://animego.me/anime/eksperimenty-leyn-1114
57
+ """
58
+
59
+ title = D().css(".anime-title h1").text()
60
+ # maybe missing description eg:
61
+ # https://animego.org/anime/chelovek-muskul-2589
62
+ description = D().default('').css_all(".description").text().join('').re_sub(r"^\s+|\s+$", "")
63
+ thumbnail = D().css("#content img").attr("src")
64
+ # anime id required for next requests (for DubberView, Source schemas)
65
+ id = D().css(".br-2 .my-list-anime").attr("id").ltrim("my-list-")
66
+
67
+ # DEV key: for parse extra metadata can be json unmarshal.
68
+ # unescape required
69
+ raw_json = D().css("script[type='application/ld+json']").text()
70
+
71
+
72
+ class EpisodeDubbersView(DictSchema):
73
+ __SPLIT_DOC__ = D().css_all("#video-dubbing .mb-1")
74
+ __SIGNATURE__ = {"<dubber_id>": "<dubber_name>", "<id>": "..."}
75
+
76
+ __KEY__ = D().attr("data-dubbing")
77
+ __VALUE__ = D().css("span").text().re_sub(r"^\s+|\s+$", "")
78
+
79
+
80
+ class EpisodesView(ListSchema):
81
+ __SPLIT_DOC__ = D().css_all("#video-carousel .mb-0")
82
+
83
+ num = D().attr("data-episode")
84
+ title = D().attr("data-episode-title")
85
+ id = D().attr("data-id")
86
+
87
+
88
+ class EpisodePage(ItemSchema):
89
+ """Representation episodes
90
+
91
+ Prepare:
92
+ 1. get id from Anime object
93
+ 2. GET 'https://animego.me/anime/{Anime.id}/player?_allow=true'
94
+ 3. extract html from json by ['content'] key
95
+ 4. OPTIONAL: unescape HTML
96
+
97
+ EXAMPLE:
98
+
99
+ GET https://animego.me/anime/anime/1114//player?_allow=true
100
+ """
101
+
102
+ dubbers = N().sub_parser(EpisodeDubbersView)
103
+ episodes = N().sub_parser(EpisodesView)
104
+
105
+
106
+ class SourceVideoView(ListSchema):
107
+ __SPLIT_DOC__ = D().css_all("#video-players > span")
108
+
109
+ title = D().text()
110
+ url = D().attr("data-player").format("https:{{}}")
111
+ data_provider = D().attr("data-provider")
112
+ data_provide_dubbing = D().attr("data-provide-dubbing")
113
+
114
+
115
+ class SourceDubbersView(DictSchema):
116
+ __SPLIT_DOC__ = D().css_all("#video-dubbing > span")
117
+ __SIGNATURE__ = {"<dubber_id>": "<dubber_name>", "...": "..."}
118
+
119
+ __KEY__ = D().attr("data-dubbing")
120
+ __VALUE__ = D().text().re_sub(r"^\s+", "").re_sub(r"\s+$", "")
121
+
122
+
123
+ class SourcePage(ItemSchema):
124
+ """representation player urls
125
+
126
+ Prepare:
127
+ 1. get num and id from Episode
128
+
129
+ 2.
130
+
131
+ GET https://animego.me/anime/series
132
+ dubbing=2&provider=24&episode={Episode.num}id={Episode.id}
133
+
134
+ 3. extract html from json by ["content"] key
135
+
136
+ 4. OPTIONAL: unescape document
137
+
138
+ EXAMPLE:
139
+
140
+ GET https://animego.me/anime/series?dubbing=2&provider=24&episode=2&id=15837
141
+ """
142
+
143
+ dubbers = N().sub_parser(SourceDubbersView)
144
+ videos = N().sub_parser(SourceVideoView)
@@ -1,4 +1,5 @@
1
1
  ssc-gen go schemas/booksToScrape.py -o go --package main
2
+ # OPTIONAL chose parser backend lib
2
3
  ssc-gen py schemas/booksToScrape.py -i parsel -o python
3
4
  ssc-gen js schemas/booksToScrape.py -o js
4
5
  ssc-gen dart schemas/booksToScrape.py -o dart
@@ -0,0 +1,23 @@
1
+ <!--synthetic html page for demonstare write schemas examples and tests in several cases-->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Demo page 1</title>
7
+ </head>
8
+ <body>
9
+ <!--simple items element-->
10
+ <div class="item-sc">
11
+ <p>item sc</p>
12
+ <a href="example.com">example page</a>
13
+
14
+ </div>
15
+ 1. simple item-sc tags
16
+ 2. simple list-sc tags
17
+ 3. simple dict-sc tags
18
+ 4. simple flatlist-sc tags
19
+
20
+ 5. nested item-sc tags + 2-4
21
+ 5. multi layered page
22
+ </body>
23
+ </html>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ssc_codegen"
3
- version = "0.5.3"
3
+ version = "0.5.4"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -2,7 +2,7 @@ from .document import HTMLDocument, StringDocument, ArrayDocument, AssertDocumen
2
2
  NumericDocument
3
3
  from .schema import ItemSchema, DictSchema, ListSchema, FlatListSchema
4
4
 
5
- VERSION = "0.5.3"
5
+ VERSION = "0.5.4"
6
6
 
7
7
  class __MISSING(object):
8
8
  pass
File without changes
@@ -422,7 +422,7 @@ def tt_join(node: JoinExpression) -> str:
422
422
 
423
423
  prv, nxt = lr_var_names(variable=node.variable)
424
424
  sep = repr(node.sep)
425
- code = py.BINDINGS[nxt, sep, prv]
425
+ code = py.BINDINGS[node.kind, nxt, sep, prv]
426
426
  return indent + code
427
427
 
428
428
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes