Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrochlore committed Jul 4, 2021
1 parent 623d074 commit d98722c
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 13 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ This is an [Obsidian](https://obsidian.md/) plugin that helps you do tracking in
[Here](https://github.com/pyrochlore/obsidian-tracker/blob/master/docs/Examples.md) is a simplified table of examples showing what you can track.

## What's New
Version 1.7.0
- Add a new output type 'month', rendering a month view for a given dataset ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestCalendar.md))
Version 1.8.0
- Add a new `searchType` `task`, retrieving data from tasks ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTask.md))
- Enhancement
- Month view ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestCalendar.md))
- Add parameter `circleColorByValue` to show color based on the value
- Support multiple targets (dataset), change the dataset by clicking the header
- Add a button to show current month
- Accept ISO-8601 date as `dateFormat` ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#iso-8601-date-format))
- Relative date input for `startDate` and `endDate` ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#relative-date-input-for-startdate-and-enddate))
- Fixed missing dvField values at the last line of files

## Usage
1. Have some targets you want to track in daily notes.
Expand Down
2 changes: 1 addition & 1 deletion docs/Concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This plugin was designed to read code blocks in [YAML format](https://en.wikiped

### Collecting Data

Providing parameters `searchType` and `searchTarget` is the minimum requirement for a successful data collection. `searchType` can be `tag`, `frontmatter`, `wiki`, `dvField`, `table`, `fileMeta`,or `text`. Then the cooresponding `searchTarget` should be provided according to the specified type.
Providing parameters `searchType` and `searchTarget` is the minimum requirement for a successful data collection. `searchType` can be `tag`, `frontmatter`, `wiki`, `dvField`, `table`, `fileMeta`, `task`, or `text`. Then the cooresponding `searchTarget` should be provided according to the specified type.

### Target Evaluation

Expand Down
4 changes: 4 additions & 0 deletions docs/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ The following table lists use cases with information of target location (Locatio
| table content | { a table filled with dates and values }<br>[example table](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/data/Tables.md) | searchType: table<br>searchTarget: filePath[0][0], filePath[0][1] | V |
| talbe content | { a table filled with dates and values }<br>[example table](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/data/Tables.md) | searchType: table<br>searchTarget: filePath[1][0], filePath[1][1][0], filePath[1][1][1] | V |
| file meta | meta data from files <br>(size, cDate, mDate, numWords, numChars, numSentences) | searchType: fileMeta<br>searchTarget: size | V |
| content | - [x] Say love<br>- [ ] Say love | searchType:task<br>searchTarget: Say love | O |
| content | - [x] Say love | searchType:task.done<br>searchTarget: Say love | O |
| content | - [ ] Say love | searchType: task.notdone<br>searchTarget: Say love | O |

## Full examples

Expand All @@ -52,6 +55,7 @@ List of all examples
- [Multiple Targets / Multiple Values](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestMultipleTargetsMultipleValues.md)
- [Scaling and Positioning](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestScalingAndPositioning.md)
- [Table](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTable.md)
- [Task](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTask.md)
- [Template Variables](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTemplateVariables.md)
- [Time Values](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTimeValues.md)
- [Word Counting](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestWordCounting.md)
Expand Down
20 changes: 12 additions & 8 deletions docs/InputParameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Input Parameters
Obsidian-tracker parses key-value pairs in your code block in YAML format and uses them as input parameters. The minimum requirements for parameters are `searchType`, `searchTarget` and one output parameter (`line`, `bar`, `frontmatter`, `fileMeta`, `wiki`, `table`, or `text`).
Obsidian-tracker parses key-value pairs in your code block in YAML format and uses them as input parameters. The minimum requirements for parameters are `searchType`, `searchTarget` and one output parameter (`line`, `bar`, `frontmatter`, `fileMeta`, `wiki`, `table`, `task`, or `text`).

## Array Input

Expand All @@ -17,14 +17,14 @@ These key-value pairs are placed under the code block root.

| Key | Description | Number of Values | Default |
|:--------|:-------|:-----------:|:------|
| `searchType` | The type of `searchTarget` (tag\|frontmatter\|wiki\|text\|dvField\|table\|filemeta) | 1~NT | Must be provided |
| `searchType` | The type of `searchTarget` (tag\|frontmatter\|wiki\|text\|dvField\|table\|filemeta\|task) | 1~NT | Must be provided |
| `searchTarget` | The target to search<br>[[detail](https://github.com/pyrochlore/obsidian-tracker/blob/master/docs/TargetEvaluation.md)] | NT (Number of Targets) | Must be provided |
| `folder` | The root path of notes to search | 1 | Root of this vault |
| `dateFormat` | The date format you are using | 1 | 'YYYY-MM-DD' |
| `dateFormat` | The date format you are using<br> or use [iso-8601](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#iso-8601-date-format) | 1 | 'YYYY-MM-DD' |
| `dateFormatPrefix` | The prefix before your dateFormat | 1 | '' |
| `dateFormatSuffix` | The suffix after your dateFormat | 1 | '' |
| `startDate` | The start date to collect data | 1 | Min date found |
| `endDate` | The end date of to collect data | 1 | Max date found |
| `startDate` | The start date to collect data<br>accept [relative date](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#relative-date-input-for-startdate-and-enddate) | 1 | Min date found |
| `endDate` | The end date of to collect data<br>accept [relative date](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#relative-date-input-for-startdate-and-enddate) | 1 | Max date found |
| `datasetName` | The name of the dataset for a search target` | 1~NT | untitled |
| `separator` | The character to separate multiple values appearing in the search target | 1~NT | '/' |
| `xDataset` | The `searchTarget` of this index will be used as xDataset | 1~NT | -1 (use filename as xDataset) |
Expand Down Expand Up @@ -120,9 +120,11 @@ These key-value pairs should be placed under the key `month`.

| Key | Description | Number of Values | Default |
|:--------|:-------|:-----------:|:------|
| `dataset` | The index of the dataset of your interest | 1 | 0 |
| `dataset` | The index of the dataset of your interest | 1~NT | all indices of non-x searchTarget |
| `startWeekOn` | First day of a week ('Sun'\|'Mon') | 1 | 'Sun' |
| `threshold` | The threshold to determine showing a circle on a day or not | 1 | 0 |
| `threshold` | The threshold to determine showing a circle on a day or not | 1~NT | 0 |
| `yMin` | Minimum value | 1~NT | Minimum value of the dataset |
| `yMax` | Maximum value | 1~NT | Maximum value of the dataset |
| `showCircle` | Circle the day label if the collected value reach the threshold (value > threshold) | 1 | true |
| `color` | Main color (can be override by other color parameters) | 1 | null |
| `dimNotInMonth` | Dim the color for days not in current month | 1 | true |
Expand All @@ -131,8 +133,10 @@ These key-value pairs should be placed under the key `month`.
| `showSelectedValue` | Show the value on the selected day | 1 | true |
| `showSelectedRing` | Show a ring on the label of the selected day | 1 | true |
| `circleColor` | The color of circles | 1 | '#69b3a2' |
| `circleColorByValue` | Display colors based on the value | 1 | 1 |
| `headerYearColor` | The color of year text in header | 1 | 'white' |
| `headerMonthColor` | The color of the month text in header | 1 | 'white' |
| `dividingLineColor` | The color of the dividing line | 1 | '#69b3a2' |
| `todayRingColor` | The color of the ring on today | 1 | 'white' |
| `selectedRingColor` | The color of the ring on the selected day | 1 | 'firebrick' |
| `selectedRingColor` | The color of the ring on the selected day | 1 | 'firebrick' |
| `initMonth` | Initial month to show (0~11) | 1 | last month found |
11 changes: 11 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release Notes

## v1.8.0
- Add a new `searchType` `task`, retrieving data from tasks ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestTask.md))
- Enhancement
- Month view ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestCalendar.md))
- Add parameter `circleColorByValue` to show color based on the value
- Support multiple targets (dataset), change the dataset by clicking the header
- Add a button (◦) to show current month
- Accept ISO-8601 date as `dateFormat` ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#iso-8601-date-format))
- Relative date input for `startDate` and `endDate` ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestDateFormats.md#relative-date-input-for-startdate-and-enddate))
- Fixed missing dvField values at the last line of files

## v1.7.0
- Add a new output type 'month', rendering a month view for a given dataset ([examples](https://github.com/pyrochlore/obsidian-tracker/blob/master/examples/TestCalendar.md))

Expand Down
1 change: 1 addition & 0 deletions docs/RoadMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [x] Get data from a table
- [x] Collect data from dataview plugin's inline fields
- [x] Collect meta information from file
- [x] Support tracking tasks
- [ ] Allow manual data input (x and y values)
- [ ] Allow forced value types
- [ ] Allow using non-date x values
Expand Down
12 changes: 10 additions & 2 deletions docs/TargetEvaluation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Target Evaluation

From the [input parameters](https://github.com/pyrochlore/obsidian-tracker/blob/master/docs/InputParameters.md) you provided, the search targets dispersed in the notes will be counted or evaluated as a value. Tracker plugin supports seven kinds of `searchType`: `tag`, `frontmatter`, `wiki`, `text`, `table`, `dvField`, and `fileMeta`, dealing with different types of searching condition.
From the [input parameters](https://github.com/pyrochlore/obsidian-tracker/blob/master/docs/InputParameters.md) you provided, the search targets dispersed in the notes will be counted or evaluated as a value. Tracker plugin supports eight kinds of `searchType`: `tag`, `frontmatter`, `wiki`, `text`, `table`, `dvField`, `task`, and `fileMeta`, dealing with different types of searching condition.

## Multiple Targets
You can provide multiple search targets in code block by entering an array of targets separated by a comma under parameter `searchType` and `searchTarget`. Each of the targets will be identified in order and then the values in notes will be evaluated and form a dataset indexed by that order in the array (zero-based indexing).
Expand Down Expand Up @@ -116,4 +116,12 @@ With this search type, you can retrieve infomation of files. Currently, three ki
- numChars: number of characters in a file (including spaces)
- numSentences: number of setences in a file

`cData` and `mDate` can be used as X dataset and `size` can be used as Y dataset.
`cData` and `mDate` can be used as X dataset and `size` can be used as Y dataset.

### searchType: task

You can retrieve infomation from tasks by using `searchType` `tasks`.
The provided `searchTarget` will limit the result with task's contents match the input.

Using type `task` or `task.all` will get you all tasks no matter it is done or not.
To get task done, use `task.done`. By contrast, use `task.notdone`.

0 comments on commit d98722c

Please sign in to comment.