Created
January 11, 2021 12:21
-
-
Save aspose-cloud/5b7fccaec056fa66b55b2d7ad22b9c20 to your computer and use it in GitHub Desktop.
This Gist repository contains code snippet related to Aspose.OMR Cloud SDK for Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.OMR-Cloud-SDK-Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/ | |
raise RuntimeError, "Unable to upload file #{image_file_path}" unless @storage.upload_file(image_file_path) | |
image_name = File.basename(image_file_path) | |
response = @omr_api.post_run_omr_task(image_name, 'CorrectTemplate', | |
{:param => AsposeOmrCloud::OMRFunctionParam.new({:FunctionParam => serialize_files([template_file_path])}) } | |
) | |
check_omr_response(response, 'CorrectTemplate') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/ | |
raise RuntimeError, "Unable to upload file #{corrected_template_file_path}" unless @storage.upload_file(corrected_template_file_path) | |
corrected_template_file_name = File.basename(corrected_template_file_path) | |
response = @omr_api.post_run_omr_task(corrected_template_file_name, 'FinalizeTemplate', | |
{:param => AsposeOmrCloud::OMRFunctionParam.new({:FunctionParam => template_id}) } | |
) | |
check_omr_response(response, 'FinalizeTemplate') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/ | |
raise RuntimeError, "Unable to upload file #{template_file_path}" unless @storage.upload_file(template_file_path) | |
template_name = File.basename(template_file_path) | |
response = @omr_api.post_run_omr_task(template_name, 'GenerateTemplate', | |
{:param => AsposeOmrCloud::OMRFunctionParam.new({:FunctionParam => JSON({:ExtraStoragePath => @logos_folder_name})}) } | |
) | |
check_omr_response(response, 'GenerateTemplate') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/ | |
raise RuntimeError, "Unable to upload file #{image_path}" unless @storage.upload_file(image_path) | |
image_name = File.basename(image_path) | |
response = @omr_api.post_run_omr_task(image_name, 'RecognizeImage', | |
{:param => AsposeOmrCloud::OMRFunctionParam.new({:FunctionParam => template_id}) } | |
) | |
check_omr_response(response, 'RecognizeImage') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment