Skip to content

Commit

Permalink
Commit for creating tag v0.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
jfgiraud committed Dec 6, 2023
1 parent bd72c13 commit 0a2cbe3
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 59 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 0.0.14 (2023-12-06)
* Add comment/uncomment feature

## 0.0.13 (2023-10-23)
* Documentation

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Usage
Examples
========

**Replace between tags using stdout (`-s` option).**
**Replace between strings using stdout (`-s` option).**

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -48,7 +48,8 @@ Examples
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*new text here
*END*Cras rhoncus aliquam tristique.

**Replace infile between tags and delete begin/end tags (`-d` option).**
**Replace infile between strings and delete begin/end strings (`-d`
option).**

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -62,7 +63,7 @@ Examples
Lorem ipsum dolor sit amet, consectetur adipiscing elit. new text here
Cras rhoncus aliquam tristique.

**Replace in file using the content of a file.**
**Replace in file using the content of a file (`-R` option).**

$ cat x
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand Down
34 changes: 20 additions & 14 deletions bin/rbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import stat
simulate = False

_USAGE = '''#BEGIN_DO_NOT_MODIFY:make update-doc
RBT(1) User commands RBT(1)
RBT(1) User commands RBT(1)
NAME
rbt - Replace the text between begin and end tags
Expand All @@ -29,10 +29,19 @@ DESCRIPTION
OPTIONS
-b string, --begin-string string
The begin tag to search.
The begin string to search.
-d, --delete
Delete begin/end strings after replacing.
-D, --dos
Use Dos/Windows line ending characters.
-e string, --end-string string
The end tag to search.
The end string to search.
-h
Display help.
-r string, --replace string
The string used to replace.
Expand All @@ -43,17 +52,14 @@ OPTIONS
-s, --simulate
Force output to STDOUT.
-d, --delete
Delete begin/end tags after replacing.
-h
Display help.
-U, --unix
Use Unix line ending character.
-v
Display version.
EXAMPLES
Replace between tags using stdout (-s option)
Replace between strings using stdout (-s option)
$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -65,7 +71,7 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*new text here
*END*Cras rhoncus aliquam tristique.
Replace infile between tags and delete begin/end tags (-d option)
Replace infile between strings and delete begin/end strings (-d option)
$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -79,7 +85,7 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. new text here
Cras rhoncus aliquam tristique.
Replace in file using the content of a file
Replace in file using the content of a file (-R option)
$ cat x
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -99,10 +105,10 @@ AUTHOR
Written by Jean-François Giraud.
COPYRIGHT
Copyright © 2023 Jean-François Giraud. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the
extent permitted by law.
Copyright © 2023 Jean-François Giraud. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
replace-between-tags 0.0.13 2023-10-23 RBT(1)
replace-between-tags 0.0.14 2023-12-06 RBT(1)
#END_DO_NOT_MODIFY:make update-doc
'''

Expand Down
2 changes: 1 addition & 1 deletion doc/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.13
0.0.14
44 changes: 27 additions & 17 deletions doc/generated/man/man1/rbt.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: rbt
.\" Author: [see the "AUTHORS" section]
.\" Generator: Asciidoctor 1.5.5
.\" Date: 2023-10-23
.\" Date: 2023-12-06
.\" Manual: User commands
.\" Source: replace-between-tags 0.0.13
.\" Source: replace-between-tags 0.0.14
.\" Language: English
.\"
.TH "RBT" "1" "2023-10-23" "replace\-between\-tags 0.0.13" "User commands"
.TH "RBT" "1" "2023-12-06" "replace\-between\-tags 0.0.14" "User commands"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
Expand All @@ -30,14 +30,29 @@ rbt \- Replace the text between begin and end tags
With no FILE, or when FILE is \f[CR]\-\fP, read standard input.
.SH "OPTIONS"
.sp
\fB\-b\fP \fIstring\fP, \fB\-\-begin\-tag\fP \fIstring\fP
\fB\-b\fP \fIstring\fP, \fB\-\-begin\-string\fP \fIstring\fP
.RS 4
The begin tag to search.
The begin string to search.
.RE
.sp
\fB\-e\fP \fIstring\fP, \fB\-\-end\-tag\fP \fIstring\fP
\fB\-d\fP, \fB\-\-delete\fP
.RS 4
Delete begin/end strings after replacing.
.RE
.sp
\fB\-D\fP, \fB\-\-dos\fP
.RS 4
Use Dos/Windows line ending characters.
.RE
.sp
\fB\-e\fP \fIstring\fP, \fB\-\-end\-string\fP \fIstring\fP
.RS 4
The end string to search.
.RE
.sp
\fB\-h\fP
.RS 4
The end tag to search.
Display help.
.RE
.sp
\fB\-r\fP \fIstring\fP, \fB\-\-replace\fP \fIstring\fP
Expand All @@ -55,14 +70,9 @@ The file used to replace.
Force output to STDOUT.
.RE
.sp
\fB\-d\fP, \fB\-\-delete\fP
\fB\-U\fP, \fB\-\-unix\fP
.RS 4
Delete begin/end tags after replacing.
.RE
.sp
\fB\-h\fP
.RS 4
Display help.
Use Unix line ending character.
.RE
.sp
\fB\-v\fP
Expand All @@ -71,7 +81,7 @@ Display version.
.RE
.SH "EXAMPLES"
.sp
.B Replace between tags using stdout (\f[CR]\-s\fP option)
.B Replace between strings using stdout (\f[CR]\-s\fP option)
.br
.sp
.if n \{\
Expand All @@ -92,7 +102,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*new text here
.RE
.\}
.sp
.B Replace infile between tags and delete begin/end tags (\f[CR]\-d\fP option)
.B Replace infile between strings and delete begin/end strings (\f[CR]\-d\fP option)
.br
.sp
.if n \{\
Expand All @@ -115,7 +125,7 @@ Cras rhoncus aliquam tristique.
.RE
.\}
.sp
.B Replace in file using the content of a file
.B Replace in file using the content of a file (\f[CR]\-R\fP option)
.br
.sp
.if n \{\
Expand Down
27 changes: 17 additions & 10 deletions doc/generated/md/rbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ OPTIONS
=======

**-b** *string*, **--begin-string** *string*
The begin tag to search.
The begin string to search.

**-d**, **--delete**
Delete begin/end strings after replacing.

**-D**, **--dos**
Use Dos/Windows line ending characters.

**-e** *string*, **--end-string** *string*
The end tag to search.
The end string to search.

**-h**
Display help.

**-r** *string*, **--replace** *string*
The string used to replace.
Expand All @@ -34,19 +43,16 @@ The file used to replace.
**-s**, **--simulate**
Force output to STDOUT.

**-d**, **--delete**
Delete begin/end tags after replacing.

**-h**
Display help.
**-U**, **--unix**
Use Unix line ending character.

**-v**
Display version.

EXAMPLES
========

**Replace between tags using stdout (`-s` option).**
**Replace between strings using stdout (`-s` option).**

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -58,7 +64,8 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*new text here
*END*Cras rhoncus aliquam tristique.

**Replace infile between tags and delete begin/end tags (`-d` option).**
**Replace infile between strings and delete begin/end strings (`-d`
option).**

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -72,7 +79,7 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. new text here
Cras rhoncus aliquam tristique.

**Replace in file using the content of a file.**
**Replace in file using the content of a file (`-R` option).**

$ cat x
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand Down
34 changes: 20 additions & 14 deletions doc/generated/txt/rbt.1.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RBT(1) User commands RBT(1)
RBT(1) User commands RBT(1)

NAME
rbt - Replace the text between begin and end tags
Expand All @@ -13,10 +13,19 @@ DESCRIPTION

OPTIONS
-b string, --begin-string string
The begin tag to search.
The begin string to search.

-d, --delete
Delete begin/end strings after replacing.

-D, --dos
Use Dos/Windows line ending characters.

-e string, --end-string string
The end tag to search.
The end string to search.

-h
Display help.

-r string, --replace string
The string used to replace.
Expand All @@ -27,17 +36,14 @@ OPTIONS
-s, --simulate
Force output to STDOUT.

-d, --delete
Delete begin/end tags after replacing.

-h
Display help.
-U, --unix
Use Unix line ending character.

-v
Display version.

EXAMPLES
Replace between tags using stdout (-s option)
Replace between strings using stdout (-s option)

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -49,7 +55,7 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*new text here
*END*Cras rhoncus aliquam tristique.

Replace infile between tags and delete begin/end tags (-d option)
Replace infile between strings and delete begin/end strings (-d option)

$ cat /tmp/lorem_ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -63,7 +69,7 @@ EXAMPLES
Lorem ipsum dolor sit amet, consectetur adipiscing elit. new text here
Cras rhoncus aliquam tristique.

Replace in file using the content of a file
Replace in file using the content of a file (-R option)

$ cat x
Lorem ipsum dolor sit amet, consectetur adipiscing elit. *BEGIN*Pellentesque maximus faucibus lectus, in ultricies lorem volutpat in.
Expand All @@ -83,7 +89,7 @@ AUTHOR
Written by Jean-François Giraud.

COPYRIGHT
Copyright © 2023 Jean-François Giraud. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the
extent permitted by law.
Copyright © 2023 Jean-François Giraud. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.

replace-between-tags 0.0.13 2023-10-23 RBT(1)
replace-between-tags 0.0.14 2023-12-06 RBT(1)

0 comments on commit 0a2cbe3

Please sign in to comment.