# Path: panflute/elements.py
# class Str(Inline):
#     """
#     Text (a string)
# 
#     :param text: a string of unformatted text
#     :type text: :class:`str`
#     :Base: :class:`Inline`
#      """
# 
#     __slots__ = ['text']
# 
#     def __init__(self, text):
#         self.text = check_type(text, str)
# 
#     def __repr__(self):
#         return 'Str({})'.format(self.text)
# 
#     def _slots_to_json(self):
#         return self.text
# 
# Path: panflute/io.py
# def run_filter(action, *args, **kwargs):
#     """
#     Wrapper for :func:`.run_filters`
# 
#     Receive a Pandoc document from stdin, apply the *action* function to each element, and write it back to stdout.
# 
#     See :func:`.run_filters`
#     """
#     return run_filters([action], *args, **kwargs)


from panflute import run_filter, Str
#!/usr/bin/env python

"""
Pandoc filter to convert all regular text to uppercase.
Code, link URLs, etc. are not affected.
"""



def caps(elem, doc):
    if type(elem) == Str:
        elem.text = elem.text.upper()
        return elem


def main(doc=None):

# Path: panflute/elements.py
# class Str(Inline):
#     """
#     Text (a string)
# 
#     :param text: a string of unformatted text
#     :type text: :class:`str`
#     :Base: :class:`Inline`
#      """
# 
#     __slots__ = ['text']
# 
#     def __init__(self, text):
#         self.text = check_type(text, str)
# 
#     def __repr__(self):
#         return 'Str({})'.format(self.text)
# 
#     def _slots_to_json(self):
#         return self.text
# 
# Path: panflute/io.py
# def run_filter(action, *args, **kwargs):
#     """
#     Wrapper for :func:`.run_filters`
# 
#     Receive a Pandoc document from stdin, apply the *action* function to each element, and write it back to stdout.
# 
#     See :func:`.run_filters`
#     """
#     return run_filters([action], *args, **kwargs)


# Path: examples/panflute/caps.py
from panflute import run_filter, Str

#!/usr/bin/env python

"""
Pandoc filter to convert all regular text to uppercase.
Code, link URLs, etc. are not affected.
"""



def caps(elem, doc):
    if type(elem) == Str:
        elem.text = elem.text.upper()
        return elem


def main(doc=None):

    return run_filter(caps, doc=doc)