Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance get Functionality for Language and All Data-Type Retrieval Scribe-Data CLI #491

Closed

Conversation

KesharwaniArpita
Copy link
Contributor

Contributor checklist


Description

This PR introduces a refined get_data function in the Scribe-Data CLI, enabling more versatile data retrieval options. The updated function includes the ability to:

  • Retrieve all data types for a specified language.
  • Specify an output type with a default JSON format and an appropriate export directory based on the output type.
  • Improve error handling and feedback for different retrieval combinations.

Changes Made

  • New Functionality: Added support for retrieving all data types for a specified language by combining --all with the language parameter.
  • Default Output Directory: Dynamically sets the default output directory based on the chosen output_type.
  • Error Handling: Enhanced error messaging for cases where neither --language nor --data_type is provided and --all is not specified.
  • Emoji Retrieval: Adjusted logic to support fetching emoji keywords separately.
  • Output Processing: Integrated logic to save and optionally convert the retrieved data based on output_type.

Implementation Details

The revised function workflow is as follows:

  • Retrieve All Data Types for a Specific Language:
    • If both --all and --language are provided, the function retrieves all data types for the specified language.

Example Usage

  • Retrieve all languages and data types:
    scribe-data get --all
  • Retrieve all data types for a specific language:
    scribe-data get --all -lang <language>

This improvement allows users to retrieve data with greater flexibility, contributing to a more efficient and customizable user experience.

Related issue

Copy link

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The linting and formatting workflow within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Member

Covered by the improvements in #493 :) Thanks for the initial work here, @KesharwaniArpita!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants