improved README

This commit is contained in:
Timon Ringwald 2022-04-18 20:45:40 +02:00
parent f66d9d7f3b
commit ed24c7842d

View File

@ -77,7 +77,10 @@ Input:
4
```
Command: `format`
Command:
```sh
format
```
Output:
```
@ -105,7 +108,10 @@ nine
ten
```
Command: `format -i '.*i.*'`
Command:
```sh
format -i '.*i.*'
```
Output:
```
@ -126,7 +132,10 @@ Input:
04
```
Command: `format -i '\d+' -o '{0:%d}'`
Command:
```sh
format -i '\d+' -o '{0:%d}'
```
Output:
```
@ -145,7 +154,10 @@ Input:
2006-01-02
```
Command: `format -i '(\d{4})-(\d{2})-(\d{2})' -o 'day: {3:%d} | month: {2:%d} | year: {1}'`
Command:
```sh
format -i '(\d{4})-(\d{2})-(\d{2})' -o 'day: {3:%d} | month: {2:%d} | year: {1}'
```
Output:
```
@ -166,7 +178,10 @@ Input:
02.02.1962
```
Command: `format -i '(\d{4})-(\d{2})-(\d{2})' -o 'day: {3:%d} | month: {2:%d} | year: {1}' -k | format -i '(\d{2})\.(\d{2})\.(\d{4})' -o 'day: {1:%d} | month: {2:%d} | year: {3}' -k`
Command:
```sh
format -i '(\d{4})-(\d{2})-(\d{2})' -o 'day: {3:%d} | month: {2:%d} | year: {1}' -k | format -i '(\d{2})\.(\d{2})\.(\d{4})' -o 'day: {1:%d} | month: {2:%d} | year: {3}' -k
```
Output:
```
@ -194,7 +209,10 @@ month: 02
day: 02
```
Command: `format -n 3 -i '^year: (\d{4})\nmonth: (\d{2})\nday: (\d{2})$' -o 'day: {3:%d} | month: {2:%d} | year: {1}'`
Command:
```sh
format -n 3 -i '^year: (\d{4})\nmonth: (\d{2})\nday: (\d{2})$' -o 'day: {3:%d} | month: {2:%d} | year: {1}'
```
Output:
```
@ -214,7 +232,10 @@ Input:
-15 3.7
```
Command: `format -i '(-?\d+) (-?\d+(?:.\d+)?)' -o '{1} + {2} = {1:%.2f:+(2)}'`
Command:
```sh
format -i '(-?\d+) (-?\d+(?:.\d+)?)' -o '{1} + {2} = {1:%.2f:+(2)}'
```
Output:
```
@ -235,7 +256,10 @@ Output of `ls`:
002.jpg
```
Command: `ls | format -i '(\d+)\.jpg' -o 'mv "{0}" "{1:%d:+1}.jpg"' | xargs -0 sh -c`
Command:
```sh
ls | format -i '(\d+)\.jpg' -o 'mv "{0}" "{1:%d:+1}.jpg"' | xargs -0 sh -c
```
Output of `ls` afterwards:
```
@ -273,7 +297,10 @@ Output of `ls`:
002.jpg
```
Command: `bulkrename '(\d+)\.jpg' '{1:%d:+1}.jpg'`
Command:
```sh
bulkrename '(\d+)\.jpg' '{1:%d:+1}.jpg'
```
Output:
```
@ -284,7 +311,10 @@ mv "002.jpg" "3.jpg"
execute commands with 'bulkrename (\d+)\.jpg {1:%d:+1}.jpg exec'
```
Command: `bulkrename '(\d+)\.jpg' '{1:%d:+1}.jpg' exec`
Command:
```sh
bulkrename '(\d+)\.jpg' '{1:%d:+1}.jpg' exec
```
Output of `ls` afterwards:
```