1
0
libpurple-to-markdown/libpurple_to_markdown/synctech_sms.py

29 lines
675 B
Python
Raw Normal View History

"""Backend for SyncTech Backup & Restore.
[SyncTech Backup & Restore](https://www.synctech.com.au/sms-backup-restore/)
for Android is a free app for backing up your SMS and MMS messages. It uses an
XML format as backup format, which this backend reads and converts to the
standardized Message format.
"""
import datetime
import logging
from pathlib import Path
import bs4
from .data import Message
logger = logging.getLogger(__name__)
def parse_messages_in_backup_xml_file(path: Path) -> list[Message]:
logger.info('Parsing %s', path)
with open(path) as f:
soup = bs4.BeautifulSoup(f, 'lxml-xml')
# TODO: Implement message parsing
return []