<commit_before>#!/usr/bin/env python
import pmag,sys
import ipmag
import command_line_extractor as extractor

def main():
    """
    NAME
        upload_magic.py
   
    DESCRIPTION
        This program will prepare your PMAG text files created by the programs nfo_magic.py, 
        zeq_magic.py, thellier_magic.py, mag_magic, specimens_results_magic.py and so on.  
        it will check for all the MagIC text files and skip the missing ones
    
    SYNTAX
        upload_magic.py 

    INPUT
        MagIC txt files

    OPTIONS
        -h prints help message and quits
        -all include all the measurement data, default is only those used in interpretations

    OUTPUT
        upload.txt:  file for uploading to MagIC database
    """    
    if '-h' in sys.argv:
        print main.__doc__
        sys.exit()
    else:
        dataframe = extractor.command_line_dataframe([['all', False, 0], ['cat', False, 0], ['F', False, ''], ['f', False, '']])
        checked_args = extractor.extract_and_check_args(sys.argv, dataframe)
        All, dir_path, concat = extractor.get_vars(['all', 'WD', 'cat'], checked_args)
        ipmag.upload_magic(concat, All, dir_path)
        

if __name__ == '__main__':
    main()<commit_msg>remove unused 'All' variable from upload_magic call<commit_after>#!/usr/bin/env python
import pmag,sys
import ipmag
import command_line_extractor as extractor

def main():
    """
    NAME
        upload_magic.py
   
    DESCRIPTION
        This program will prepare your PMAG text files created by the programs nfo_magic.py, 
        zeq_magic.py, thellier_magic.py, mag_magic, specimens_results_magic.py and so on.  
        it will check for all the MagIC text files and skip the missing ones
    
    SYNTAX
        upload_magic.py 

    INPUT
        MagIC txt files

    OPTIONS
        -h prints help message and quits
        -all include all the measurement data, default is only those used in interpretations

    OUTPUT
        upload.txt:  file for uploading to MagIC database
    """    
    if '-h' in sys.argv:
        print main.__doc__
        sys.exit()
    else:
        dataframe = extractor.command_line_dataframe([['cat', False, 0], ['F', False, ''], ['f', False, '']])
        checked_args = extractor.extract_and_check_args(sys.argv, dataframe)
        dir_path, concat = extractor.get_vars(['WD', 'cat'], checked_args)
        ipmag.upload_magic(concat, dir_path)
        

if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.08987854251012145, 'fraction_numerical': 0.0012145748987854252, 'mean_word_length': 2.5863570391872277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2706710', 'n_tokens_mistral': 789, 'n_tokens_neox': 734, 'n_words': 237}