Skip to content

Commit

Permalink
fix examples and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Feb 20, 2024
1 parent 922fcac commit 0d94438
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions ARGUMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ Using this Argument allows to pass in Data via the Stdin Stream.
The Stdin Pipe will be handled as its own File.

```console
> echo Hello World! | catw -in
> echo Hello World! | catw - -n
1) Hello World!
```

Expand All @@ -468,7 +468,7 @@ Line 2
Line 3
```
```console
> catw test.txt | catw -io
> catw test.txt | catw - -o
Line 1
```

Expand Down Expand Up @@ -670,7 +670,7 @@ This Parameter will be used before most other Arguments such that other Paramete
This means a Base64 encoded Input is expected and neccessary.

```console
> echo SGVsbG8gV29ybGQ= | catw -i --b64d
> echo SGVsbG8gV29ybGQ= | catw - --b64d
Hello World
```

Expand All @@ -680,7 +680,7 @@ Encodes a given Text in Base64.
This Parameter will be used after most other Arguments such that other Parameter will be used on the plain Text beforehand.

```console
> echo Hello World | catw -i --b64e
> echo Hello World | catw - --b64e
SGVsbG8gV29ybGQ=
```

Expand All @@ -694,11 +694,11 @@ In the uppercase Variant of the Parameter any non-mathematical Text will be stri
On Error The Expression will evaluate to '???'.

```console
> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw -i --eval
> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw - --eval
Calculate: 0 !
```
```console
> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw -i --EVAL
> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw - --EVAL
0
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Read about specific **Arguments & Options** [here](https://github.com/SilenZcien
</details>

```py
$ echo "Hello World :)" | catw -i [6:] | catw -i [::-1] -ln
$ echo "Hello World :)" | catw - [6:] | catw - [::-1] -ln
> 1) [8] ): dlroW
```

Expand Down
4 changes: 2 additions & 2 deletions cat_win/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def print_file(content: list) -> bool:

if found_sth:
try:
# fails when using -i mode, because the stdin will send en EOF char
# fails when using --stdin mode, because the stdin will send en EOF char
# to input without prompting the user
input()
except (EOFError, UnicodeDecodeError):
Expand Down Expand Up @@ -672,7 +672,7 @@ def edit_content(content: list, show_bytecode: bool, file_index: int = 0,
# if the content of the file is empty, we check if maybe the file is its own pipe-target.
# an indicator would be if the file has just been modified to be empty (by the shell).
# also the stdout cannot be atty.
# checking if the file is an _unknown_file is not valid, because by using '-i'
# checking if the file is an _unknown_file is not valid, because by using '--stdin'
# the stdin will be used to write the file
file_mtime = get_file_mtime(holder.files[file_index].path)
date_nowtime = datetime.timestamp(datetime.now())
Expand Down

0 comments on commit 0d94438

Please sign in to comment.