diff --git a/abcddb2vcard/ABCDDB.py b/abcddb2vcard/ABCDDB.py index 5fa7fba..fd4d655 100755 --- a/abcddb2vcard/ABCDDB.py +++ b/abcddb2vcard/ABCDDB.py @@ -3,7 +3,7 @@ import re import sys import sqlite3 from base64 import b64encode -from urllib.parse import quote +# from urllib.parse import quote from typing import List, Dict, Any, Iterable, Optional ITEM_COUNTER = 0 @@ -11,6 +11,7 @@ rx_query = re.compile(r'SELECT([\s\S]*)FROM[\s]+([A-Z_]+)') rx_cols = re.compile(r'[\s,;](Z[A-Z_]+)') rx_tags = re.compile(r'\%\{[A-Za-z_]+?\}') + # =============================== # Helper methods # =============================== @@ -61,6 +62,7 @@ def sanitize(cursor: sqlite3.Cursor, query: str) -> str: query = query.replace(missing, 'NULL') return query + # =============================== # VCARD Attributes # =============================== @@ -279,7 +281,7 @@ class Service(Queryable): # Dear Apple, why do you do such weird shit, URL encoding? bah! # Even worse, you break it so that reimport fails. - # user = quote(self.username, safe='!/()=_:.\'$&').replace('%2C', '\\,') + # user= quote(self.username, safe='!/()=_:.\'$&').replace('%2C', '\\,') user = self.username return buildLabel('IMPP;X-SERVICE-TYPE=' + self.service, self.label, markPref, typ + ':' + user) diff --git a/abcddb2vcard/abcddb2vcard.py b/abcddb2vcard/abcddb2vcard.py index bbfa47e..8a4b201 100755 --- a/abcddb2vcard/abcddb2vcard.py +++ b/abcddb2vcard/abcddb2vcard.py @@ -59,7 +59,7 @@ def main() -> None: export_count += 1 except Exception as e: print(f'Error processing contact {rec.id} {rec.fullname}: {e}', - file=sys.stderr) + file=sys.stderr) # choose which export mode to use if args.split: # multi-file mode