Ejemplo n.º 1
0
def get_api_fpath():
    """Allows user to manually import filepath that and contains their API token.

    Args:
        None
    Returns:
        api_fpath(str): location of the file containing user's API key.
        Bool (False): If user does not want to manually enter the filepath."""

    ans = InputManager.get_yes_or_no(
        "Would you like to manually enter the filepath where your API token is located?: (Y/n): "
    )

    if ans:
        fpath = InputManager.get_valid_fpath("Please enter a valid filepath: ")
        return fpath

    return False
Ejemplo n.º 2
0
    def __init__(self, qual_export=None, clean_it=True, marking=True,
                 mark_str=" ", ignore_warnings=False, template=None):

        self.template = template

        if self.template:
            self.load_template_params(template)
        else:
            self.mark_str = mark_str
            self.ignore_warnings = ignore_warnings
            self.data_files_not_found = []

            if not qual_export:
                qual_export = InputManager.get_valid_fpath("Please enter a filepath "
                                                         "for the Qualtrics export "
                                                         "you wish to parse: ")
            self.load_in_file(qual_export)
            if clean_it:
                self.clean_qualtrics_export()
                self.set_headers()
                if marking:
                    self.checks_out = self.find_marks(mark_str)
                self.select_parsing_process()
                self.make_headings_col()