From ed24c7842d383316ff2f8294229eb099ba99dccf Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Mon, 18 Apr 2022 20:45:40 +0200 Subject: [PATCH] improved README --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ca3f3b7..8227086 100644 --- a/README.md +++ b/README.md @@ -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: ```