Skip to content

Commit

Permalink
build for aur
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Oct 13, 2021
1 parent 3f00430 commit f1ea8ff
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 23 deletions.
13 changes: 13 additions & 0 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pkgbase = tod-bin
pkgdesc = A tiny unofficial Todoist client
pkgver = 0.2.4
pkgrel = 1
url = https://github.com/alanvardy/tod
arch = x86_64
license = MIT
provides = tod
conflicts = tod
source = https://github.com/alanvardy/tod/releases/download/v0.2.4/tod-0.2.4-x86_64.tar.gz
sha256sums = 67a0dc0653c298ed3f40f8b49c80b4605acd133175c500c9ff87be3cbc1662ce

pkgname = tod-bin
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
tarpaulin-report.html
lcov.info
*.tar.gz
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

# 0.2.5
- Update dependencies
- Adding releases
- Added MIT licence
- GitIgnore binaries
- Added some philosophical ramblings to README

# 0.2.4
- Hotfix for moving items to different projects

Expand Down
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Alan Vardy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Maintainer: Alan Vardy <[email protected]>
#
# This PKGBUILD was generated by `cargo aur`: https://crates.io/crates/cargo-aur

pkgname=tod-bin
pkgver=0.2.4
pkgrel=1
pkgdesc="A tiny unofficial Todoist client"
url="https://github.com/alanvardy/tod"
license=("MIT")
arch=("x86_64")
provides=("tod")
conflicts=("tod")
source=("https://github.com/alanvardy/tod/releases/download/v$pkgver/tod-$pkgver-x86_64.tar.gz")
sha256sums=("67a0dc0653c298ed3f40f8b49c80b4605acd133175c500c9ff87be3cbc1662ce")

package() {
install -Dm755 tod -t "$pkgdir/usr/bin"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
3 changes: 3 additions & 0 deletions PUBLISH_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ This checklist is just here for me to reduce the friction of publishing new vers
- Update CHANGELOG.md with version number
- Update README.md with help text `cargo run -- -h`
- Add any new examples to README.md
- Build cargo release with `cargo aur`
- [Create a new release](https://github.com/alanvardy/tod/releases/new) and add binary
- Create .SRCINFO with `makepkg --printsrcinfo > .SRCINFO`
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,21 @@ tod -c && tod -np myproject
# Get your work schedule
tod -ep work
```

### Why I made this

I am a developer who uses Todoist to reduce stress and cognitive overhead, by delegating things that a machine does well to a machine. This CLI application scratches some very specific itches for me, and I hope that it may be of use to others as well!

Some points around my general strategy:

- Do one thing at a time, multi-tasking is an illusion (see `--next`)
- Capture all tasks immediately with the inbox and add detail later (see `--task`)
- Use prioritize and sort to batch process the inbox infrequently (see `--prioritize` and `--sort`)
- Make all your tasks "actions", concrete tasks that can be acted on. Add phone numbers, hyperlinks etc to your tasks
- Batch process like things as infrequently as possble to lower context switching, i.e. clear your email inbox once per day, spam once per week.
- Remember that the objective is to **get the important things done with less friction**, not just get more things done.
- Further to the above point, make sure to leave yourself margin. It is in the spaces between the periouds work that we recover and get our best ideas.
- Less projects is better than more projects
- Use projects as "modes" where you only work in one at a time
- Don't put a date on it unless it needs to be done that day
- Don't put a time on it unless it is an appointment with yourself or others
4 changes: 2 additions & 2 deletions src/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ impl Item {
fn is_overdue(&self) -> bool {
match self.datetimeinfo() {
Ok(DateTimeInfo::NoDateTime) => false,
Ok(DateTimeInfo::Date { date, .. }) => time::is_date_in_future(date),
Ok(DateTimeInfo::Date { date, .. }) => time::is_date_in_past(date),
Ok(DateTimeInfo::DateTime { datetime, .. }) => {
time::is_date_in_future(datetime.with_timezone(&Utc).date())
time::is_date_in_past(datetime.with_timezone(&Utc).date())
}
Err(_) => false,
}
Expand Down
2 changes: 1 addition & 1 deletion src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn is_today(datetime: DateTime<Tz>) -> bool {
datetime.date().format("%Y-%m-%d").to_string() == today_string()
}

pub fn is_date_in_future(date: Date<Utc>) -> bool {
pub fn is_date_in_past(date: Date<Utc>) -> bool {
date.signed_duration_since(today_date()).num_days() < 0
}

Expand Down

0 comments on commit f1ea8ff

Please sign in to comment.