{"id":18878248,"url":"https://github.com/uriel1998/showdocs-wombat","last_synced_at":"2026-02-19T09:30:16.434Z","repository":{"id":23828525,"uuid":"27205554","full_name":"uriel1998/showdocs-wombat","owner":"uriel1998","description":"The only document-focused mailcap style utility with a wombat mascot.  ","archived":false,"fork":false,"pushed_at":"2024-02-27T04:57:15.000Z","size":326,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T02:29:04.233Z","etag":null,"topics":["command-line","csv","documents","mailcap","tmux","viewer"],"latest_commit_sha":null,"homepage":"http://uriel1998.github.io/showdocs-wombat/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uriel1998.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-27T02:27:25.000Z","updated_at":"2023-01-03T08:02:01.000Z","dependencies_parsed_at":"2024-11-08T06:37:11.630Z","dependency_job_id":null,"html_url":"https://github.com/uriel1998/showdocs-wombat","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Fshowdocs-wombat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Fshowdocs-wombat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Fshowdocs-wombat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Fshowdocs-wombat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uriel1998","download_url":"https://codeload.github.com/uriel1998/showdocs-wombat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239841719,"owners_count":19705978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","csv","documents","mailcap","tmux","viewer"],"created_at":"2024-11-08T06:25:23.272Z","updated_at":"2026-02-19T09:30:16.399Z","avatar_url":"https://github.com/uriel1998.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# showdocs-wombat\n\nThe only cli document viewer with a wombat in a sombrero as a mascot.\n\n![showdocs logo](https://raw.githubusercontent.com/uriel1998/showdocs-wombat/master/showdocs-wombat-open-graph.png \"logo\")\n\n![mascot](https://github.com/uriel1998/showdocs-wombat/raw/master/128_senor_wombat.png \"mascot\")\n\nDemo on YouTube:  \n\n[![Demo](https://img.youtube.com/vi/06JgZT1eP0E/0.jpg)](https://www.youtube.com/watch?v=06JgZT1eP0E)\n\n## Contents\n 1. [About](#1-about)\n 2. [Features](#2-features)\n 2. [License](#2-license)\n 3. [Prerequisites](#3-prerequisites)\n 4. [Installation](#4-installation)\n 5. [Usage](#6-usage)\n 6. [TODO](#12-todo)\n\n***\n\n## 1. About\n\nVery simply, this is a document viewer type version that plays a similar role \nas mailcap and other such utilities. Its focus is on displaying documents quickly \nin a terminal (or a popup terminal). \n\nInspiration taken from `mutt.octet.filter` for how to best match mimetypes.\n\n## 2. Features\n\nWhy should you use this instead of another mailcap type solution?\n\n1. As written with the full helper list, it is set up to render Word (DOC \u0026 DOCX), \nExcel (XLS and XLSX), Open/LibreOffice (ODS/ODT), RTF, PDF, markdown, JSON, ANSI/ASCII art, \nHTML, and will pretty much gladly take any text file (XML, etc) and colorize it.\n\n2. If it runs across an undefined filetype, it can pass it on to any *other* mailcap \nstyle program, and is set up to use my fork of gotbletu's [URLPortal](https://github.com/uriel1998/newsbeuter-dangerzone/blob/master/urlportal.sh) by default.\n\n3. It can call and *decorate* its own xterm window if called from a GUI file manager.\n\n4. With [TDAB](https://uriel1998.github.io/tdab/) installed, when called in TMUX it will automatically show the document in a new zoomed pane.\n\n5. It has a wombat in a sombrero as a mascot.\n\nWhy should you **not** use this script?\n\n1. While there's a few \"fallback\" checks if helpers aren't installed, if you want \nto use different helpers to render and display things, you'll have to edit the script \ndirectly.  Which is an issue with *any* mailcap style solution, so...\n\n2. You're happy with what you have. Hey, that's cool! \n\n## 2. License\n\nThis project is licensed under the MIT License. For the full license, see `LICENSE`.\n\n## 3. Prerequisites \n\nThis includes all of the helpers as well; the \"core\" first four are for the \nscript itself and are probably already installed on your system.  Installing all \nthe helpers is obviously not necessary; however, doing so will result in everything \nworking out of the box.\n\n### Apt install\n\nThe following can be installed on Debian Buster or Bullseye (and probably Ubuntu) \nby typing \n\n`sudo apt update;sudo apt-get install fzf awk sed file mysql sqlite3 pandoc lynx wv unrtf pdftotext bat dtrx csvtool gnumeric w3m libfile-mimeinfo-perl ansilove chafa node-iconv`\n\n* fzf  \n* awk  \n* sed  \n* file  \n* lynx  \n* bat  \n* mysql \n* sqlite3 \n* pandoc \n* wvWare \n* unrtf \n* pdftotext \n* dtrx \n* csvtool\n* gnumeric\n* w3m\n* ansilove\n* chafa\n* node-iconv (or another flavor of iconv)\n* mimetype (in libfile-mimeinfo-perl)\n\n### Install via Apt, but check the version.\n\n* [pspg](https://github.com/okbob/pspg) - A tish more work needs to be done with pspg - you need version 3.1.4 or up, which is in [Debian Bullseye](https://packages.debian.org/source/bullseye/pspg).  \n\n### Via pip\n\nThese can be installed (if you have [python and pip](https://duckduckgo.com/?t=ffab\u0026q=how+to+install+python+and+pip\u0026ia=web) installed, naturally) by typing:\n\n`pip3 install -r requirements.txt` \n\n`pip3 install git+https://github.com/wustho/epy`\n\n* csvkit (provides in2csv )\n* xlsx2csv\n* [tabview](https://github.com/TabViewer/gtabview)  \n* [epy](https://github.com/wustho/epy)  \n* [gif-for-cli](http://www.commandlinefu.com/commands/view/26731/quickly-run-any-gif-as-a-ascii-animation-in-a-terminal-window)\n\n\n### Via npm\n\nThis is *really* optional as an alternative to using `chafa`. \n\n[terminal-image-cli](https://github.com/sindresorhus/terminal-image-cli) can be installed to use instead of chafa (if you have [node and npm installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), naturally) by typing:\n\n`npm install --global terminal-image-cli`\n\nThese are *really* optional, but are nice:\n\n* wmctrl - `sudo apt install wmctrl`  \n* [xseticon](https://sourceforge.net/projects/xseticon/)  \n* [devour - from TDAB](https://uriel1998.github.io/tdab/)  \n* [URLPortal - from newsbeuter-dangerzone](https://github.com/uriel1998/newsbeuter-dangerzone/blob/master/urlportal.sh) - note, this is now included in this repository as well.\n\n## 4. Installation\n\nClone or download the repo. If you downloaded it, unarchive it into a \ndirectory, then make a symlink into your path.  Place `lynx.lss` in `$HOME/.lynx\n\nExamine `showdocs.sh` to determine if the \"helpers\" I use are the ones you wish \nto use. \n\n## 5. Usage\n\nThe most basic usage is to invoke \n\n`showdocs.sh [FILENAME]`\n\nThe program can handle *most* unescaped filenames - see the demo - but some special \ncharacters (such as #) must still be escaped, like so:\n\n`showdocs.sh \"[FILENAME]\"`\n\nOccasionally a different viewer is invoked - such as when the `devour` function \nis used inside `tmux`.  That is usually for aesthetic reasons (such as line wrapping).\n\n### Viewing MySQL\n\nTo invoke the MySQL viewer, the command should be:\n\n`showdocs.sh mysql [MYSQL USERNAME] [MYSQL PASSWORD]`\n\n### From TMUX\n\nIf you invoke it under tmux and have [TDAB](https://uriel1998.github.io/tdab) \ninstalled, the `devour` script will automatically be invoked, creating a new \nmaximized pane with your document in it.\n\n### From a GUI File Manager\n\nThe old way of calling this script from a GUI viewer (such as [Double Commander](https://doublecmd.sourceforge.io/)\nwhich spawned a new window was something like: \n\n`xfce4-terminal --hide-menubar --geometry=80x43 -e \"/home/steven/bin/showdocs %f\"`\n\nThat will still work, but you can simplify (and enhance) the experience by using \nthe -g switch, making the command something like this:\n\n`/home/steven/bin/showdocs -g %f`\n\nNot only will it launch a new xterm, but if you have `wmctrl` and `xseticon` set, \nit will decorate the window with the script's icon and name.\n\n### Drop-in with URLPortal\n\nIf you would like to streamline and consolidate your mailcap style experience, \nyou can use `showdocs` in place of your regular mailcap file. \n\nIf offered an URL, `showdocs` will follow any redirection (if [muna](https://uriel1998.github.io/muna/) \nis installed and in your $PATH). If there's a filename with extension already there, \nit will grab it and process the file locally (using URLPortal if needed).  If there is *not* a \nfile extension specified on the URL, it will download the file, then use `mimeinfo` to \ntry to figure out what it is, rename it appropriately, and process it locally (using \nURLPortal if needed).\n\nThis means that you can pass filenames *or* URLs straight to showdocs and use the \nsame flow.  \n\nI'm sure I've missed some major mimetypes that are odd (like how \"vnd.ms-asf\" is a \nmimetype for WMV files), please let me know what I've missed!\n\n### Colorizing Output\n\nIf you wish to colorize your output - particularly of sourcecode - you should \nuse `.lessfilter`.  There's a good tutorial at [Miskatonic.org](https://www.miskatonic.org/2020/06/24/lessfilter/).\n\n### Other File Types\n\nIf it cannot find a match, and you have the URLPortal script from [newsbeuter-dangerzone](https://uriel1998.github.io/newsbeuter-dangerzone/) in $PATH - \nsee [this file](https://github.com/uriel1998/newsbeuter-dangerzone/blob/master/urlportal.sh) if you don't \ncare about the rest of the repository - it will then hand everything off to that \nprogram.  In that way, it can handle a lot of other datatypes as well without \ngetting too complicated.  Feel free to substitute your own \"mailcap\" style \nsolution instead.\n\n## 6. TODO\n\n* View the files in the archive, not just the list of the files IN the archive\n* Further set up database viewing for postgres\n* installation example for midnight commander\n\ndtrx\nsqlite3\npandoc\nwvWare\nsed\npspg\nbat\nunrtf\npandoc\npdfimages\nconvert\npdftotext\nssconvert\nsoffice\ntabview\nin2csv\ncsvtool\nxlsx2csv\ngnumeric\nepy\ncat\nansilove\nfeh\niconv\nchafa\nffmpeg\nfzf\nxseticon\nwmctrl\ngif-for-cli \n\n\n\nIn Midnight Commander go to Options menu / Configuration... command / Use internal edit checkbox and uncheck it. (Don't forget to execute the Save setup command if the Auto save setup option is off.)\n\nThen set the EDITOR environment variable to Sublime. You may prefer to add one of these to your shell's resource file:\n\n    Global setting for all programs that use EDITOR (not recommended):\n\n    EDITOR=sublime\n    export EDITOR\n\n    Temporary setting for the given Midnight Commander session only:\n\n    alias mc='EDITOR=sublime mc'\n\nSame for the viewer, just you uncheck the Use internal view option and set the VIEWER environment variable instead.\n\n\nOkay, previewing is NOT working at all like I want it to with lf or mc. grumble.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furiel1998%2Fshowdocs-wombat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furiel1998%2Fshowdocs-wombat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furiel1998%2Fshowdocs-wombat/lists"}