@classmethod<EOL><INDENT>def from_input(cls, input_file=sys.stdin, modify=None, backend=None):<DEDENT>
<EOL>name = os.path.basename(sys.argv[<NUM_LIT:0>])<EOL>modify = name.startswith('<STR_LIT>') if modify is None else modify<EOL>if backend is None:<EOL><INDENT>backends = importlib.import_module('<STR_LIT>')<EOL>hook_parent_dir = os.path.dirname(os.path.dirname(sys.argv[<NUM_LIT:0>]))<EOL>backend = backends.TaskWarrior(data_location=hook_parent_dir)<EOL><DEDENT>task = cls(backend)<EOL>task._load_data(json.loads(input_file.readline().strip()))<EOL>if modify:<EOL><INDENT>task._update_data(json.loads(input_file.readline().strip()),<EOL>remove_missing=True)<EOL><DEDENT>return task<EOL>
Creates a Task object, directly from the stdin, by reading one line.
If modify=True, two lines are used, first line interpreted as the
original state of the Task object, and second line as its new,
modified value. This is consistent with the TaskWarrior's hook
system.

Object created by this method should not be saved, deleted
or refreshed, as t could create a infinite loop. For this
reason, TaskWarrior instance is set to None.

Input_file argument can be used to specify the input file,
but defaults to sys.stdin.