<commit_before>.TH TAG "1" "April 2011" "" "User Commands"

.SH NAME
tag \- simple yet powerful keyword based file searching

.SH SYNOPSIS
.B tag
\fI-t\fR \fIFILE\fR|\fIDIRECTORY\fR [[\fIMODIFIER\fR]\fIPATTERN\fR]...
.br
.B tag
\fI-f\fR \fIDIRECTORY\fR [[\fIMODIFIER\fR]\fIPATTERN\fR]...
.br
.B tag
\fI-q\fR \fIFILE\fR|\fIDIRECTORY\fR
.br
.B tag
\fILONG-OPTION\fR

.SH DESCRIPTION
.\" Add any additional description here
.TP
\fB\-t\fR
add or remove keywords associated with a specified file or directory
.TP
\fB\-f\fR
search for files or directories that have been tagged with specified keywords
.TP
\fB\-q\fR
query what keywords are associated with a file or directory
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit

.SH KEYWORD MODIFIERS
When performing file tagging and searching, keywords can optionally be prefixed by a modifier character. These modifiers will change how 
.B tag 
interprets the keyword for the specified operation.

.SS "File Tagging"
.TP
.B +KEYWORD (or just KEYWORD)
will add the keyword
.B KEYWORD 
to the specified file if it has not already been added.
.TP
.B -PATTERN
will remove any keywords that match
.B PATTERN
from the specified file or directory.
.TP
.B ~PATTERN
will remove any keyword that do not match
.B PATTERN
from the specified file or directory.

.SS "File Searching"

.TP
.B +PATTERN
Says that a file must be tagged with a keyword that matches
.B PATTERN

.TP
.BR -PATTERN
Says that a file must not be tagged with a keyword that matches
.BR PATTERN

.TP
.B ~PATTERN (or just PATTERN)
Says that a file can be tagged with a keyword that matches
.B PATTERN

.SS "Examples"
.TP
.B "$ tag -f ./ +tag1 +tag2"
will list all files that are tagged with 
.B tag1
\fIand\fR
.B tag2
inside the current directory.

.TP
.B "$ tag -f ./ ~tag1 tag2"
will list all files that are tagged with 
.B tag1
\fIor\fR
.B tag2
inside the current directory.

.TP
.B "$ tag -f ./ '*'"
will list all files that are tagged inside the current directory.

.TP
.B "$ tag -f ./ '*' -tag1"
will list all files that are not tagged with 
.B tag1<commit_msg>[~] Moved examples to their own section.<commit_after>.TH TAG "1" "April 2011" "" "User Commands"

.SH NAME
tag \- simple yet powerful keyword based file searching

.SH SYNOPSIS
.B tag
\fI-t\fR \fIFILE\fR|\fIDIRECTORY\fR [[\fIMODIFIER\fR]\fIPATTERN\fR]...
.br
.B tag
\fI-f\fR \fIDIRECTORY\fR [[\fIMODIFIER\fR]\fIPATTERN\fR]...
.br
.B tag
\fI-q\fR \fIFILE\fR|\fIDIRECTORY\fR
.br
.B tag
\fILONG-OPTION\fR

.SH DESCRIPTION
.\" Add any additional description here
.TP
\fB\-t\fR
add or remove keywords associated with a specified file or directory
.TP
\fB\-f\fR
search for files or directories that have been tagged with specified keywords
.TP
\fB\-q\fR
query what keywords are associated with a file or directory
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit

.SH KEYWORD MODIFIERS
When performing file tagging and searching, keywords can optionally be prefixed by a modifier character. These modifiers will change how 
.B tag 
interprets the keyword for the specified operation.

.SS "File Tagging"
.TP
.B +KEYWORD (or just KEYWORD)
will add the keyword
.B KEYWORD 
to the specified file if it has not already been added.
.TP
.B -PATTERN
will remove any keywords that match
.B PATTERN
from the specified file or directory.
.TP
.B ~PATTERN
will remove any keyword that do not match
.B PATTERN
from the specified file or directory.

.SS "File Searching"

.TP
.B +PATTERN
Says that a file must be tagged with a keyword that matches
.B PATTERN

.TP
.BR -PATTERN
Says that a file must not be tagged with a keyword that matches
.BR PATTERN

.TP
.B ~PATTERN (or just PATTERN)
Says that a file can be tagged with a keyword that matches
.B PATTERN

.SH EXAMPLES
.SS "File Searching"
.TP
.B "$ tag -f ./ +tag1 +tag2"
will list all files that are tagged with 
.B tag1
\fIand\fR
.B tag2
inside the current directory.

.TP
.B "$ tag -f ./ ~tag1 tag2"
will list all files that are tagged with 
.B tag1
\fIor\fR
.B tag2
under the current directory.

.TP
.B "$ tag -f ./ '*'"
will list \fIall\fR files that are tagged under the current directory.

.TP
.B "$ tag -f ./ '*' -tag1"
will list all files that are not tagged with 
.B tag1
{'fraction_non_alphanumeric': 0.09529356943150047, 'fraction_numerical': 0.006989748369058714, 'mean_word_length': 3.200587084148728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1809549', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1480, 'n_words': 668}