<commit_before>#!/usr/bin/env python
# -*- coding: latin-1 -*-
import os.path
import argparse
import encodedcc

EPILOG = '''
To get multiple objects use the '--object' argument
and provide a file with the list of object identifiers

        %(prog)s --object filenames.txt

    this can take accessions, uuids, @ids, or aliases

To get a single object use the '--object' argument
and use the object's identifier

        %(prog)s --object ENCSR000AAA
        %(prog)s --object 3e6-some-uuid-here-e45
        %(prog)s --object this-is:an-alias

To get multiple fields use the '--field' argument
and feed it a file with the list of fieldnames

        %(prog)s --field fieldnames.txt

    this should be a single column file

To get a single field use the field argument:

        %(prog)s --field status

    where field is a string containing the field name

To get embedded field values (such as target name from an experiment):

        %(prog)s --field target.title
    this can also get embedded values from lists

        %(prog)s --field files.status

To use a custom query for your object list:

        %(prog)s --query www.my/custom/url

    this can be used with either useage of the '--field' option

Output prints in format of fieldname:object_type for non-strings

    Ex: accession    read_length:int    documents:list
        ENCSR000AAA  31                 [document1,document2]

    integers  ':int'
    lists     ':list'
    string are the default and do not have an identifier
***please note that list type fields will show only unique items***

        %(prog)s --field files.status --object ENCSR000AAA

    accession       file.status:list
    ENCSR000AAA     ['released']<commit_msg>another example added to —help<commit_after>#!/usr/bin/env python
# -*- coding: latin-1 -*-
import os.path
import argparse
import encodedcc

EPILOG = '''
To get multiple objects use the '--object' argument
and provide a file with the list of object identifiers

        %(prog)s --object filenames.txt

    this can take accessions, uuids, @ids, or aliases

To get a single object use the '--object' argument
and use the object's identifier

        %(prog)s --object ENCSR000AAA
        %(prog)s --object 3e6-some-uuid-here-e45
        %(prog)s --object this-is:an-alias

To get multiple fields use the '--field' argument
and feed it a file with the list of fieldnames

        %(prog)s --field fieldnames.txt

    this should be a single column file

To get a single field use the field argument:

        %(prog)s --field status

    where field is a string containing the field name

To get embedded field values (such as target name from an experiment):

        %(prog)s --field target.title

    accession       target.title
    ENCSR087PLZ     H3K9ac (Mus musculus)
    this can also get embedded values from lists

        %(prog)s --field files.status
        *more about this feature is listed below*

To use a custom query for your object list:

        %(prog)s --query www.my/custom/url

    this can be used with either useage of the '--field' option

Output prints in format of fieldname:object_type for non-strings

    Ex: accession    read_length:int    documents:list
        ENCSR000AAA  31                 [document1,document2]

    integers  ':int'
    lists     ':list'
    string are the default and do not have an identifier
***please note that list type fields will show only unique items***

        %(prog)s --field files.status --object ENCSR000AAA

    accession       file.status:list
    ENCSR000AAA     ['released']
{'fraction_non_alphanumeric': 0.0810126582278481, 'fraction_numerical': 0.013220815752461323, 'mean_word_length': 2.6735537190082646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3906868', 'n_tokens_mistral': 1101, 'n_tokens_neox': 979, 'n_words': 436}