Install
openclaw skills install @wu-uk/edit-pdf-text-parseropenclaw skills install @wu-uk/edit-pdf-text-parserParse structured text files to extract data for filling PDFs.
def parse_input(text):
"""Parse key-value pairs from text."""
data = {}
for line in text.strip().split('\n'):
if ':' in line:
# Remove leading dash/bullet if present
line = line.lstrip('- ').strip()
key, value = line.split(':', 1)
data[key.strip()] = value.strip()
return data
# Usage
with open("input.txt") as f:
content = f.read()
data = parse_input(content)
# data["Name"] -> "John Smith"
# data["Email"] -> "john@example.com"
- Name: John Smith
- Email: john@example.com
- Phone: 555-1234
Or without dashes:
Name: John Smith
Email: john@example.com