Cat Stack

Catenate (or insert) the contents of any file into your web page, like copying or appending or including, or like simple CMS. Any way you cut it, this is useful for adding content.
Overview
Cat Stack icon
Include the contents of a text file, spreadsheet, Markdown, or HTML file into your web page. Control the content of the page using a plain text file! There is no error and no output if the resource file does not exist. Nice and clean. You can specify a URL to pull content from a published page on another site. Now supports sorting and Markdown.

How does it work?
PHP is used to read the remote file and dump its contents.

People ask - why "cat?" From the unix "cat" command to catenate a file (a fancy way to say "look at it's contents!")
  • Cat Stack screen shot
  • Cat Stack screen shot
Customize
Stacks Image 912
The Cat Stack has options for choosing the file or URL to read and display, and whether to format the resulting content using surround HTML tags for pre-formatting, bold, italics, or any other tags or content you like. You can also filter the output by searching for specific lines, skipping initial lines of the file, or limiting the number of lines shown, etc.

Parameters

 
File to readSpecify the file name or URL to catenate. This file may be plain text, HTML, Markdown, or any other format such as CSV.
Treat file as PHP and includeEnable this to include other PHP files instead of their content. If you wish to show the contents of a PHP file, do not enable this.
HTML within <body> onlyScan within <body> and </body> tags to ignore other content of HTML files that can cause problems.
Search stringOptional filtering: only show lines that contain this search string, case sensitive. If this is left blank then all lines from the file/url are shown.
Skip linesSkip the first lines of the file. This may be useful if you want to use this Stack to ignore a file header. A value of zero here means do not skip any lines.
Max inputSet this value to non-zero to set a limit to the number of lines read, after any skipped lines. This may be useful if you want to use this Stack to show a snippet of file content but not the whole file. A value of zero here means no limit.
Parse MarkdownTreat file contents as Markdown and convert to HTML.
Sort inputEnable sorting of input lines, and use the options below to control sorting method, case, and order.
... sort naturallyThe default is regular sorting (a1,a10,a2,b1,b10,b2). Enable this option to sort naturally, as humans (a1,a2,a10,b1,b2,b10).
... sort ignoring caseThe default is to sort considering A/a case, but enabling this will ignore case.
... sort descending orderThe default is to sort from A to Z, but enabling this will reverse the sort order.
Italics <i>Use <i> </i> tags around the content.
Bold <b>Use <b> </b> tags around the content.
Preformatted <pre>Use <pre> </pre> tags around the content, as you might surrounding code etc.
HTML prefixBegin with any HTML code or opening tags like <b><i><em> etc., before the content. If the file does not exist then this prefix is not shown, so this may be used for headings or introduction text. Note: any opening prefix codes here should be closed in the suffix field below in reverse order.
HTML suffixFollow with any HTML code or closing tags like </em></i></b> etc. after the content, if it exists. If the file does not exist this suffix is not shown, so it may also be used for captions below the content. Note: any opening prefix codes in the field above should be closed in reverse order here.
Add line breaks <br />Add <br /> tag to the end of each line read from the file.
Add line numbers Choose the style of line numbering to use or None to disable this feature (the default).
Examples
Check out examples of Cat
Example 1: the content below is a file in the RW resources area, and contains plain text with Markdown. Whenever the resource file changes, any Cat Stack pointing to it will also change!

Markdown Example

This content is from a file containing Markdown.

In a single file you can mix:

  • plain text
  • HTML
  • Markdown
Example 2: the Cat Stack is also useful for dumping the contents of any file, preformatted in this case …
"1","English","Hello"
"1","French","Bonjour"
"1","Spanish","Hola"
"2","English","One"
"2","French","Une"
"2","Spanish","Uno"
Example 3: the Cat Stack can dump another URL file (this is the first 15 lines of Google’s robots.txt file - scrolling courtesy of Joe Workman’s Static Height Stack). This example shows the Search option which is used to filter only the “Allow” lines from the file and disregard the rest, the Sort option which can be used to re-order lines, and the Max output and Line numbering options …
1) Allow: /?gws_rd=ssl$
2) Allow: /?hl=
3) Allow: /?hl=*&gws_rd=ssl$
4) Allow: /?pt1=true$
5) Allow: /books/about
6) Allow: /books?*q=editions:*
7) Allow: /books?*q=related:*
8) Allow: /books?*q=subject:*
9) Allow: /books?*zoom=1*
10) Allow: /books?*zoom=5*
11) Allow: /booksrightsholders
12) Allow: /m/finance
13) Allow: /search/about
14) Allow: /search/howsearchworks
15) Allow: /search/static
Example 4: the Cat Stack is not an iframe, but it can dump another URL file, limiting the content to what is found within body tags …

Sample HTML

This content is from a web page that has html and head sections that must be ignored. This content is inside the body tags and is not ignored. As a web page, content is not limited to text ...


Cat Features

Purchase Cat

  • $5 USD via PayPal
  • Immediate download *