From aa8179654f76b14839e05809dec8a10cde2dfeb3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 6 Apr 2016 17:36:40 -0400 Subject: [PATCH] CmdLog: Gone --- src/CMakeLists.txt | 1 - src/commands/CmdHelp.cpp | 16 ------------ src/commands/CmdLog.cpp | 55 ---------------------------------------- src/commands/commands.h | 1 - src/init.cpp | 2 -- 5 files changed, 75 deletions(-) delete mode 100644 src/commands/CmdLog.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 83d100ca..79cc4d3d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,7 +26,6 @@ set (libshared_SRCS libshared/src/Args.cpp libshared/src/Args.h libshared/src/Duration.cpp libshared/src/Duration.h libshared/src/FS.cpp libshared/src/FS.h libshared/src/JSON.cpp libshared/src/JSON.h - libshared/src/Log.cpp libshared/src/Log.h libshared/src/Msg.cpp libshared/src/Msg.h libshared/src/Pig.cpp libshared/src/Pig.h libshared/src/RX.cpp libshared/src/RX.h diff --git a/src/commands/CmdHelp.cpp b/src/commands/CmdHelp.cpp index c25ec276..0d71692b 100644 --- a/src/commands/CmdHelp.cpp +++ b/src/commands/CmdHelp.cpp @@ -38,7 +38,6 @@ int CmdHelpUsage () << " timew diagnostics\n" << " timew export\n" << " timew extensions\n" - << " timew log []\n" << " timew start [ ...]\n" << " timew stop\n" << " timew tags\n" @@ -137,21 +136,6 @@ int CmdHelp (CLI& cli, Log& log) // TODO gaps // TODO help // TODO import - - // Ruler 1 2 3 4 5 6 7 8 - // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 - else if (words[0] == "log") - std::cout << "\n" - << "Syntax: timew log []\n" - << "\n" - << "Writes the info to the Timewarrior log file. The may be\n" - << "multiple words, or a quoted string. If is ommitted, writes a cut\n" - << "marker ('-------- 8< --------') line to the log file.\n" - << "\n" - << "Note: Your log file is found here:\n" - << " " << log.file () << "\n" - << "\n"; - // TODO report // Ruler 1 2 3 4 5 6 7 8 diff --git a/src/commands/CmdLog.cpp b/src/commands/CmdLog.cpp deleted file mode 100644 index 4904329b..00000000 --- a/src/commands/CmdLog.cpp +++ /dev/null @@ -1,55 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// Copyright 2015 - 2016, Paul Beckingham, Federico Hernandez. -// -// 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. -// -// http://www.opensource.org/licenses/mit-license.php -// -//////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////// -// TODO This may be removed, unless it proves useful. -int CmdLog (CLI& cli, Log& log) -{ - auto words = cli.getWords (); - if (words.size ()) - { - // 'timew log mark' writes a marker. - if (words[0] == "mark") - log.write ("debug", "-------- 8< --------"); - - // 'timew log ...' writes '...' to log. - else - log.write ("info", join (" ", words)); - } - else - std::cout << "No message specified.\n"; - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/commands.h b/src/commands/commands.h index ee205328..178ba3b5 100644 --- a/src/commands/commands.h +++ b/src/commands/commands.h @@ -44,7 +44,6 @@ int CmdExtensions ( Rules&, Extensions& ); int CmdGaps ( ); int CmdHelpUsage ( ); int CmdHelp (CLI&, Log&); -int CmdLog (CLI&, Log&); int CmdImport ( ); int CmdReport (CLI&, Rules&, Database&, Extensions&, Log&); int CmdStart (CLI&, Rules&, Database&, Log&); diff --git a/src/init.cpp b/src/init.cpp index 280ff26f..a7c56ab4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -65,7 +65,6 @@ void initializeEntities (CLI& cli) cli.entity ("command", "gaps"); cli.entity ("command", "help"); cli.entity ("command", "import"); - cli.entity ("command", "log"); cli.entity ("command", "report"); cli.entity ("command", "start"); cli.entity ("command", "stop"); @@ -217,7 +216,6 @@ int dispatchCommand ( else if (command == "gaps") status = CmdGaps ( ); else if (command == "help") status = CmdHelp (cli, log); else if (command == "import") status = CmdImport ( ); - else if (command == "log") status = CmdLog (cli, log); else if (command == "report") status = CmdReport (cli, rules, database, extensions, log); else if (command == "start") status = CmdStart (cli, rules, database, log); else if (command == "stop") status = CmdStop (cli, rules, database, log);