Show subcommand #24
14 changed files with 186 additions and 5 deletions
|
@ -23,8 +23,8 @@ pub mod list;
|
|||
pub mod pause;
|
||||
pub mod priority;
|
||||
pub mod remove;
|
||||
pub mod show;
|
||||
pub mod start;
|
||||
pub mod status;
|
||||
|
||||
#[derive(clap::Parser)]
|
||||
#[clap(author, version, about = "Experemental task manager")]
|
||||
|
@ -42,11 +42,12 @@ pub enum SubCommand {
|
|||
Priority(self::priority::Args),
|
||||
#[clap(visible_alias("ls"))]
|
||||
List,
|
||||
#[clap(visible_alias("st"))]
|
||||
Start(self::start::Args),
|
||||
Pause,
|
||||
Finish(self::finish::Args),
|
||||
#[clap(visible_alias("st"))]
|
||||
Status(self::status::Args),
|
||||
#[clap(visible_alias("sh"))]
|
||||
Show(self::show::Args),
|
||||
}
|
||||
|
||||
pub fn print_task_detail(task: &domain::Task) {
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::{
|
||||
cli::print_task_detail,
|
||||
repo::{self, Repository},
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::cli::print_task_detail;
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::cli::print_task_detail;
|
||||
use crate::repo::{self, Repository};
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::domain::CurrentTaskInfo;
|
||||
use crate::repo::Repository;
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::cli::print_task_detail;
|
||||
use crate::repo::{self, Repository};
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::cli::print_task_detail;
|
||||
use crate::repo::{self, Repository};
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::{
|
||||
cli::print_task_detail,
|
||||
repo::{self, Repository},
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::cli::print_task_detail;
|
||||
use crate::domain::CurrentTaskInfo;
|
||||
use crate::repo::Repository;
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use crate::{
|
||||
cli::print_task_detail,
|
||||
repo::{self, Repository},
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub type TaskId = usize;
|
||||
|
|
|
@ -65,8 +65,8 @@ fn main() {
|
|||
cli::SubCommand::Finish(args) => {
|
||||
cli::finish::execute(repo, args);
|
||||
}
|
||||
cli::SubCommand::Status(args) => {
|
||||
cli::status::execute(repo, args);
|
||||
cli::SubCommand::Show(args) => {
|
||||
cli::show::execute(repo, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
src/repo.rs
15
src/repo.rs
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
pub mod fs;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//!
|
||||
//! tas is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
//! the Free Software Foundation, either version 3 of the License, or
|
||||
//! (at your option) any later version.
|
||||
//!
|
||||
//! tas is distributed in the hope that it will be useful,
|
||||
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//! GNU General Public License for more details.
|
||||
//!
|
||||
//! You should have received a copy of the GNU General Public License
|
||||
//! along with tas. If not, see <https://www.gnu.org/licenses/>.
|
||||
//!
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
|
Loading…
Reference in a new issue