Skip to content

Commit 425a3ea

Browse files
authored
Merge pull request #78 from rprouse/issue/52
Update Readme and include in NuGet package
2 parents da44fb9 + dc9a5ce commit 425a3ea

File tree

6 files changed

+289
-270
lines changed

6 files changed

+289
-270
lines changed

.github/workflows/dotnet-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: dotnet test --no-restore --verbosity normal
2626

2727
- name: 📦 Package NuGet
28-
run: dotnet pack --no-build --configuration Release
28+
run: dotnet pack --no-build --configuration Release src/todo/todo.csproj
2929

3030
- name: 📤 Upload Artifacts
3131
uses: actions/upload-artifact@v3

Build.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Build Instructions
2+
3+
## Testing Locally
4+
5+
Build it, then package it using the **Pack** command in Visual Studio or `dotnet pack`
6+
on the command line. Until this package is published, install it using the following
7+
command line from the solution root;
8+
9+
```sh
10+
dotnet tool install -g --add-source .\src\todo\nupkg\ dotnet-todo
11+
```
12+
13+
To update from a previous version,
14+
15+
```sh
16+
dotnet tool update -g --add-source .\src\todo\nupkg\ dotnet-todo
17+
```
18+
19+
## Installing from GitHub Packages
20+
21+
Whenever the version is updated in `src/todo/todo.csproj`, a merge to master will publish the NuGet package
22+
to [GitHub Packages](https://github.com/rprouse?tab=packages). You can install or update from there.
23+
24+
First you must update your global NuGet configuration to add the package registry and include the GitHub Personal
25+
Access Token (PAT). This file is in `%appdata%\NuGet\NuGet.Config` on Windows and in `~/.config/NuGet/NuGet.Config`
26+
or `~/.nuget/NuGet/NuGet.Config` on Linux/Mac.
27+
28+
```xml
29+
<?xml version="1.0" encoding="utf-8"?>
30+
<configuration>
31+
<packageSources>
32+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
33+
<add key="Local" value="C:\temp" />
34+
<add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />
35+
<add key="github" value="https://nuget.pkg.github.com/rprouse/index.json" />
36+
</packageSources>
37+
<packageSourceCredentials>
38+
<github>
39+
<add key="Username" value="rprouse" />
40+
<add key="ClearTextPassword" value="GITHUB_PAT" />
41+
</github>
42+
</packageSourceCredentials>
43+
</configuration>
44+
```
45+
46+
Once that is done, to install,
47+
48+
```sh
49+
dotnet tool install -g dotnet-todo
50+
```
51+
52+
And to update from a previous version,
53+
54+
```sh
55+
dotnet tool update -g dotnet-todo
56+
```

Help.md

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
# Help
2+
3+
## Actions
4+
5+
### `add`
6+
Adds "THING I NEED TO DO" to your todo.txt file on its own line.
7+
8+
Project and context notation optional.
9+
10+
```shell
11+
todo add "THING I NEED TO DO +project @context"
12+
todo a "THING I NEED TO DO +project @context"
13+
```
14+
15+
### `addm`
16+
Adds "FIRST THING I NEED TO DO" to your todo.txt on its own line and
17+
adds "SECOND THING I NEED TO DO" to you todo.txt on its own line.
18+
19+
Project and context notation optional.
20+
21+
```shell
22+
todo addm "FIRST THING I NEED TO DO +project1 @context" "SECOND THING I NEED TO DO +project2 @context"
23+
```
24+
25+
### `addto`
26+
Adds a line of text to any file located in the todo.txt directory.
27+
28+
For example, `addto inbox.txt "decide about vacation"`
29+
30+
```shell
31+
todo addto DEST "TEXT TO ADD"
32+
```
33+
34+
### `append`
35+
Adds TEXT TO APPEND to the end of the task on line ITEM#.
36+
37+
```shell
38+
todo append ITEM# "TEXT TO APPEND"
39+
todo app ITEM# "TEXT TO APPEND"
40+
```
41+
42+
### `archive`
43+
Moves all done tasks from todo.txt to done.txt and removes blank lines.
44+
45+
```shell
46+
todo archive
47+
```
48+
49+
### `deduplicate`
50+
Removes duplicate lines from todo.txt.
51+
52+
```shell
53+
todo deduplicate
54+
```
55+
56+
### `del`
57+
Deletes the task on line ITEM# in todo.txt. If TERM specified, deletes only
58+
TERM from the task.
59+
60+
```shell
61+
todo del ITEM# [TERM]
62+
todo rm ITEM# [TERM]
63+
```
64+
65+
### `depri`
66+
Deprioritizes (removes the priority) from the task(s) on line ITEM# in todo.txt.
67+
68+
```shell
69+
todo depri ITEM#[, ITEM#, ITEM#, ...]
70+
todo dp ITEM#[, ITEM#, ITEM#, ...]
71+
```
72+
73+
### `do`
74+
Marks task(s) on line ITEM# as done in todo.txt.
75+
76+
```shell
77+
todo do ITEM#[, ITEM#, ITEM#, ...]
78+
```
79+
80+
### `help`
81+
Display help about usage, options, built-in and add-on actions, or just the usage
82+
help for the passed ACTION(s).
83+
84+
```shell
85+
todo help [ACTION...]
86+
```
87+
88+
### `list`
89+
Displays all tasks that contain TERM(s) sorted by priority with line numbers. Each
90+
task must match all TERM(s) (logical AND). Hides all tasks that contain TERM(s)
91+
preceded by a minus sign (i.e. `-TERM`).
92+
93+
If no TERM specified, lists entire todo.txt.
94+
95+
```shell
96+
todo list [TERM...]
97+
todo ls [TERM...]
98+
```
99+
100+
### `listall`
101+
Displays all the lines in todo.txt AND done.txt that contain TERM(s) sorted by
102+
priority with line numbers. Hides all tasks that contain TERM(s) preceded by a
103+
minus sign (i.e. `-TERM`).
104+
105+
If no TERM specified, lists entire todo.txt AND done.txt concatenated and sorted.
106+
107+
```shell
108+
todo listall [TERM...]
109+
todo lsa [TERM...]
110+
```
111+
112+
### `listcon`
113+
Lists all the task contexts that start with the @ sign in todo.txt.
114+
115+
If TERM specified, considers only tasks that contain TERM(s).
116+
117+
```shell
118+
todo listcon [TERM...]
119+
todo lsc [TERM...]
120+
```
121+
122+
### `listfile`
123+
Displays all the lines in SRC file located in the todo.txt directory, sorted by
124+
priority with line numbers. If TERM specified, lists all lines that contain TERM(s)
125+
in SRC file. Hides all tasks that contain TERM(s) preceded by a minus sign (i.e. `-TERM`).
126+
127+
Without any arguments, the names of all text files in the todo.txt directory are listed.
128+
129+
```shell
130+
todo listfile [SRC [TERM...]]
131+
todo lf [SRC [TERM...]]
132+
```
133+
134+
### `listpri`
135+
Displays all tasks prioritized PRIORITIES. PRIORITIES can be a single one (A) or a range
136+
(A-C). If no PRIORITIES specified, lists all prioritized tasks. If TERM specified, lists
137+
only prioritized tasks that contain TERM(s). Hides all tasks that contain TERM(s) preceded
138+
by a minus sign (i.e. `-TERM`).
139+
140+
```shell
141+
todo listpri [PRIORITIES] [TERM...]
142+
todo lsp [PRIORITIES] [TERM...]
143+
```
144+
145+
### `listproj`
146+
Lists all the projects (terms that start with a `+` sign) in todo.txt. If TERM specified,
147+
considers only tasks that contain TERM(s).
148+
149+
```shell
150+
todo listproj [TERM...]
151+
todo lsprj [TERM...]
152+
```
153+
154+
### `move`
155+
Moves a line from source text file (SRC) to destination text file (DEST). Both source
156+
and destination file must be located in the directory defined in the configuration
157+
directory. When SRC is not defined it's by default todo.txt.
158+
159+
```shell
160+
todo move ITEM# DEST [SRC]
161+
todo mv ITEM# DEST [SRC]
162+
```
163+
164+
### `prepend`
165+
Adds TEXT TO PREPEND to the beginning of the task on line ITEM#.
166+
167+
```shell
168+
todo prepend ITEM# "TEXT TO PREPEND"
169+
todo prep ITEM# "TEXT TO PREPEND"
170+
```
171+
172+
### `pri`
173+
Adds PRIORITY to task on line ITEM#. If the task is already prioritized, replaces
174+
current priority with new PRIORITY. PRIORITY must be a letter between A and Z.
175+
176+
```shell
177+
todo pri ITEM# PRIORITY
178+
todo p ITEM# PRIORITY
179+
```
180+
181+
### `replace`
182+
Replaces task on line ITEM# with UPDATED TODO.
183+
184+
```shell
185+
todo replace ITEM# "UPDATED TODO"
186+
```
187+
188+
## Options
189+
190+
### `-@`
191+
Hide context names in list output.
192+
193+
### `-+`
194+
Hide project names in list output.
195+
196+
### `-d CONFIG_FILE`
197+
Use a configuration file other than the default `~/.todo/config`
198+
199+
### `-f`
200+
Forces actions without confirmation or interactive input.
201+
202+
### `-p`
203+
Plain mode turns off colors
204+
205+
### `-P`
206+
Hide priority labels in list output.
207+
208+
### `-a`
209+
Don't auto-archive tasks automatically on completion
210+
211+
### `-t`
212+
Prepend the current date to a task automatically when it's added.
213+
214+
### `--version`
215+
Displays version, license and credits

0 commit comments

Comments
 (0)