PK!y'2GGblockbuster/core/__init__.py# pylint: disable=C0111 __version__ = "0.1.4" DATE_FORMAT = "%Y-%m-%d" PK!u~^^blockbuster/core/factory.py"""Functions to create a Task instance from text in todo.txt format""" import re from datetime import datetime from blockbuster.core.model import Task def _done(todotxt): """ Returns ------- tuple boolean indicating whether the task is complete the todo.txt string stripped of any completed portion """ done = todotxt.startswith("x") if done: todotxt = todotxt[1:].strip() return done, todotxt def _priority(todotxt): """ Returns ------- tuple Any priority character The todo.txt string stripped of any priority character """ regex = re.compile(r"\s*\((\S)\)") match = regex.search(todotxt) priority = None if match: priority = match.group(0).strip().lstrip("(").rstrip(")") todotxt = regex.sub("", todotxt).strip() return priority, todotxt def _dates(todotxt): regex = re.compile(r"(?SƸz]o(T^}:Gc#]ć(DQHqgB zPN;R OKU7TEV~PH97?#ߊwBI 盟Fb#^M!|gq@\U$NoEt+U/VXrwuS>te⋘kC⽍CųG|nuFh?ʥ6FΝdlI* 2P0hqHP)UaXJi] ɛ|SS*| ișWT2ѸIb-;Hr]gSa<= :|Hqg3S; Qx1*n <BL'W◟=m3@x?7#BiJZ΢jO$\V-3tiG}JI$NaVUܒ^v(ae0(- KĈΙ9SJUn7(L )CB FG*UV~4J5\A72s 2CMN6)r s2#Pw!$jZ`g!'3FT>pK*@cT I V* `+F~~ tM6q*Op+oZu{)~3 Od/%O5H@5_'NU=*cUK^CSLvlnU6z7NӵG҇vtnvz:n掠GD&ϔg1%y2h[.Nlxo,^-m jz% ^[O(!0ZZ?|C{