aboutsummaryrefslogtreecommitdiff
path: root/scripts/caps.py
blob: e29d48854864eae80e937791506c85bc0a342921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python

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

from pandoc import toJSONFilter

def caps(key, value, format):
  if key == 'Str':
    return {'Str': value.upper()}

if __name__ == "__main__":
  toJSONFilter(caps)