Skip to content

porras/includer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Includer Build Status

The Includer is an easy way to include files into another files, like we are used to do when programming (every language has its own variation of load, require, import, etc.) or in the web (Apache's SSI, PHP's include, Rails' render :partial, etc.) but with any kind of file, under any circunstance.

I use it to split large markdown files, but there are many potential uses (large CSV datasets, or configuration files, for instance). If you do something cool that's worth to be noted in this README, let me know ;-)

Installation

gem install includer

Usage

For a file to include another, you just have to write the following:

{{path/to/file.ext}}

For example, this could be the markdown source for this README.md file (it really isn't ;-) ):

# The Includer

{{intro.md}}
{{install.md}}
{{usage.md}}
{{copyright.md}}

This can be done recursively: included files can include more files. Try infinite loops at your own risk. I mean, don't try them ;-)

Then, just run The Includer:

$ includer input.txt output.txt

If you omit the output file, it will write to the standard output.

Copyright & Licensing

Copyright (c) 2010-2013 Sergio Gil. MIT license, see LICENSE for details.

About

Easy way to include files into another files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages