contentstack-utils 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl

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.
@@ -31,6 +31,6 @@ __all__ = (
31
31
  __title__ = 'contentstack_utils'
32
32
  __author__ = 'contentstack'
33
33
  __status__ = 'debug'
34
- __version__ = '1.3.0'
34
+ __version__ = '1.3.2'
35
35
  __endpoint__ = 'cdn.contentstack.io'
36
36
  __contact__ = 'support@contentstack.com'
@@ -70,7 +70,7 @@ class Options:
70
70
  if node_type == 'p':
71
71
  return "<p>" + inner_html + "</p>"
72
72
  if node_type == 'a':
73
- return "<a href=\"{}\">{}</a>".format(node_obj["attrs"]["href"], inner_html)
73
+ return "<a href=\"{}\">{}</a>".format(node_obj["attrs"]["url"], inner_html)
74
74
  if node_type == 'img':
75
75
  return "<img src=\"{}\" />{}".format(node_obj["attrs"]["src"], inner_html)
76
76
  if node_type == 'embed':
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: contentstack_utils
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: contentstack_utils is a Utility package for Contentstack headless CMS with an API-first approach.
5
5
  Home-page: https://github.com/contentstack/contentstack-utils-python
6
6
  Author: contentstack
@@ -16,6 +16,15 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Requires-Python: >=3.6
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
+ Dynamic: author
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-python
27
+ Dynamic: summary
19
28
 
20
29
  # Contentstack Utility
21
30
 
@@ -1,4 +1,4 @@
1
- contentstack_utils/__init__.py,sha256=CfbGkFGBS_v7mfYxOo1QU35LLUUhX8muQ650EjzDisU,957
1
+ contentstack_utils/__init__.py,sha256=Q93Aroqz9atnMI04MJtTpuYL9QoD6dRehtchXF0g5kE,957
2
2
  contentstack_utils/automate.py,sha256=3tm43Y12dWZrJy6DR9tkAl4Dmph9-hNMXK94UWSKYso,7389
3
3
  contentstack_utils/gql.py,sha256=_r1K8pBduin_STrIo9IqdD3ftH0_3Ii6RSnTcrqwJlY,1587
4
4
  contentstack_utils/utils.py,sha256=4oIy_JBhpLW0CkxyZJ39ubj9u7Lw4sKRhOyg3cCStdM,4045
@@ -10,7 +10,8 @@ contentstack_utils/helper/converter.py,sha256=2tZ6paPnWCCW0aoaQiMFGAhAdx4Bh2LsCn
10
10
  contentstack_utils/helper/metadata.py,sha256=YrNVhvkv4n_nR0nrJR2x2eqYE3-P1jT7ctVSklvnSgc,1795
11
11
  contentstack_utils/helper/node_to_html.py,sha256=himweM9ID4tQb7GNQP49XYTkN0KWWPy_LzBi-f6eS2E,1019
12
12
  contentstack_utils/render/__init__.py,sha256=0Ni3R_ia-HuTDFYQvoLURdeRkRD8HiyteiEEJ3O4V14,25
13
- contentstack_utils/render/options.py,sha256=hbqgPxCksgQlV5hK_6Flb2HEHaXk5JpMNc7z5yMxgCI,5033
13
+ contentstack_utils/render/options.py,sha256=hyu-XqErLvx2H21_rjQI9LcUnCNlAyiPFD7vfeAUP_s,5032
14
+ contentstack_utils-1.3.2.dist-info/licenses/LICENSE,sha256=-tKrNocph9-vZ8FqLaWzoPUMzIHYahgc-60hdufwHBQ,1056
14
15
  tests/__init__.py,sha256=stlQRdpO_kQoRExPLd-q80RCzHd-F4t1Rs6tZ0ObP2o,2336
15
16
  tests/convert_style.py,sha256=gXHQjSnxCZ7kQBG6TjKIYk-tvKhzdpeOBCA88YTcDC8,983
16
17
  tests/test_default_opt_others.py,sha256=H-xhmyGMJNET0kkhXGcyepWUTE0Vqd1DpzPCI6hKaro,2138
@@ -22,10 +23,9 @@ tests/test_option_render_mark.py,sha256=NU7TOTJgljZyO5cnrphX-XyhJXUYqaZIbTzMJX0H
22
23
  tests/test_render_default_options.py,sha256=JNx_gA11Af-hPRoSd5MG59Cy5xjyUrpr8WXpVzqk6FY,3993
23
24
  tests/test_render_options.py,sha256=BFuf9nkh1c9BJ-UTFVBkmjBTf31pSeWJ2jTZY7XgVaY,1701
24
25
  tests/test_style_type.py,sha256=6Wz_UR5ZQcaUlB-Tfeqp6Dcu85AE7pHbtg6V1Sh7A9k,723
25
- tests/test_util_srte.py,sha256=vNb2xsrmGmGSonW_EzpItcqoQmnSWUmOlzybIo5fzik,5951
26
+ tests/test_util_srte.py,sha256=VImdVxShLQgWd6G94JKoHudqcLycmClukRylZDsb4JE,5930
26
27
  tests/test_utils.py,sha256=2rvZZcT6m3QJZeyqzyp9ydsTX34w5tAkQOCKqXso3xw,3614
27
- contentstack_utils-1.3.0.dist-info/LICENSE,sha256=lNqz95ic6VWhDILAlbV_KgjGfl7GM1QQd6LKZq__zx4,1051
28
- contentstack_utils-1.3.0.dist-info/METADATA,sha256=3J3TPvQlfE0wmBcz1EweJYGRt6wzYdIH5jpWRI3UhgY,4906
29
- contentstack_utils-1.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
30
- contentstack_utils-1.3.0.dist-info/top_level.txt,sha256=4b5I6taLW2KGOy1931_UZDIcML7HJEfjpzIDpz5MmTU,25
31
- contentstack_utils-1.3.0.dist-info/RECORD,,
28
+ contentstack_utils-1.3.2.dist-info/METADATA,sha256=ErYKKW_aKNtSdHilGzJBX-wmqehbzA7fGdY6RpUohr4,5097
29
+ contentstack_utils-1.3.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
30
+ contentstack_utils-1.3.2.dist-info/top_level.txt,sha256=4b5I6taLW2KGOy1931_UZDIcML7HJEfjpzIDpz5MmTU,25
31
+ contentstack_utils-1.3.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,4 +1,4 @@
1
- Copyright 2024 Contentstack
1
+ Copyright 2021-2025 Contentstack
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
tests/test_util_srte.py CHANGED
@@ -110,7 +110,7 @@ class TestSuperchargedUtils(unittest.TestCase):
110
110
 
111
111
  def test_reference_list_in_supercharged_dict_to_html(self):
112
112
  array_str = ['reference']
113
- response = response = Utils.json_to_html([self._json_data], array_str, Options())
113
+ response = Utils.json_to_html([self._json_data], array_str, Options())
114
114
  self.assertEqual(Results.refImgHtml, response)
115
115
 
116
116
  def test_nested_order_list_in_supercharged_dict_to_html(self):
@@ -118,11 +118,10 @@ class TestSuperchargedUtils(unittest.TestCase):
118
118
  Utils.json_to_html([self._json_data], array_str, Options())
119
119
  self.assertEqual(Results.nested_order_list_with_fragment, "<ol><li><fragment>List Item 1</fragment><ol><li>List Item 1.1</li><li>List Item 1.2</li><li>List Item 1.3</li></ol></li></ol>")
120
120
 
121
-
122
- def test_reference_list_in_supercharged_dict_to_html(self):
121
+ def test_reference_image_in_supercharged_dict_to_html(self):
123
122
  array_str = ['reference']
124
- Utils.json_to_html([self._json_data], array_str, Options())
125
- self.assertEqual(Results.linkInPHtml, self._json_data['reference'])
123
+ response = Utils.json_to_html([self._json_data], array_str, Options())
124
+ self.assertEqual(Results.refImgHtml, response)
126
125
 
127
126
  def test_nested_order_list_in_supercharged_dict_to_html(self):
128
127
  array_str = ['nested_order_list_with_fragment']