Skip to content

Commit 14e16db

Browse files
committed
removes --today feature
1 parent 8994f9c commit 14e16db

File tree

3 files changed

+2
-69
lines changed

3 files changed

+2
-69
lines changed

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,9 @@ npm i -g taskparser
6969

7070
```
7171
$ taskparser -h
72-
usage: taskparser [-h] [-t TAGS] [-f FILTER] [-s SORT] [-l] [-C] [-U] [-o {table,csv,json}] [-c COLUMNS]
73-
[-v] [--today] [--title TITLE]
74-
path
72+
usage: taskparser [-h] [-t TAGS] [-f FILTER] [-s SORT] [-l] [-C] [-U] [-o {table,csv,json}] [-c COLUMNS] [-v] path
7573
76-
A CLI tool to parse, sort and filter tasks and worklogs out of Markdown documents and print them to
77-
standard output, either in tabular of CSV format.
74+
A CLI tool to parse, sort and filter tasks and worklogs out of Markdown documents and print them to standard output, either in tabular of CSV format.
7875
7976
positional arguments:
8077
path working directory
@@ -93,8 +90,6 @@ optional arguments:
9390
-c COLUMNS, --columns COLUMNS
9491
override detected terminal width (in character columns)
9592
-v, --version show program's version number and exit
96-
--today generate a new today file at the given path
97-
--title TITLE title for the new today file
9893
```
9994

10095
## Tags

src/bin.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
parseTagFilterExpressions,
2222
parseTagSortExpressions,
2323
} from './tags.js';
24-
import { renderTodayFile } from './today.js';
2524

2625
const pkg_path = resolve(fileURLToPath(import.meta.url), '..', '..', 'package.json');
2726
const pkg_version = JSON.parse(readFileSync(pkg_path, 'utf8')).version;
@@ -85,18 +84,6 @@ arg_parser.add_argument('-v', '--version', {
8584
version: pkg_version,
8685
});
8786

88-
arg_parser.add_argument('--today', {
89-
required: false,
90-
action: 'store_true',
91-
help: 'generate a new today file at the given path',
92-
});
93-
94-
arg_parser.add_argument('--title', {
95-
required: false,
96-
default: 'Today',
97-
help: 'title for the new today file',
98-
});
99-
10087
arg_parser.add_argument('path', {
10188
default: cwd(),
10289
help: 'working directory',
@@ -106,26 +93,6 @@ const cli_args = arg_parser.parse_args();
10693

10794
const folder_path = resolve(cwd(), cli_args.path);
10895

109-
// ============================================================================
110-
// TODAY
111-
// ============================================================================
112-
113-
if (cli_args.today) {
114-
const { f_name, f_data } = renderTodayFile(new Date(), cli_args.title.trim());
115-
const f_path = resolve(cli_args.path, f_name);
116-
try {
117-
await writeFile(f_path, f_data, { encoding: 'utf-8', flag: 'wx' });
118-
console.log('created new today file at %s', f_path);
119-
} catch (err) {
120-
if ((err as any).code === 'EEXIST') {
121-
console.error('Error! File %s already exists!', f_path);
122-
} else {
123-
throw err;
124-
}
125-
}
126-
process.exit(0);
127-
}
128-
12996
// ============================================================================
13097
// FILTERING
13198
// ============================================================================

src/today.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)