From b412e44c623de58838392633345d2e245e4e93ea Mon Sep 17 00:00:00 2001 From: piccihud Date: Sun, 18 Jun 2023 17:22:52 +0200 Subject: [PATCH] added tgpt.md and ddgr.md --- linux/cli/chatgpt.md | 41 +++++++++++++++ linux/cli/ddg.md | 122 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 linux/cli/chatgpt.md create mode 100644 linux/cli/ddg.md diff --git a/linux/cli/chatgpt.md b/linux/cli/chatgpt.md new file mode 100644 index 0000000..f1f69b9 --- /dev/null +++ b/linux/cli/chatgpt.md @@ -0,0 +1,41 @@ +# tgpt + +`tgpt` è uno programma cli multipiattaforma che consente di utilizzare ChatG +PT 3.5 senza API KEY. + +## Installazione e aggiornamento + +```bash +curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash -s /usr/local/bin +``` + +## Sintassi + +```bash +> tgpt -h + +Usage: tgpt [Flag] [Prompt] + +Flags: +-s, --shell Generate and Execute shell commands. (Experimental) +-c, --code Generate Code. (Experimental) + +Options: +-f, --forget Forget Chat ID +-v, --version Print version +-h, --help Print help message +-i, --interactive Start normal interactive mode +-m, --multiline Start multi-line interactive mode +-cl, --changelog See changelog of versions +-u, --update Update program + +Examples: +tgpt "What is internet?" +tgpt -f +tgpt -m +tgpt -s "How to update my system?" +``` + +## Collegamenti + +- [https://github.com/aandrew-me/tgpt](https://github.com/aandrew-me/tgpt) diff --git a/linux/cli/ddg.md b/linux/cli/ddg.md new file mode 100644 index 0000000..28c9c29 --- /dev/null +++ b/linux/cli/ddg.md @@ -0,0 +1,122 @@ +# ddgr + +Si tratta di un utility da linea di comando per ricercare su DuckDuckgo. + +## Installazione + +```bash +cd +mkdir git/ +cd git/ + +git clone https://github.com/jarun/ddgr.git + +cd ddgr/ +sudo make install +``` + +## Sintassi + +```bash +usage: ddgr [-h] [-n N] [-r REG] [--colorize [{auto,always,never}]] [-C] + [--colors COLORS] [-j] [-t SPAN] [-w SITE] [-x] [-p URI] + [--unsafe] [--noua] [--json] [--gb] [--np] [--url-handler UTIL] + [--show-browser-logs] [-v] [-d] + [KEYWORD [KEYWORD ...]] + +DuckDuckGo from the terminal. + +positional arguments: + KEYWORD search keywords + +optional arguments: + -h, --help show this help message and exit + -n N, --num N show N (0<=N<=25) results per page (default 10); N=0 + shows actual number of results fetched per page + -r REG, --reg REG region-specific search e.g. 'us-en' for US (default); + visit https://duckduckgo.com/params + --colorize [{auto,always,never}] + whether to colorize output; defaults to 'auto', which + enables color when stdout is a tty device; using + --colorize without an argument is equivalent to + --colorize=always + -C, --nocolor equivalent to --colorize=never + --colors COLORS set output colors (see man page for details) + -j, --ducky open the first result in a web browser; implies --np + -t SPAN, --time SPAN time limit search [d (1 day), w (1 wk), m (1 month), y (1 year)] + -w SITE, --site SITE search sites using DuckDuckGo + -x, --expand Show complete url in search results + -p URI, --proxy URI tunnel traffic through an HTTPS proxy; URI format: + [http[s]://][user:pwd@]host[:port] + --unsafe disable safe search + --noua disable user agent + --json output in JSON format; implies --np + --gb, --gui-browser open a bang directly in gui browser + --np, --noprompt perform search and exit, do not prompt + --rev, --reverse list entries in reversed order + --url-handler UTIL custom script or cli utility to open results + --show-browser-logs do not suppress browser output (stdout and stderr) + -v, --version show program's version number and exit + -d, --debug enable debugging + +omniprompt keys: + n, p, f fetch the next, prev or first set of search results + index open the result corresponding to index in browser + o [index|range|a ...] open space-separated result indices, ranges or all + O [index|range|a ...] like key 'o', but try to open in a GUI browser + d keywords new DDG search for 'keywords' with original options + should be used to search omniprompt keys and indices + x toggle url expansion + c index copy url to clipboard + q, ^D, double Enter exit ddgr + ? show omniprompt help + * other inputs are considered as new search keywords +``` + +## Configurazione + +Alias per la ricerca in italiano: + +```bash +alias dd='ddgr --colorize always --reg it-it' +``` + +## Utilizzo + +```bash +> dd Wikipedia Linux + + 1. Linux [it.wikipedia.org] + GNU/Linux, comunemente noto come Linux, è una famiglia di sistemi operativi liberi e open source di tipo + Unix-like, pubblicati in varie distribuzioni, aventi la caratteristica comune di utilizzare come nucleo il + kernel Linux: oggi molte importanti società nel campo dell'informatica come: Google, Microsoft, Amazon, IBM, + Oracle, Hewlett-Packard ... + + 2. Linux [en.wikipedia.org] + Linux (/ ˈ l iː n ʊ k s / LEE-nuuks or / ˈ l ɪ n ʊ k s / LIN-uuks) is a family of open-source Unix-like + operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, + by Linus Torvalds. Linux is typically packaged as a Linux distribution, which includes the kernel and + supporting system software and libraries, many of which are provided by ... + + 3. Distribuzione Linux [it.wikipedia.org] + Una distribuzione Linux, in informatica, è una distribuzione software di un sistema operativo realizzato a + partire dal kernel Linux, un sistema di base GNU e solitamente anche diversi altri applicativi. Tali + distribuzioni appartengono quindi alla sottofamiglia dei sistemi operativi GNU e, più in generale, alla + famiglia dei sistemi ... +``` + +Premere il numero corrispondente per aprire il collegamento nel browser predefinito dal sistema. + +### bang + +```bash +> ddgr \!amazonit emacs manuale +``` + +e viene immediatamente aperta la rispettiva ricerca nel browser. Per la lista completa delle `bangs`: + +[https://duckduckgo.com/bangs](https://duckduckgo.com/bangs) + +## Collegamenti + +- [https://github.com/jarun/ddgr](https://github.com/jarun/ddgr)