Enhancement - file import
- Added support for configuration variables that override field mapping. - Updated documentation.
This commit is contained in:
@@ -337,6 +337,28 @@ ID Project Pri Description
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>import.synonym.id</dt>
|
||||
<dt>import.synonym.uuid</dt>
|
||||
<dt>import.synonym.status</dt>
|
||||
<dt>import.synonym.tags</dt>
|
||||
<dt>import.synonym.entry</dt>
|
||||
<dt>import.synonym.start</dt>
|
||||
<dt>import.synonym.due</dt>
|
||||
<dt>import.synonym.recur</dt>
|
||||
<dt>import.synonym.end</dt>
|
||||
<dt>import.synonym.project</dt>
|
||||
<dt>import.synonym.priority</dt>
|
||||
<dt>import.synonym.fg</dt>
|
||||
<dt>import.synonym.bg</dt>
|
||||
<dt>import.synonym.description</dt>
|
||||
<dd>
|
||||
If any of these configuration variables are found, they influence
|
||||
data import by specifying a single additional field name synonym.
|
||||
If a data import is failing because certain column names are not
|
||||
being recognized, then this is how the field mapping can be
|
||||
controlled.
|
||||
</dd>
|
||||
|
||||
<p>
|
||||
Note that the command:
|
||||
</p>
|
||||
@@ -347,6 +369,8 @@ ID Project Pri Description
|
||||
will display the configuration variables found in the .taskrc file,
|
||||
and will warn you of any variables that are not recognized.
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -50,13 +50,56 @@
|
||||
<li>Plain text files, with one task listed per line.
|
||||
<li>Task command line format.
|
||||
</ul>
|
||||
|
||||
Task makes a good effort to determine which of these formats a
|
||||
file is, and then imports accordingly.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It would be wise to backup your task data files before an import.
|
||||
Task makes a good effort to determine which of these formats a
|
||||
file is. It does this by reading the file, and looking for
|
||||
familiar patterns. For example, the easiest files to recognize
|
||||
are those exported from task itself, because they all have a
|
||||
header line that comes in only three variations. Other formats
|
||||
are a little harder to identify, but they all have their own
|
||||
identifying characteristics.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The most complex import is when a CSV file is recognized.
|
||||
Task needs a field header line in order to map columns to task
|
||||
data items. For example, the if the following file is
|
||||
imported:
|
||||
</p>
|
||||
|
||||
<pre><code>number,status,task
|
||||
1,pending,task one
|
||||
2,pending,task two</code></pre>
|
||||
|
||||
<p>
|
||||
Task will map the "number" field to task's "id" field, etc,
|
||||
based on name. Task has a list of synonyms that it uses to
|
||||
map fields, but you can specify your own override with any of
|
||||
the following configuration variables:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>import.synonym.id
|
||||
<li>import.synonym.uuid
|
||||
<li>import.synonym.status
|
||||
<li>import.synonym.tags
|
||||
<li>import.synonym.entry
|
||||
<li>import.synonym.start
|
||||
<li>import.synonym.due
|
||||
<li>import.synonym.recur
|
||||
<li>import.synonym.end
|
||||
<li>import.synonym.project
|
||||
<li>import.synonym.priority
|
||||
<li>import.synonym.fg
|
||||
<li>import.synonym.bg
|
||||
<li>import.synonym.description
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Please note that it is wise to backup your task data files
|
||||
before an import.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user