Add command to sync specific portal

This commit is contained in:
Tulir Asokan
2019-08-10 14:24:26 +03:00
parent 117bb5bd86
commit 60e35c1bb9
3 changed files with 34 additions and 8 deletions
+3 -1
View File
@@ -192,7 +192,9 @@ class Puppet(CustomPuppetMixin):
def _filter_name(name: str) -> str:
if not name:
return ""
whitespace = ("\t\n\r\v\f \u00a0\u034f\u180e\u2063\u202f\u205f\u2800\u3000\u3164\ufeff\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u200c\u200d\u200e\u200f")
whitespace = ("\t\n\r\v\f \u00a0\u034f\u180e\u2063\u202f\u205f\u2800\u3000\u3164\ufeff"
"\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b"
"\u200c\u200d\u200e\u200f")
name = "".join(c for c in name.strip(whitespace) if unicodedata.category(c) != 'Cf')
return name