mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Added DEVELOPERS file describing high-level code layout.
- Removed unused library.h file. - Removed unused std::wstring Unicode variants.
This commit is contained in:
parent
4825b37df5
commit
4549af6b84
6 changed files with 23 additions and 79 deletions
20
DEVELOPERS
Normal file
20
DEVELOPERS
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Developers may wish to change task, and here is a high-level guide to the files
|
||||||
|
included.
|
||||||
|
|
||||||
|
task.{cpp,h} Functions that implement the task commands, and main.
|
||||||
|
parse.cpp Parses the command line.
|
||||||
|
TDB.{cpp,h} The task database, performs all file I/O
|
||||||
|
T.{cpp,h} Represents a single task - parses a record from TDB, and also
|
||||||
|
composes record for TDB. Provides accessors for tasks.
|
||||||
|
Grid.{cpp,h} Implements a sparse 2D array, provides data storage for the
|
||||||
|
Table object.
|
||||||
|
Table.{cpp,h} Implements tabular data rendering, wrapping etc.
|
||||||
|
Config.{cpp,h} Implements a reader for the .taskrc file.
|
||||||
|
Date.{cpp,h} General date class for the time_t type.
|
||||||
|
text.cpp Text manipulation functions.
|
||||||
|
util.cpp General utility functions.
|
||||||
|
color.cpp Color support functions.
|
||||||
|
rules.cpp Auto-colorization rules.
|
||||||
|
|
||||||
|
Don't forget, please send patches to task@beckingham.net
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
SUBDIRS = src
|
SUBDIRS = src
|
||||||
EXTRA_DIST = TUTORIAL
|
EXTRA_DIST = TUTORIAL DEVELOPERS
|
||||||
|
|
||||||
|
|
7
README
7
README
|
@ -1,14 +1,13 @@
|
||||||
Task is a GTD utility featuring:
|
Thank you for taking a look at task. Task is a GTD utility featuring:
|
||||||
|
|
||||||
- Robust C++ implementation
|
- Robust C++ implementation
|
||||||
- Tags
|
- Tags
|
||||||
- Colorful, tabular output
|
- Colorful, tabular output
|
||||||
- Reports
|
- Reports
|
||||||
- Low-level API
|
- Low-level API
|
||||||
- Auto-completion on all commands, options
|
- Abbreviations for all commands, options
|
||||||
- Multi-user file locking
|
- Multi-user file locking
|
||||||
- Clean architecture allowing quick addition of new features
|
- Clean architecture allowing quick addition of new features
|
||||||
- UUID for all tasks
|
|
||||||
|
|
||||||
It is intended that features, mainly in the form of reports will be added
|
It is intended that features, mainly in the form of reports will be added
|
||||||
frequently, with best practices and useful reports evolving from usage patterns.
|
frequently, with best practices and useful reports evolving from usage patterns.
|
||||||
|
@ -17,8 +16,6 @@ Task is scope-limited to GTD functionality only.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Thank you for taking a look at task.
|
|
||||||
|
|
||||||
You may want to jump straight to the TUTORIAL file, or perhaps watch the task
|
You may want to jump straight to the TUTORIAL file, or perhaps watch the task
|
||||||
movie on YouTube:
|
movie on YouTube:
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright 2004 - 2008, Paul Beckingham. All rights reserved.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#ifndef INCLUDED_LIBRARY
|
|
||||||
#define INCLUDED_LIBRARY
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include "stlmacros.h"
|
|
||||||
|
|
||||||
#ifndef max
|
|
||||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// text.cpp
|
|
||||||
void wrapText (std::vector <std::string>&, const std::string&, const int);
|
|
||||||
std::string trimLeft (const std::string& in, const std::string& t = " ");
|
|
||||||
std::string trimRight (const std::string& in, const std::string& t = " ");
|
|
||||||
std::string trim (const std::string& in, const std::string& t = " ");
|
|
||||||
std::wstring trimLeft (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
std::wstring trimRight (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
std::wstring trim (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
void extractParagraphs (const std::string&, std::vector<std::string>&);
|
|
||||||
void extractLine (std::string&, std::string&, int);
|
|
||||||
void split (std::vector<std::string>&, const std::string&, const char);
|
|
||||||
void split (std::vector<std::string>&, const std::string&, const std::string&);
|
|
||||||
void join (std::string&, const std::string&, const std::vector<std::string>&);
|
|
||||||
std::string commify (const std::string&);
|
|
||||||
std::string lowerCase (const std::string&);
|
|
||||||
|
|
||||||
// misc.cpp
|
|
||||||
void delay (float);
|
|
||||||
|
|
||||||
// list.cpp
|
|
||||||
int autoComplete (const std::string&, const std::vector<std::string>&, std::vector<std::string>&);
|
|
||||||
|
|
||||||
// units.cpp
|
|
||||||
void formatTimeDeltaDays (std::string&, time_t);
|
|
||||||
std::string formatSeconds (time_t);
|
|
||||||
|
|
||||||
// uuid.cpp
|
|
||||||
const std::string uuid ();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
|
@ -57,9 +57,6 @@ void wrapText (std::vector <std::string>&, const std::string&, const int);
|
||||||
std::string trimLeft (const std::string& in, const std::string& t = " ");
|
std::string trimLeft (const std::string& in, const std::string& t = " ");
|
||||||
std::string trimRight (const std::string& in, const std::string& t = " ");
|
std::string trimRight (const std::string& in, const std::string& t = " ");
|
||||||
std::string trim (const std::string& in, const std::string& t = " ");
|
std::string trim (const std::string& in, const std::string& t = " ");
|
||||||
std::wstring trimLeft (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
std::wstring trimRight (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
std::wstring trim (const std::wstring& in, const std::wstring& t = L" "); // UNICODE safe
|
|
||||||
void extractParagraphs (const std::string&, std::vector<std::string>&);
|
void extractParagraphs (const std::string&, std::vector<std::string>&);
|
||||||
void extractLine (std::string&, std::string&, int);
|
void extractLine (std::string&, std::string&, int);
|
||||||
void split (std::vector<std::string>&, const std::string&, const char);
|
void split (std::vector<std::string>&, const std::string&, const char);
|
||||||
|
|
21
src/text.cpp
21
src/text.cpp
|
@ -99,13 +99,6 @@ std::string trimLeft (const std::string& in, const std::string& t /*= " "*/)
|
||||||
return out.erase (0, in.find_first_not_of (t));
|
return out.erase (0, in.find_first_not_of (t));
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNICODE safe
|
|
||||||
std::wstring trimLeft (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
|
||||||
{
|
|
||||||
std::wstring out = in;
|
|
||||||
return out.erase (0, in.find_first_not_of (t));
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::string trimRight (const std::string& in, const std::string& t /*= " "*/)
|
std::string trimRight (const std::string& in, const std::string& t /*= " "*/)
|
||||||
{
|
{
|
||||||
|
@ -113,13 +106,6 @@ std::string trimRight (const std::string& in, const std::string& t /*= " "*/)
|
||||||
return out.erase (out.find_last_not_of (t) + 1);
|
return out.erase (out.find_last_not_of (t) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNICODE safe
|
|
||||||
std::wstring trimRight (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
|
||||||
{
|
|
||||||
std::wstring out = in;
|
|
||||||
return out.erase (out.find_last_not_of (t) + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::string trim (const std::string& in, const std::string& t /*= " "*/)
|
std::string trim (const std::string& in, const std::string& t /*= " "*/)
|
||||||
{
|
{
|
||||||
|
@ -127,13 +113,6 @@ std::string trim (const std::string& in, const std::string& t /*= " "*/)
|
||||||
return trimLeft (trimRight (out, t), t);
|
return trimLeft (trimRight (out, t), t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNICODE safe
|
|
||||||
std::wstring trim (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
|
||||||
{
|
|
||||||
std::wstring out = in;
|
|
||||||
return trimLeft (trimRight (out, t), t);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Remove enclosing balanced quotes. Assumes trimmed text.
|
// Remove enclosing balanced quotes. Assumes trimmed text.
|
||||||
void unquoteText (std::string& text)
|
void unquoteText (std::string& text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue