Skip to content

Commit a731495

Browse files
committed
Add convert text feature on TextProcessingController.
1 parent f56798c commit a731495

13 files changed

+442
-9
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/24.10)
1+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/24.11)
22

33
Aspose.Cells Cloud for Python enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
44

@@ -19,11 +19,11 @@ Enhance your Python applications with the [Aspose.Cells Cloud](https://products.
1919
- Import/Export: Facilitates importing data from various sources into spreadsheets and exporting spreadsheet data to other formats.
2020
- Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
2121

22-
## Feature & Enhancements in Version 24.10
22+
## Feature & Enhancements in Version 24.11
2323

2424
Full list of issues covering all changes in this release:
2525

26-
- Add the new feature about removing characters on TextProcessingController.
26+
- Add convert text feature on TextProcessingController.
2727

2828
## Support file format
2929

@@ -63,7 +63,6 @@ Full list of issues covering all changes in this release:
6363
|[DOCX](https://docs.fileformat.com/word-processing/docx/)|A well-known format for Microsoft Word documents that is a combination of XML and binary files.||√|
6464
|[PPTX](https://docs.fileformat.com/presentation/pptx/)|The PPTX format is based on the Microsoft PowerPoint open XML presentation file format.||√|
6565

66-
6766
## Quick Start Guide
6867

6968
To begin with Aspose.Cells Cloud, here's what you need to do:
@@ -115,11 +114,14 @@ api.put_convert_workbook(request)
115114
| [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-java) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-php) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-node) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-android) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-swift) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl) | [GitHub](https://github.com/aspose-cells-cloud/aspose-cells-cloud-go) |
116115
| [NuGet](https://www.nuget.org/packages/Aspose.Cells-Cloud/) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-cells-cloud) | [Composer](https://packagist.org/packages/aspose/cells-sdk-php) | [GEM](https://rubygems.org/gems/aspose_cells_cloud) | [NPM](https://www.npmjs.com/package/asposecellscloud) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-cells-cloud-android) | [POD](https://cocoapods.org/pods/AsposeCellsCloud) | [CPAN](https://metacpan.org/release/AsposeCellsCloud-CellsApi) | [GO](https://pkg.go.dev/github.com/aspose-cells-cloud/aspose-cells-cloud-go/v20?tab=overview) |
117116

118-
119117
[Product Page](https://products.aspose.cloud/cells/python) | [Documentation](https://docs.aspose.cloud/cells/) | [Live Demo](https://products.aspose.app/cells/family) | [API Reference](https://apireference.aspose.cloud/cells/) | [Code Samples](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/tree/master/test) | [Blog](https://blog.aspose.cloud/category/cells/) | [Free Support](https://forum.aspose.cloud/c/cells) | [Free Trial](https://dashboard.aspose.cloud/#/apps)
120118

121119
# Release history version
122120

121+
## Enhancements in Version 24.10
122+
123+
- Add the new feature about removing characters on TextProcessingController.
124+
123125
## Enhancements in Version 24.9
124126

125127
- Add word case function for TextProcessingController.

asposecellscloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
from asposecellscloud.models.pivot_tables import PivotTables
346346
from asposecellscloud.models.add_text_options import AddTextOptions
347347
from asposecellscloud.models.base_operate_options import BaseOperateOptions
348+
from asposecellscloud.models.convert_text_options import ConvertTextOptions
348349
from asposecellscloud.models.remove_characters_by_character import RemoveCharactersByCharacter
349350
from asposecellscloud.models.remove_characters_by_position import RemoveCharactersByPosition
350351
from asposecellscloud.models.remove_characters_options import RemoveCharactersOptions
@@ -703,6 +704,7 @@
703704
from asposecellscloud.requests.post_trim_content_request import PostTrimContentRequest
704705
from asposecellscloud.requests.post_update_word_case_request import PostUpdateWordCaseRequest
705706
from asposecellscloud.requests.post_remove_characters_request import PostRemoveCharactersRequest
707+
from asposecellscloud.requests.post_convert_text_request import PostConvertTextRequest
706708
from asposecellscloud.requests.get_workbook_default_style_request import GetWorkbookDefaultStyleRequest
707709
from asposecellscloud.requests.get_workbook_text_items_request import GetWorkbookTextItemsRequest
708710
from asposecellscloud.requests.get_workbook_names_request import GetWorkbookNamesRequest

asposecellscloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
8888
self.host = host
8989
self.cookie = cookie
9090
# Set default User-Agent.
91-
self.user_agent = 'Aspose.Cells.Cloud/24.10/python'
91+
self.user_agent = 'Aspose.Cells.Cloud/24.11/python'
9292

9393
@property
9494
def user_agent(self):

asposecellscloud/apis/cells_api.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12461,6 +12461,53 @@ def post_remove_characters_with_http_info(self, request, **kwargs):
1246112461

1246212462

1246312463

12464+
# <summary>
12465+
# </summary>
12466+
# <param name="request">Request. <see cref="PostConvertTextRequest" /></param>
12467+
def post_convert_text(self, request, **kwargs):
12468+
12469+
kwargs['_return_http_data_only'] = True
12470+
self.check_access_token()
12471+
if kwargs.get('callback'):
12472+
return self.post_convert_text_with_http_info(request,**kwargs)
12473+
else:
12474+
(data) = self.post_convert_text_with_http_info(request,**kwargs)
12475+
return data
12476+
12477+
def post_convert_text_with_http_info(self, request, **kwargs):
12478+
all_params = []
12479+
all_params.append('callback')
12480+
all_params.append('_return_http_data_only')
12481+
all_params.append('_preload_content')
12482+
all_params.append('_request_timeout')
12483+
params = locals()
12484+
for key, val in iteritems(params['kwargs']):
12485+
if key not in all_params:
12486+
raise TypeError(
12487+
"Got an unexpected keyword argument '%s'"
12488+
" to method post_convert_text" % key
12489+
)
12490+
params[key] = val
12491+
del params['kwargs']
12492+
12493+
http_params = request.create_http_request(self.api_client)
12494+
return self.api_client.call_api(http_params['path'], http_params['method'],
12495+
None,
12496+
http_params['query_params'],
12497+
http_params['header_params'],
12498+
body=http_params['body'],
12499+
post_params=http_params['form_params'],
12500+
files=http_params['files'],
12501+
response_type=http_params['response_type'],
12502+
auth_settings=http_params['auth_settings'],
12503+
callback=params.get('callback'),
12504+
_return_http_data_only=params.get('_return_http_data_only'),
12505+
_preload_content=params.get('_preload_content', True),
12506+
_request_timeout=params.get('_request_timeout'),
12507+
collection_formats=http_params['collection_formats'])
12508+
12509+
12510+
1246412511
# <summary>
1246512512
# Retrieve the description of the default style for the workbook .
1246612513
# </summary>

asposecellscloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,5 +259,5 @@ def to_debug_report(self):
259259
"OS: {env}\n"\
260260
"Python Version: {pyversion}\n"\
261261
"Version of the API: v3.0\n"\
262-
"SDK Package Version: 24.10".\
262+
"SDK Package Version: 24.11".\
263263
format(env=sys.platform, pyversion=sys.version)

asposecellscloud/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
from asposecellscloud.models.pivot_tables import PivotTables
347347
from asposecellscloud.models.add_text_options import AddTextOptions
348348
from asposecellscloud.models.base_operate_options import BaseOperateOptions
349+
from asposecellscloud.models.convert_text_options import ConvertTextOptions
349350
from asposecellscloud.models.remove_characters_by_character import RemoveCharactersByCharacter
350351
from asposecellscloud.models.remove_characters_by_position import RemoveCharactersByPosition
351352
from asposecellscloud.models.remove_characters_options import RemoveCharactersOptions
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
# coding: utf-8
2+
"""
3+
<copyright company="Aspose" file="ConvertTextOptionspy.cs">
4+
Copyright (c) 2024 Aspose.Cells Cloud
5+
</copyright>
6+
<summary>
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.
24+
</summary>
25+
"""
26+
27+
from pprint import pformat
28+
from six import iteritems
29+
import re
30+
31+
class ConvertTextOptions(object):
32+
33+
"""
34+
NOTE: This class is auto generated by the swagger code generator program.
35+
Do not edit the class manually.
36+
"""
37+
38+
39+
"""
40+
Attributes:
41+
swagger_types (dict): The key is attribute name
42+
and the value is attribute type.
43+
attribute_map (dict): The key is attribute name
44+
and the value is json key in definition.
45+
"""
46+
47+
swagger_types = {
48+
'name' : 'str',
49+
'data_source' : 'DataSource',
50+
'file_info' : 'FileInfo',
51+
'worksheet' : 'str',
52+
'range' : 'str',
53+
'convert_text_type' : 'str',
54+
'source_characters' : 'str',
55+
'target_characters' : 'str'
56+
}
57+
58+
attribute_map = {
59+
'name' : 'Name' ,
60+
'data_source' : 'DataSource' ,
61+
'file_info' : 'FileInfo' ,
62+
'worksheet' : 'Worksheet' ,
63+
'range' : 'Range' ,
64+
'convert_text_type' : 'ConvertTextType' ,
65+
'source_characters' : 'SourceCharacters' ,
66+
'target_characters' : 'TargetCharacters'
67+
}
68+
69+
@staticmethod
70+
def get_swagger_types():
71+
return ConvertTextOptions.swagger_types
72+
73+
@staticmethod
74+
def get_attribute_map():
75+
return ConvertTextOptions.attribute_map
76+
77+
def get_from_container(self, attr):
78+
if attr in self.container:
79+
return self.container[attr]
80+
return None
81+
82+
def __init__(self,name=None ,data_source=None ,file_info=None ,worksheet=None ,range=None ,convert_text_type=None ,source_characters=None ,target_characters=None ,**kw):
83+
"""
84+
Associative dict for storing property values
85+
"""
86+
self.container = {}
87+
88+
"""
89+
ConvertTextOptions - a model defined in Swagger
90+
"""
91+
self.container['name'] = None
92+
self.container['data_source'] = None
93+
self.container['file_info'] = None
94+
self.container['worksheet'] = None
95+
self.container['range'] = None
96+
self.container['convert_text_type'] = None
97+
self.container['source_characters'] = None
98+
self.container['target_characters'] = None
99+
params = locals()
100+
self.name = name
101+
if 'name' in params:
102+
self.name = params["name"]
103+
104+
105+
106+
self.data_source = data_source
107+
if 'data_source' in params:
108+
self.data_source = params["data_source"]
109+
110+
111+
112+
self.file_info = file_info
113+
if 'file_info' in params:
114+
self.file_info = params["file_info"]
115+
116+
117+
118+
self.worksheet = worksheet
119+
if 'worksheet' in params:
120+
self.worksheet = params["worksheet"]
121+
122+
123+
124+
self.range = range
125+
if 'range' in params:
126+
self.range = params["range"]
127+
128+
129+
130+
self.convert_text_type = convert_text_type
131+
if 'convert_text_type' in params:
132+
self.convert_text_type = params["convert_text_type"]
133+
134+
135+
136+
self.source_characters = source_characters
137+
if 'source_characters' in params:
138+
self.source_characters = params["source_characters"]
139+
140+
141+
142+
self.target_characters = target_characters
143+
if 'target_characters' in params:
144+
self.target_characters = params["target_characters"]
145+
146+
147+
148+
149+
@property
150+
def name(self):
151+
return self.container['name']
152+
153+
@name.setter
154+
def name(self, name):
155+
self.container['name'] = name
156+
@property
157+
def data_source(self):
158+
return self.container['data_source']
159+
160+
@data_source.setter
161+
def data_source(self, data_source):
162+
self.container['data_source'] = data_source
163+
@property
164+
def file_info(self):
165+
return self.container['file_info']
166+
167+
@file_info.setter
168+
def file_info(self, file_info):
169+
self.container['file_info'] = file_info
170+
@property
171+
def worksheet(self):
172+
return self.container['worksheet']
173+
174+
@worksheet.setter
175+
def worksheet(self, worksheet):
176+
self.container['worksheet'] = worksheet
177+
@property
178+
def range(self):
179+
return self.container['range']
180+
181+
@range.setter
182+
def range(self, range):
183+
self.container['range'] = range
184+
@property
185+
def convert_text_type(self):
186+
return self.container['convert_text_type']
187+
188+
@convert_text_type.setter
189+
def convert_text_type(self, convert_text_type):
190+
self.container['convert_text_type'] = convert_text_type
191+
@property
192+
def source_characters(self):
193+
return self.container['source_characters']
194+
195+
@source_characters.setter
196+
def source_characters(self, source_characters):
197+
self.container['source_characters'] = source_characters
198+
@property
199+
def target_characters(self):
200+
return self.container['target_characters']
201+
202+
@target_characters.setter
203+
def target_characters(self, target_characters):
204+
self.container['target_characters'] = target_characters
205+
206+
def to_dict(self):
207+
"""
208+
Returns the model properties as a dict
209+
"""
210+
result = {}
211+
212+
for attr, _ in iteritems(self.get_swagger_types()):
213+
value = self.get_from_container(attr)
214+
if isinstance(value, list):
215+
result[attr] = list(map(
216+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
217+
value
218+
))
219+
elif hasattr(value, "to_dict"):
220+
result[attr] = value.to_dict()
221+
elif isinstance(value, dict):
222+
result[attr] = dict(map(
223+
lambda item: (item[0], item[1].to_dict())
224+
if hasattr(item[1], "to_dict") else item,
225+
value.items()
226+
))
227+
else:
228+
result[attr] = value
229+
230+
return result
231+
232+
def to_str(self):
233+
"""
234+
Returns the string representation of the model
235+
"""
236+
return pformat(self.to_dict())
237+
238+
def __repr__(self):
239+
"""
240+
For `print` and `pprint`
241+
"""
242+
return self.to_str()
243+
244+
def __eq__(self, other):
245+
"""
246+
Returns true if both objects are equal
247+
"""
248+
if not isinstance(other, ConvertTextOptions):
249+
return False
250+
251+
return self.__dict__ == other.__dict__
252+
253+
def __ne__(self, other):
254+
"""
255+
Returns true if both objects are not equal
256+
"""
257+
return not self == other

0 commit comments

Comments
 (0)