From fdfd718fe94ebbc17b4e529c1d5bc65a822957b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 06:22:33 +0000 Subject: [PATCH] Update OAFP examples --- docs/guides/oafp/oafp-examples.md | 439 ++++++++++++++++-------------- 1 file changed, 234 insertions(+), 205 deletions(-) diff --git a/docs/guides/oafp/oafp-examples.md b/docs/guides/oafp/oafp-examples.md index 6c1b0e7..e700e64 100644 --- a/docs/guides/oafp/oafp-examples.md +++ b/docs/guides/oafp/oafp-examples.md @@ -98,109 +98,112 @@ Examples of use of _oafp_ avaiable also in [https://ojob.io/oafp-examples.yaml]( | Generic | Excel | [83](#83) | Processes each json file in /some/data creating and updating the data.xlsx file with a sheet for each file. | | Generic | Excel | [84](#84) | Store and retrieve data from an Excel spreadsheet | | Generic | HTML | [85](#85) | Generate a HTML with table of emoticons/emojis by category, group, name, unicode and html code. | -| Generic | Hex | [86](#86) | Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. | -| Generic | List files | [87](#87) | After listing all files and folders recursively producing a count table by file extension. | -| Generic | RSS | [88](#88) | Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. | -| Generic | RSS | [89](#89) | Example of generating a HTML list of titles, links and publication dates from a RSS feed | -| Generic | RSS | [90](#90) | Generates a HTML page with the current news from Google News, order by date, and opens a browser with it. | -| Generic | RSS | [91](#91) | Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser | -| Generic | Set | [92](#92) | Given two json files, with arrays of component versions, generate a table with the difference on one of the sides. | -| Generic | Set | [93](#93) | Given two json files, with arrays of component versions, generate a table with the union of the two sides. | -| Generic | Template | [94](#94) | Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. | -| Generic | Text | [95](#95) | Get a json with lyrics of a song. | -| Generic | Text | [96](#96) | Search a word in the English dictionary returning phonetic, meanings, synonyms, antonyms, etc. | -| Generic | URL | [97](#97) | Given an URL to a resource on a website determine how long ago is was modified given the data provided by the server. | -| Generic | YAML | [98](#98) | Given an YAML file with a data array composed of maps with fields 'c', 's', 'd' and 'e' filter by any record where any field doesn't have contents. | -| GitHub | GIST | [99](#99) | Using GitHub's GIST functionality retrieves and parses an oAFp examples YAML file with the template and the corresponding data. | -| GitHub | Releases | [100](#100) | Builds a table of GitHub project releases | -| GitHub | Releases | [101](#101) | Parses the latest GitHub project release markdown notes | -| Grid | Java | [102](#102) | Parses a Java hsperf data + the current rss java process memory into a looping grid. | -| Grid | Java | [103](#103) | Parses a Java hsperf data into a looping grid. | -| Grid | Kubernetes | [104](#104) | Displays a continuous updating grid with a line chart with the number of CPU throtlles and bursts recorded in the Linux cgroup cpu stats of a container running in Kubernetes and the source cpu.stats data | -| Grid | Mac | [105](#105) | Shows a grid with the Mac network metrics and 4 charts for in, out packets and in, out bytes | -| Grid | Mac | [106](#106) | Shows a grid with the Mac storage metrics and 4 charts for read, write IOPS and read, write bytes per second | -| Grid | Unix | [107](#107) | On an Unix/Linux system supporting 'ps' output formats %cpu and %mem, will output a chart with the percentage of cpu and memory usage of a provided pid (e.g. 12345) | -| JSON Schemas | Lists | [108](#108) | Get a list of JSON schemas from Schema Store catalog | -| Java | Certificates | [109](#109) | Given a Java keystore will obtain a list of certificates and output them order by the ones that will expire first. | -| Kubernetes | Containers | [110](#110) | Parse the Linux cgroup cpu stats on a container running in Kubernetes | -| Kubernetes | Kubectl | [111](#111) | Build an output table with Kubernetes pods with namespace, pod name, container name and corresponding resources using kubectl | -| Kubernetes | Kubectl | [112](#112) | Build an output table with Kubernetes pods with node, namespace, pod name, container name and corresponding resources using kubectl | -| Kubernetes | Kubectl | [113](#113) | Executes a recursive file list find command in a specific pod, namespace and path converting the result into a table. | -| Kubernetes | Kubectl | [114](#114) | Given the list of all Kubernetes objects will produce a list of objects per namespace, kind, apiVersiom, creation timestamp, name and owner. | -| Kubernetes | Kubectl | [115](#115) | List of Kubernetes CPU, memory and storage stats per node using kubectl | -| Kubernetes | Kubectl | [116](#116) | List of Kubernetes pods per namespace and kind using kubectl | -| Kubernetes | Kubectl | [117](#117) | Produces a list of pods' containers per namespace with the corresponding images and assigned nodes. | -| Kubernetes | PVC | [118](#118) | Produces a table with all Kubernetes persistent volume claims (PVCs) in use by pods. | -| Mac | Activity | [119](#119) | Uses the Mac terminal command 'last' output to build an activity table with user, tty, from, login-time and logout-time | -| Mac | Brew | [120](#120) | List all the packages and corresponding versions installed in a Mac by brew. | -| Mac | Chart | [121](#121) | On a Mac OS produce a looping chart with the total percentage of current CPU usage. | -| Mac | Info | [122](#122) | Get a list of the current logged users in Mac OS | -| Mac | Info | [123](#123) | Parses the current Mac OS hardware information | -| Mac | Info | [124](#124) | Parses the current Mac OS overview information | -| Mac | Safari | [125](#125) | Get a list of all Mac OS Safari bookmarks into a CSV file. | -| Mac | Tunnelblink | [126](#126) | In a Mac OS with Tunnelblink, if you want to copy all your OpenVPN configurations into ovpn files. | -| Markdown | Tables | [127](#127) | For an input markdown file, parse all tables, transform it to JSON and output as a colored table | -| Network | ASN | [128](#128) | Retrieve an IP to ASN list list and converts it to ndjson | -| Network | ASN | [129](#129) | Retrieve the list of ASN number and names from RIPE and transforms it to a CSV. | -| Network | Latency | [130](#130) | Given a host and a port will display a continuously updating line chart with network latency, in ms, between the current device and the target host and port | -| Ollama | List models | [131](#131) | Parses the list of models currently in an Ollama deployment | -| OpenAF | Channels | [132](#132) | Copy the json result of a command into an etcd database using OpenAF's channels | -| OpenAF | Channels | [133](#133) | Getting all data stored in an etcd database using OpenAF's channels | -| OpenAF | Channels | [134](#134) | Given a Prometheus database will query for a specific metric (go_memstats_alloc_bytes), during a defined period, every 5 seconds (step) will produce a static chart with the corresponding metric values. | -| OpenAF | Channels | [135](#135) | Perform a query to a metric & label, with a start and end time, to a Prometheus server using OpenAF's channels | -| OpenAF | Channels | [136](#136) | Retrieve all keys stores in a H2 MVStore file using OpenAF's channels | -| OpenAF | Channels | [137](#137) | Store and retrieve data from a Redis database | -| OpenAF | Channels | [138](#138) | Store and retrieve data from a RocksDB database | -| OpenAF | Channels | [139](#139) | Store the json results of a command into a H2 MVStore file using OpenAF's channels | -| OpenAF | Flags | [140](#140) | List the current values of OpenAF/oAFp internal flags | -| OpenAF | Network | [141](#141) | Gets all the DNS host addresses for a provided domain and ensures that the output is always a list | -| OpenAF | Network | [142](#142) | List all MX (mail servers) network addresses from the current DNS server for a hostname using OpenAF | -| OpenAF | Network | [143](#143) | List all network addresses returned from the current DNS server for a hostname using OpenAF | -| OpenAF | OS | [144](#144) | Current OS information visible to OpenAF | -| OpenAF | OS | [145](#145) | Using OpenAF parse the current environment variables | -| OpenAF | OpenVPN | [146](#146) | Using OpenAF code to perform a more complex parsing of the OpenVPN status data running on an OpenVPN container (nmaguiar/openvpn) called 'openvpn' | -| OpenAF | SFTP | [147](#147) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user and password | -| OpenAF | SFTP | [148](#148) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user, private key and password | -| OpenAF | TLS | [149](#149) | List the TLS certificates of a target host with a sorted alternative names using OpenAF | -| OpenAF | oJob.io | [150](#150) | Parses ojob.io/news results into a clickable news title HMTL page. | -| OpenAF | oJob.io | [151](#151) | Retrieves the list of oJob.io's jobs and filters which start by 'ojob.io/news' to display them in a rectangle | -| OpenAF | oPacks | [152](#152) | Listing all currently accessible OpenAF's oPacks | -| OpenAF | oafp | [153](#153) | Filter the OpenAF's oafp examples list by a specific word in the description | -| OpenAF | oafp | [154](#154) | List the OpenAF's oafp examples by category, sub-category and description | -| OpenAF | oafp | [155](#155) | Produce a colored table with all the current oafp input and output formats supported. | -| OpenVPN | List | [156](#156) | When using the container nmaguiar/openvpn it's possible to convert the list of all clients order by expiration/end date | -| Unix | Activity | [157](#157) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity for Debian based Linuxs | -| Unix | Activity | [158](#158) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity for RedHat based Linuxs | -| Unix | Alpine | [159](#159) | List all installed packages in an Alpine system | -| Unix | Ask | [160](#160) | Unix bash script to ask for a path and choose between filetypes to perform an unix find command. | -| Unix | Compute | [161](#161) | Parses the Linux /proc/cpuinfo into an array | -| Unix | Debian/Ubuntu | [162](#162) | List all installed packages in a Debian/Ubuntu system | -| Unix | Envs | [163](#163) | Converts the Linux envs command result into a table of environment variables and corresponding values | -| Unix | Files | [164](#164) | Converting the Linux's /etc/os-release to SQL insert statements. | -| Unix | Files | [165](#165) | Converting the Unix's syslog into a json output. | -| Unix | Files | [166](#166) | Executes a recursive file list find command converting the result into a table. | -| Unix | Files | [167](#167) | Parses the Linux /etc/passwd to a table order by uid and gid. | -| Unix | Generic | [168](#168) | Creates, in unix, a data.ndjson file where each record is formatted from json files in /some/data | -| Unix | Memory map | [169](#169) | Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner | -| Unix | Network | [170](#170) | Loop over the current Linux active network connections | -| Unix | Network | [171](#171) | Parse the Linux 'arp' command output | -| Unix | Network | [172](#172) | Parse the Linux 'ip tcp_metrics' command | -| Unix | Network | [173](#173) | Parse the result of the Linux route command | -| Unix | OpenSuse | [174](#174) | List all installed packages in an OpenSuse system or zypper based system | -| Unix | RedHat | [175](#175) | List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) | -| Unix | Storage | [176](#176) | Converting the Unix's df output | -| Unix | Storage | [177](#177) | Parses the result of the Unix ls command | -| Unix | SystemCtl | [178](#178) | Converting the Unix's systemctl list-timers | -| Unix | SystemCtl | [179](#179) | Converting the Unix's systemctl list-units | -| Unix | SystemCtl | [180](#180) | Converting the Unix's systemctl list-units into an overview table | -| Unix | UBI | [181](#181) | List all installed packages in an UBI system | -| Unix | named | [182](#182) | Converts a Linux's named log, for client queries, into a CSV | -| Unix | strace | [183](#183) | Given a strace unix command will produce a summary table of the system calls invoked including a small line chart of the percentage of time of each. | -| Windows | Network | [184](#184) | Output a table with the current route table using Windows' PowerShell | -| Windows | Network | [185](#185) | Output a table with the list of network interfaces using Windows' PowerShell | -| Windows | PnP | [186](#186) | Output a table with USB/PnP devices using Windows' PowerShell | -| Windows | Storage | [187](#187) | Output a table with the attached disk information using Windows' PowerShell | -| XML | Maven | [188](#188) | Given a Maven pom.xml parses the XML content to a colored table ordering by the fields groupId and artifactId. | +| Generic | HTML | [86](#86) | Given an input file, in a specific language (e.g. yaml, json, bash, etc...), output an HTML representation with syntax highlighting. | +| Generic | Hex | [87](#87) | Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. | +| Generic | JWT | [88](#88) | Generates an output JWT (JSON Web Token) given the provided input claims signed with a provided secret. | +| Generic | JWT | [89](#89) | Given an input JWT (JSON Web Token) converts it to a human readable format. | +| Generic | List files | [90](#90) | After listing all files and folders recursively producing a count table by file extension. | +| Generic | RSS | [91](#91) | Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. | +| Generic | RSS | [92](#92) | Example of generating a HTML list of titles, links and publication dates from a RSS feed | +| Generic | RSS | [93](#93) | Generates a HTML page with the current news from Google News, order by date, and opens a browser with it. | +| Generic | RSS | [94](#94) | Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser | +| Generic | Set | [95](#95) | Given two json files, with arrays of component versions, generate a table with the difference on one of the sides. | +| Generic | Set | [96](#96) | Given two json files, with arrays of component versions, generate a table with the union of the two sides. | +| Generic | Template | [97](#97) | Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. | +| Generic | Text | [98](#98) | Get a json with lyrics of a song. | +| Generic | Text | [99](#99) | Search a word in the English dictionary returning phonetic, meanings, synonyms, antonyms, etc. | +| Generic | URL | [100](#100) | Given an URL to a resource on a website determine how long ago is was modified given the data provided by the server. | +| Generic | YAML | [101](#101) | Given an YAML file with a data array composed of maps with fields 'c', 's', 'd' and 'e' filter by any record where any field doesn't have contents. | +| GitHub | GIST | [102](#102) | Using GitHub's GIST functionality retrieves and parses an oAFp examples YAML file with the template and the corresponding data. | +| GitHub | Releases | [103](#103) | Builds a table of GitHub project releases | +| GitHub | Releases | [104](#104) | Parses the latest GitHub project release markdown notes | +| Grid | Java | [105](#105) | Parses a Java hsperf data + the current rss java process memory into a looping grid. | +| Grid | Java | [106](#106) | Parses a Java hsperf data into a looping grid. | +| Grid | Kubernetes | [107](#107) | Displays a continuous updating grid with a line chart with the number of CPU throtlles and bursts recorded in the Linux cgroup cpu stats of a container running in Kubernetes and the source cpu.stats data | +| Grid | Mac | [108](#108) | Shows a grid with the Mac network metrics and 4 charts for in, out packets and in, out bytes | +| Grid | Mac | [109](#109) | Shows a grid with the Mac storage metrics and 4 charts for read, write IOPS and read, write bytes per second | +| Grid | Unix | [110](#110) | On an Unix/Linux system supporting 'ps' output formats %cpu and %mem, will output a chart with the percentage of cpu and memory usage of a provided pid (e.g. 12345) | +| JSON Schemas | Lists | [111](#111) | Get a list of JSON schemas from Schema Store catalog | +| Java | Certificates | [112](#112) | Given a Java keystore will obtain a list of certificates and output them order by the ones that will expire first. | +| Kubernetes | Containers | [113](#113) | Parse the Linux cgroup cpu stats on a container running in Kubernetes | +| Kubernetes | Kubectl | [114](#114) | Build an output table with Kubernetes pods with namespace, pod name, container name and corresponding resources using kubectl | +| Kubernetes | Kubectl | [115](#115) | Build an output table with Kubernetes pods with node, namespace, pod name, container name and corresponding resources using kubectl | +| Kubernetes | Kubectl | [116](#116) | Executes a recursive file list find command in a specific pod, namespace and path converting the result into a table. | +| Kubernetes | Kubectl | [117](#117) | Given the list of all Kubernetes objects will produce a list of objects per namespace, kind, apiVersiom, creation timestamp, name and owner. | +| Kubernetes | Kubectl | [118](#118) | List of Kubernetes CPU, memory and storage stats per node using kubectl | +| Kubernetes | Kubectl | [119](#119) | List of Kubernetes pods per namespace and kind using kubectl | +| Kubernetes | Kubectl | [120](#120) | Produces a list of pods' containers per namespace with the corresponding images and assigned nodes. | +| Kubernetes | PVC | [121](#121) | Produces a table with all Kubernetes persistent volume claims (PVCs) in use by pods. | +| Mac | Activity | [122](#122) | Uses the Mac terminal command 'last' output to build an activity table with user, tty, from, login-time and logout-time | +| Mac | Brew | [123](#123) | List all the packages and corresponding versions installed in a Mac by brew. | +| Mac | Chart | [124](#124) | On a Mac OS produce a looping chart with the total percentage of current CPU usage. | +| Mac | Info | [125](#125) | Get a list of the current logged users in Mac OS | +| Mac | Info | [126](#126) | Parses the current Mac OS hardware information | +| Mac | Info | [127](#127) | Parses the current Mac OS overview information | +| Mac | Safari | [128](#128) | Get a list of all Mac OS Safari bookmarks into a CSV file. | +| Mac | Tunnelblink | [129](#129) | In a Mac OS with Tunnelblink, if you want to copy all your OpenVPN configurations into ovpn files. | +| Markdown | Tables | [130](#130) | For an input markdown file, parse all tables, transform it to JSON and output as a colored table | +| Network | ASN | [131](#131) | Retrieve an IP to ASN list list and converts it to ndjson | +| Network | ASN | [132](#132) | Retrieve the list of ASN number and names from RIPE and transforms it to a CSV. | +| Network | Latency | [133](#133) | Given a host and a port will display a continuously updating line chart with network latency, in ms, between the current device and the target host and port | +| Ollama | List models | [134](#134) | Parses the list of models currently in an Ollama deployment | +| OpenAF | Channels | [135](#135) | Copy the json result of a command into an etcd database using OpenAF's channels | +| OpenAF | Channels | [136](#136) | Getting all data stored in an etcd database using OpenAF's channels | +| OpenAF | Channels | [137](#137) | Given a Prometheus database will query for a specific metric (go_memstats_alloc_bytes), during a defined period, every 5 seconds (step) will produce a static chart with the corresponding metric values. | +| OpenAF | Channels | [138](#138) | Perform a query to a metric & label, with a start and end time, to a Prometheus server using OpenAF's channels | +| OpenAF | Channels | [139](#139) | Retrieve all keys stores in a H2 MVStore file using OpenAF's channels | +| OpenAF | Channels | [140](#140) | Store and retrieve data from a Redis database | +| OpenAF | Channels | [141](#141) | Store and retrieve data from a RocksDB database | +| OpenAF | Channels | [142](#142) | Store the json results of a command into a H2 MVStore file using OpenAF's channels | +| OpenAF | Flags | [143](#143) | List the current values of OpenAF/oAFp internal flags | +| OpenAF | Network | [144](#144) | Gets all the DNS host addresses for a provided domain and ensures that the output is always a list | +| OpenAF | Network | [145](#145) | List all MX (mail servers) network addresses from the current DNS server for a hostname using OpenAF | +| OpenAF | Network | [146](#146) | List all network addresses returned from the current DNS server for a hostname using OpenAF | +| OpenAF | OS | [147](#147) | Current OS information visible to OpenAF | +| OpenAF | OS | [148](#148) | Using OpenAF parse the current environment variables | +| OpenAF | OpenVPN | [149](#149) | Using OpenAF code to perform a more complex parsing of the OpenVPN status data running on an OpenVPN container (nmaguiar/openvpn) called 'openvpn' | +| OpenAF | SFTP | [150](#150) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user and password | +| OpenAF | SFTP | [151](#151) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user, private key and password | +| OpenAF | TLS | [152](#152) | List the TLS certificates of a target host with a sorted alternative names using OpenAF | +| OpenAF | oJob.io | [153](#153) | Parses ojob.io/news results into a clickable news title HMTL page. | +| OpenAF | oJob.io | [154](#154) | Retrieves the list of oJob.io's jobs and filters which start by 'ojob.io/news' to display them in a rectangle | +| OpenAF | oPacks | [155](#155) | Listing all currently accessible OpenAF's oPacks | +| OpenAF | oafp | [156](#156) | Filter the OpenAF's oafp examples list by a specific word in the description | +| OpenAF | oafp | [157](#157) | List the OpenAF's oafp examples by category, sub-category and description | +| OpenAF | oafp | [158](#158) | Produce a colored table with all the current oafp input and output formats supported. | +| OpenVPN | List | [159](#159) | When using the container nmaguiar/openvpn it's possible to convert the list of all clients order by expiration/end date | +| Unix | Activity | [160](#160) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity for Debian based Linuxs | +| Unix | Activity | [161](#161) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity for RedHat based Linuxs | +| Unix | Alpine | [162](#162) | List all installed packages in an Alpine system | +| Unix | Ask | [163](#163) | Unix bash script to ask for a path and choose between filetypes to perform an unix find command. | +| Unix | Compute | [164](#164) | Parses the Linux /proc/cpuinfo into an array | +| Unix | Debian/Ubuntu | [165](#165) | List all installed packages in a Debian/Ubuntu system | +| Unix | Envs | [166](#166) | Converts the Linux envs command result into a table of environment variables and corresponding values | +| Unix | Files | [167](#167) | Converting the Linux's /etc/os-release to SQL insert statements. | +| Unix | Files | [168](#168) | Converting the Unix's syslog into a json output. | +| Unix | Files | [169](#169) | Executes a recursive file list find command converting the result into a table. | +| Unix | Files | [170](#170) | Parses the Linux /etc/passwd to a table order by uid and gid. | +| Unix | Generic | [171](#171) | Creates, in unix, a data.ndjson file where each record is formatted from json files in /some/data | +| Unix | Memory map | [172](#172) | Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner | +| Unix | Network | [173](#173) | Loop over the current Linux active network connections | +| Unix | Network | [174](#174) | Parse the Linux 'arp' command output | +| Unix | Network | [175](#175) | Parse the Linux 'ip tcp_metrics' command | +| Unix | Network | [176](#176) | Parse the result of the Linux route command | +| Unix | OpenSuse | [177](#177) | List all installed packages in an OpenSuse system or zypper based system | +| Unix | RedHat | [178](#178) | List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) | +| Unix | Storage | [179](#179) | Converting the Unix's df output | +| Unix | Storage | [180](#180) | Parses the result of the Unix ls command | +| Unix | SystemCtl | [181](#181) | Converting the Unix's systemctl list-timers | +| Unix | SystemCtl | [182](#182) | Converting the Unix's systemctl list-units | +| Unix | SystemCtl | [183](#183) | Converting the Unix's systemctl list-units into an overview table | +| Unix | UBI | [184](#184) | List all installed packages in an UBI system | +| Unix | named | [185](#185) | Converts a Linux's named log, for client queries, into a CSV | +| Unix | strace | [186](#186) | Given a strace unix command will produce a summary table of the system calls invoked including a small line chart of the percentage of time of each. | +| Windows | Network | [187](#187) | Output a table with the current route table using Windows' PowerShell | +| Windows | Network | [188](#188) | Output a table with the list of network interfaces using Windows' PowerShell | +| Windows | PnP | [189](#189) | Output a table with USB/PnP devices using Windows' PowerShell | +| Windows | Storage | [190](#190) | Output a table with the attached disk information using Windows' PowerShell | +| XML | Maven | [191](#191) | Given a Maven pom.xml parses the XML content to a colored table ordering by the fields groupId and artifactId. | ## 📗 Examples @@ -1003,6 +1006,14 @@ oafp url="https://emojihub.yurace.pro/api/all" path="[].{category:category,group --- ##### 86 +### 📖 Generic | HTML +Given an input file, in a specific language (e.g. yaml, json, bash, etc...), output an HTML representation with syntax highlighting. +```bash +OUT=yaml && FILE=data.yaml && oafp file=$FILE in=raw outkey=data out=json | oafp out=template templatetmpl=true template="\`\`\`$OUT\n{{{data}}}\n\`\`\`" | oafp in=md out=html +``` +--- + +##### 87 ### 📖 Generic | Hex Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. ```bash @@ -1010,7 +1021,25 @@ oafp some.file in=rawhex inrawhexline=15 out=ctable ``` --- -##### 87 +##### 88 +### 📖 Generic | JWT +Generates an output JWT (JSON Web Token) given the provided input claims signed with a provided secret. +```bash +oafp data="(claims: (c1: a1, c2: a2))" out=jwt jwtsecret=this_is_my_own_very_long_signature +# you can check it adding "| oafp in=jwt" +# you can also verify the signature adding instead "| oafp in=jwt injwtsecret=this_is_my_own_very_long_signature injwtverify=true" which will add a __verified boolean field. +``` +--- + +##### 89 +### 📖 Generic | JWT +Given an input JWT (JSON Web Token) converts it to a human readable format. +```bash +echo "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" | oafp in=jwt +``` +--- + +##### 90 ### 📖 Generic | List files After listing all files and folders recursively producing a count table by file extension. ```bash @@ -1018,7 +1047,7 @@ FPATH="git/ojob.io" && oafp in=ls lsrecursive=true data="$FPATH" path="[].insert ``` --- -##### 88 +##### 91 ### 📖 Generic | RSS Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. ```bash @@ -1026,7 +1055,7 @@ RSS="https://news.google.com/rss" && oafp url="$RSS" path="rss.channel.item[].{t ``` --- -##### 89 +##### 92 ### 📖 Generic | RSS Example of generating a HTML list of titles, links and publication dates from a RSS feed ```bash @@ -1034,7 +1063,7 @@ oafp url="https://blog.google/rss" path="rss.channel.item" sql="select title, li ``` --- -##### 90 +##### 93 ### 📖 Generic | RSS Generates a HTML page with the current news from Google News, order by date, and opens a browser with it. ```bash @@ -1042,7 +1071,7 @@ oafp url="https://news.google.com/rss" path="rss.channel.item[].{title:title,lin ``` --- -##### 91 +##### 94 ### 📖 Generic | RSS Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser ```bash @@ -1050,7 +1079,7 @@ RSS="http://rss.slashdot.org/Slashdot/slashdot" && oafp url="$RSS" path="RDF.ite ``` --- -##### 92 +##### 95 ### 📖 Generic | Set Given two json files, with arrays of component versions, generate a table with the difference on one of the sides. ```bash @@ -1058,7 +1087,7 @@ oafp data="[(file: versions-latest.json)|(file: versions-build.json)]" in=oafp s ``` --- -##### 93 +##### 96 ### 📖 Generic | Set Given two json files, with arrays of component versions, generate a table with the union of the two sides. ```bash @@ -1066,7 +1095,7 @@ oafp data="[(file: versions-latest.json)|(file: versions-build.json)]" in=oafp s ``` --- -##### 94 +##### 97 ### 📖 Generic | Template Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. ```bash @@ -1074,7 +1103,7 @@ MEAL="Pizza" && echo "# {{strMeal}}\n> {{strCategory}} | {{strArea}}\n data.ndjson ``` --- -##### 169 +##### 172 ### 📖 Unix | Memory map Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner ```bash @@ -1702,7 +1731,7 @@ pmap 12345 | sed '1d;$d' | oafp in=lines linesjoin=true path="[].split_re(@, '\\ ``` --- -##### 170 +##### 173 ### 📖 Unix | Network Loop over the current Linux active network connections ```bash @@ -1710,7 +1739,7 @@ oafp cmd="netstat -tun | sed \"1d\"" in=lines linesvisual=true linesjoin=true li ``` --- -##### 171 +##### 174 ### 📖 Unix | Network Parse the Linux 'arp' command output ```bash @@ -1718,7 +1747,7 @@ arp | oafp in=lines linesvisual=true linesjoin=true out=ctable ``` --- -##### 172 +##### 175 ### 📖 Unix | Network Parse the Linux 'ip tcp_metrics' command ```bash @@ -1726,7 +1755,7 @@ ip tcp_metrics | sed 's/^/target: /g' | sed 's/$/\n\n---\n/g' | sed 's/ \([a-z]* ``` --- -##### 173 +##### 176 ### 📖 Unix | Network Parse the result of the Linux route command ```bash @@ -1734,7 +1763,7 @@ route | sed "1d" | oafp in=lines linesjoin=true linesvisual=true linesvisualsepr ``` --- -##### 174 +##### 177 ### 📖 Unix | OpenSuse List all installed packages in an OpenSuse system or zypper based system ```bash @@ -1742,7 +1771,7 @@ zypper se -is | egrep "^i" | oafp in=lines linesjoin=true path="[].split(@,'|'). ``` --- -##### 175 +##### 178 ### 📖 Unix | RedHat List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) ```bash @@ -1750,7 +1779,7 @@ rpm -qa --qf "%{NAME}|%{VERSION}|%{PACKAGER}|%{VENDOR}|%{ARCH}\n" | oafp in=line ``` --- -##### 176 +##### 179 ### 📖 Unix | Storage Converting the Unix's df output ```bash @@ -1758,7 +1787,7 @@ df --output=target,fstype,size,used,avail,pcent | tail -n +2 | oafp in=lines lin ``` --- -##### 177 +##### 180 ### 📖 Unix | Storage Parses the result of the Unix ls command ```bash @@ -1766,7 +1795,7 @@ ls -lad --time-style="+%Y-%m-%d %H:%M" * | oafp in=lines path="map(&split_re(@,' ``` --- -##### 178 +##### 181 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-timers ```bash @@ -1774,7 +1803,7 @@ systemctl list-timers | head -n -3 | oafp in=lines linesvisual=true linesjoin=tr ``` --- -##### 179 +##### 182 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-units ```bash @@ -1782,7 +1811,7 @@ systemctl list-units | head -n -6 | oafp in=lines linesvisual=true linesjoin=tru ``` --- -##### 180 +##### 183 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-units into an overview table ```bash @@ -1790,7 +1819,7 @@ systemctl list-units | head -n -6 | oafp in=lines linesvisual=true linesjoin=tru ``` --- -##### 181 +##### 184 ### 📖 Unix | UBI List all installed packages in an UBI system ```bash @@ -1798,7 +1827,7 @@ microdnf repoquery --setopt=cachedir=/tmp --installed | oafp in=lines linesjoin= ``` --- -##### 182 +##### 185 ### 📖 Unix | named Converts a Linux's named log, for client queries, into a CSV ```bash @@ -1806,7 +1835,7 @@ cat named.log | oafp in=lines linesjoin=true path="[?contains(@,' client ')==\`t ``` --- -##### 183 +##### 186 ### 📖 Unix | strace Given a strace unix command will produce a summary table of the system calls invoked including a small line chart of the percentage of time of each. ```bash @@ -1814,7 +1843,7 @@ strace -c -o '!oafp in=lines linesvisual=true linesjoin=true opath="[1:-2].merge ``` --- -##### 184 +##### 187 ### 📖 Windows | Network Output a table with the current route table using Windows' PowerShell ```bash @@ -1822,7 +1851,7 @@ Get-NetRoute | ConvertTo-Json | .\oafp.bat path="[].{destination:DestinationPref ``` --- -##### 185 +##### 188 ### 📖 Windows | Network Output a table with the list of network interfaces using Windows' PowerShell ```bash @@ -1830,7 +1859,7 @@ Get-NetIPAddress | ConvertTo-Json | .\oafp.bat path="[].{ipAddress:IPAddress,pre ``` --- -##### 186 +##### 189 ### 📖 Windows | PnP Output a table with USB/PnP devices using Windows' PowerShell ```bash @@ -1838,7 +1867,7 @@ Get-PnpDevice -PresentOnly | ConvertTo-Csv -NoTypeInformation | .\oafp.bat in=cs ``` --- -##### 187 +##### 190 ### 📖 Windows | Storage Output a table with the attached disk information using Windows' PowerShell ```bash @@ -1846,7 +1875,7 @@ Get-Disk | ConvertTo-Csv -NoTypeInformation | .\oafp.bat in=csv path="[].{id:tri ``` --- -##### 188 +##### 191 ### 📖 XML | Maven Given a Maven pom.xml parses the XML content to a colored table ordering by the fields groupId and artifactId. ```bash