File Format

The File format descried here is used by Version 1.x of yaTDL. Beginning with yaTDL 2.0, it will be replaced by a XML-based format.

Introduction

To store the application's data (projects and tasks) yaTDL uses the file TaskStore.txt located in %APPDATA%\yaTDL\. This has been implemented in the TextualFileaccess class. The format that is used to realize this will be explained in the following.

Basic Idea

Every line of the file containing information consists of 2 parts. The first part stats what information the line contains (e.g. AppVersion) and the second part is the actual information. They are divied by a vertical bar ('|').

As additional properties for Projects and Tasks have been added with newer versions, you may not find all of the data described here in files created by earlier versions of yaTDL.

File Info

The first two lines of the text file contain information about the file.
The first line should be "DateOfLastEdit" which indicates when the while has been written.
The second line is "AppVersion" and indicates which version of yaTDL created the file.
This block should be followed by an empty line.

Example:
DateOfLastEdit|12.08.2009 22:32:46
AppVersion|1.0.0.39
 

Project

The beginning of a new project is indicated by a line containing Project| followed by the project's name. This will be followed by the Projects properties:
  • pID|: The Projects Identifier
  • pLastEdited|: The Date the Project's properties have been modified the last time (does not include added/deleted/modified Tasks)
  • pUserId|: The Identifier of the User that owns the Project (currently unused, but could be necessary in the future)
  • pColor|: The Color associated with the Project (currently unused, but could be necessary in the future)
  • pIndent|: How far has the Project been indented in the project-list (currently unused, but could be necessary in the future)
  • pOrder|: The Project's order in the project-list (currently unused, but could be necessary in the future)
  • pCollapsed|: Indicates whether the Project's sub-Projects are collapsed (currently unused, but could be necessary in the future)

This block should also be divided from the following data by an empty line.
You should note that there is nothing to indicate the end of a project. The next project will just begin like this. If you want to know if it is the last project in the file, you simply have to check, if there are project-beginnings after that or not.
All task that follow in the file between the beginning of one project and the beginning of another project are part of the former one.

Example:
Project|Tasks
pID|l_p_-1861374079
pLastEdited|01.01.0001 00:00:00
pUserId|
pColor|
pIndent|0
pOrder|0
pCollapsed|0

Task

Every Task will be divided from the next one by an empty line. A tasks regularly consists of 7 lines:
  • Task| indicates the beginning of a new task. There is no further content in this line (if there is, it should be ignored)
  • Content| is followed by the actual content of the task (e.g. "buy milk")
  • Completed| followed by true or false. Indicated whether the task has been completed yet
  • DueDate| followed by the DateTime when the task should be completed
  • Priority| followed by the priority of the task
  • ID| followed by the identifier of the task
  • LastEdited| followed by the DateTime the task has been edited the last time.
  • Indent|: How far has the Task been indented in the task-list (currently unused, but could be necessary in the future)
  • Collapsed|: Indicates whether the Task's sub-Tasks are collapsed (currently unused, but could be necessary in the future)
  • Order|: The Task's order in the task-list (currently unused, but could be necessary in the future)
  • Recurrence|: String that describes advanced recurrence-behavior.
  • Repeat|:  Value for simple recurrence. yaTDL uses the same values as Toodledo. For details see Toodledo API Documentation

Example:
Task|
Content|buy milk
Completed|False
DueDate|14.08.2009 00:00:00
Priority|3
ID|l_t_21015824
LastEdited|12.08.2009 23:23:39
Indent|0
Collapsed|0
Order|0
Recurrence|every monday
Repeat|0

Sample File

A complete file might look like this:
DateOfLastEdit|12.08.2009 23:34:41
AppVersion|1.0.0.39

Project|Tasks
pID|l_p_-1861374079
pLastEdited|01.01.0001 00:00:00
pUserId|
pColor|
pIndent|0
pOrder|0
pCollapsed|0

Task|
Content|buy milk
Completed|False
DueDate|14.08.2009 00:00:00
Priority|3
ID|l_t_21015824
LastEdited|12.08.2009 23:23:39
Indent|0
Collapsed|0
Order|0
Recurrence|every monday

Project|another project
pID|l_p_1430989036

Task|
Content|Learn for school
Completed|False
DueDate|13.08.2009 00:00:00
Priority|4
ID|l_t_1794083084
LastEdited|12.08.2009 23:34:27
Indent|0
Collapsed|0
Order|0
Recurrence|

Task|
Content|write some code
Completed|True
DueDate|11.08.2009 00:00:00
Priority|2
ID|l_t_1711648645
LastEdited|12.08.2009 23:34:38
Indent|0
Collapsed|0
Order|0
Recurrence|
Download Sample File

Last edited Aug 31, 2010 at 11:12 AM by apoll0, version 10

Comments

No comments yet.