Skip to content

cjlee112/reusabletext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is ReusableText?

ReusableText is a minor but very useful extension of reStructuredText (reST), the easy-to-use plain-text markup format. It extends reST's well-defined (but almost never used) metadata to provide powerful ways of re-using your text, as a "database" of content that you can select from and compile desired outputs at will. It does this in two basic ways:

  • metadata tags and blocks: while reST defines a format for inserting metadata in a document, it defines no way of using those metadata. ReusableText lets you define some metadata as blocks of text (a multiline block defined by indentation, as usual in reST), and treats the rest as tags (a single line key-value pair). These metadata are bound to their enclosing object (either a reST section or a ReusableText block). Note that ReusableText blocks can be nested. Blocks and sections are typically given unique identifiers for selecting them.
  • selection and template-based re-formatting: ReusableText introduces a new directive select which allows you to insert any selection of blocks and selections (via their unique IDs) at any point in a ReusableText document. Moreover, you can create any output you want out of those selected blocks, using customizable templates.

About

ReusableText: a preprocessor for tagging and selectively re-using a database of reStructuredText

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages