实例介绍
这是一个利用.NET Core全局工具开发的命令行任务管理工具,允许用户在任何地方通过命令行快速管理个人任务。
安装指南
首先,您需要通过以下命令安装该工具:
$ dotnet tool install -g todo接下来,进行简单的设置以启用功能。
设置
该工具需要一个个人访问令牌。您需要创建一个令牌,并确保包含Gist权限。然后,将您的令牌替换到以下命令中:
$ todo gt YOUR_GIST_TOKEN这样就完成了基本的设置。
任务管理命令
- todo "Boil water in a large pot":添加新任务。
- todo ls:列出所有任务。
- todo ren 128 "Salt the water":将ID为128的任务重命名为“Salt the water”。
- todo do 6d:将ID为6d的任务标记为完成。
- todo undo f1381d68:将ID为f1381d68的任务标记为未完成。
- todo rm f02a57b8:移除ID为f02a57b8的任务。
开发环境
该工具支持在MacOS Mojave、Visual Studio Code、.NET Core SDK 2.2及Docker(可选)、SQL Server(可选)环境下开发。
【实例截图】
文件清单
└── todo-eadd3671ef1686f96c27b1c3768d312039640552
├── appveyor.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── scripts
│ ├── sql-connect.sh
│ └── sql-docker-up.sh
├── source
│ ├── docker-compose.yml
│ ├── Dockerfile
│ ├── TodoList.ConsoleApp
│ │ ├── appsettings.json
│ │ ├── Commands
│ │ │ ├── CommandArgsParser.cs
│ │ │ ├── CommandParser.cs
│ │ │ ├── DoCommand.cs
│ │ │ ├── GistIdCommand.cs
│ │ │ ├── GistTokenCommand.cs
│ │ │ ├── HelpCommand.cs
│ │ │ ├── ICommand.cs
│ │ │ ├── InteractiveCommand.cs
│ │ │ ├── ListCommand.cs
│ │ │ ├── RemoveCommand.cs
│ │ │ ├── RenameCommand.cs
│ │ │ ├── TodoCommand.cs
│ │ │ └── UndoCommand.cs
│ │ ├── Controllers
│ │ │ ├── ListPresenter.cs
│ │ │ ├── TodoItemsController.cs
│ │ │ └── TodoPresenter.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ └── TodoList.ConsoleApp.csproj
│ ├── TodoList.Core
│ │ ├── Boundaries
│ │ │ ├── Do
│ │ │ │ └── IUseCase.cs
│ │ │ ├── IRequest.cs
│ │ │ ├── IResponseHandler.cs
│ │ │ ├── IUseCase.cs
│ │ │ ├── List
│ │ │ │ ├── Item.cs
│ │ │ │ ├── IUseCase.cs
│ │ │ │ ├── ResponseBuilder.cs
│ │ │ │ └── Response.cs
│ │ │ ├── Remove
│ │ │ │ └── IUseCase.cs
│ │ │ ├── Rename
│ │ │ │ └── Request.cs
│ │ │ ├── Todo
│ │ │ │ ├── Request.cs
│ │ │ │ └── Response.cs
│ │ │ └── Undo
│ │ │ └── IUseCase.cs
│ │ ├── Entities
│ │ │ ├── DefaultEntitiesFactory.cs
│ │ │ ├── IEntitiesFactory.cs
│ │ │ ├── IItem.cs
│ │ │ └── Item.cs
│ │ ├── Exceptions
│ │ │ ├── BusinessException.cs
│ │ │ └── InfrastructureException.cs
│ │ ├── Gateways
│ │ │ └── IItemGateway.cs
│ │ ├── TodoList.Core.csproj
│ │ └── UseCases
│ │ ├── Do.cs
│ │ ├── List.cs
│ │ ├── Remove.cs
│ │ ├── Rename.cs
│ │ ├── Todo.cs
│ │ └── Undo.cs
│ ├── TodoList.Infrastructure
│ │ ├── EntityFrameworkGateway
│ │ │ ├── ContextFactory.cs
│ │ │ ├── Migrations
│ │ │ │ ├── 20190405222040_InitialCreate.cs
│ │ │ │ ├── 20190405222040_InitialCreate.Designer.cs
│ │ │ │ └── SqlContextModelSnapshot.cs
│ │ │ ├── SqlContext.cs
│ │ │ └── SqlItemGateway.cs
│ │ ├── FileSystemGateway
│ │ │ ├── FileSystemItemGateway.cs
│ │ │ └── JsonItem.cs
│ │ ├── GistGateway
│ │ │ ├── GistItemGateway.cs
│ │ │ └── JsonItem.cs
│ │ ├── InMemoryGateway
│ │ │ ├── InMemoryContext.cs
│ │ │ ├── InMemoryItemGateway.cs
│ │ │ └── ResponseHandler.cs
│ │ └── TodoList.Infrastructure.csproj
│ └── TodoList.WebApi
│ ├── appsettings.json
│ ├── appsettings.Production.json
│ ├── Controllers
│ │ ├── ListPresenter.cs
│ │ ├── TodoItemsController.cs
│ │ └── TodoPresenter.cs
│ ├── Models
│ │ └── TodoItemViewModel.cs
│ ├── Program.cs
│ ├── Startup.cs
│ ├── StartupProduction.cs
│ └── TodoList.WebApi.csproj
├── tests
│ ├── TodoList.AcceptanceTests
│ │ ├── RunningTests.cs
│ │ └── TodoList.AcceptanceTests.csproj
│ ├── TodoList.IntegrationTests
│ │ ├── appsettings.json
│ │ ├── FileSystemTests.cs
│ │ ├── GistTests.cs
│ │ ├── SqlTests.cs
│ │ └── TodoList.IntegrationTests.csproj
│ └── TodoList.UnitTests
│ ├── ConsoleUITests
│ │ ├── ConsoleWriter.cs
│ │ ├── ControllerFixture.cs
│ │ ├── ControllerTests.cs
│ │ ├── ListPresenterTests.cs
│ │ ├── ParsingTests.cs
│ │ └── TodoPresenterTests.cs
│ ├── lcov.info
│ ├── TodoList.UnitTests.csproj
│ ├── UseCaseTests
│ │ ├── DoUseCaseTests.cs
│ │ ├── ListUseCaseTests.cs
│ │ ├── RemoveUseCaseTests.cs
│ │ ├── RenameUseCaseTests.cs
│ │ ├── TodoUseCaseTests.cs
│ │ └── UndoUseCaseTests.cs
│ └── WebUITests
│ ├── ControllerFixture.cs
│ ├── ListPresenterTests.cs
│ └── TodoPresenterTests.cs
├── TodoList.sln
└── todo-v1.gif
34 directories, 107 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论