X

Polygot emitters in action

Converting

Blue-phrase can be used to represent many structured languages, and instant conversion is possible with the dedicated emitters that are built into the blue-processor.

Emitting markup

The blue-processor emits HTML by default, but this can be overridden by specifying the --emit option. Consider this prose example and its language counterparts.

h2 Raiders
When Vikings raided and traded along Europe's coasts, the prayer on every churchman's lips was to be spared the wrath of the Norsemen.

h2 Traders
The Vikings obtain goods from the around the world:
ul {
From the Far East: timber, iron, furs, amber, soapstone, whetstones and slaves.
From Arabia: silver, coins, fabrics, spices, silk, fruit and wine.
}
Original blue-phrase

HTML

<h2>Raiders</h2>
<p>When Vikings raided and traded along Europe's coasts, the prayer on every churchman's lips was to be spared the <q>wrath of the Norsemen</q>.</p>
<h2>Traders</h2>
<p>The Vikings obtain goods from the around the world:</p>
<ul>
<li>From the Far East: timber, iron, furs, amber, soapstone, whetstones and slaves.</li>
<li>From Arabia: silver, coins, fabrics, spices, silk, fruit and wine.</li>
</ul>
!option --emit=html

Github Flavored Markdown

## Raiders

When Vikings raided and traded along Europe's coasts, the prayer on every
churchman's lips was to be spared the <q>wrath of the
Norsemen</q>.

## Traders

The Vikings obtain goods from the around the world:

* From the Far East: timber, iron, furs, amber, soapstone, whetstones and slaves.
* From Arabia: silver, coins, fabrics, spices, silk, fruit and wine.
!option --emit=ghfm

Wikitext

## Raiders ##
When Vikings raided and traded along Europe's coasts, the prayer on every churchman's lips was to be spared the <q>wrath of the Norsemen</q>.


## Traders ##
The Vikings obtain goods from the around the world:

* From the Far East: timber, iron, furs, amber, soapstone, whetstones and slaves.
* From Arabia: silver, coins, fabrics, spices, silk, fruit and wine.
!option --emit=wiki

Plain text

Raiders
When Vikings raided and traded along Europe's coasts, the prayer on every churchman's lips was to be spared the wrath of the Norsemen.
Traders
The Vikings obtain goods from the around the world:
From the Far East: timber, iron, furs, amber, soapstone, whetstones and slaves.
From Arabia: silver, coins, fabrics, spices, silk, fruit and wine.
!option --emit=txt

Emitting structured data

The blue-processor can emit structured data in many popular formats. Consider this example with its encoded counterparts.

!option --vocabulary=unchecked

chapter *title=Raiders {
abstract The Wrath of the Norsemen
}
chapter *title=Traders {
abstract Global reach
region *name='Far East' {
product timber
product iron
product furs
product amber
product soapstone
product whetstones
product slaves
}
region *name=Arabia {
product silver
product coins
product fabrics
product spices
product silk
product fruit
product wine
}
}
Original blue-phrase

XML

<chapter title='Raiders'>
<abstract>The Wrath of the Norsemen</abstract>
</chapter>
<chapter title='Traders'>
<abstract>Global reach</abstract>
<region name='Far East'>
<product>timber</product>
<product>iron</product>
<product>furs</product>
<product>amber</product>
<product>soapstone</product>
<product>whetstones</product>
<product>slaves</product>
</region>
<region name='Arabia'>
<product>silver</product>
<product>coins</product>
<product>fabrics</product>
<product>spices</product>
<product>silk</product>
<product>fruit</product>
<product>wine</product>
</region>
</chapter>
!option --emit=xml

JSON

{
"chapter" : {
"attributes" : { "title" : "Raiders" },
"abstract" : "The Wrath of the Norsemen"
},
"chapter" : {
"attributes" : { "title" : "Traders" },
"abstract" : "Global reach",
"region" : {
"attributes" : { "name" : "Far East" },
"product" : "timber",
"product" : "iron",
"product" : "furs",
"product" : "amber",
"product" : "soapstone",
"product" : "whetstones",
"product" : "slaves"
},
"region" : {
"attributes" : { "name" : "Arabia" },
"product" : "silver",
"product" : "coins",
"product" : "fabrics",
"product" : "spices",
"product" : "silk",
"product" : "fruit",
"product" : "wine"
}
}
}
!option --emit=json

Yaml

---
chapter:
attributes: { title: Raiders }
abstract : The Wrath of the Norsemen
chapter:
attributes: { title: Traders }
abstract : Global reach
region:
attributes: { name: Far East }
product : timber
product : iron
product : furs
product : amber
product : soapstone
product : whetstones
product : slaves
region:
attributes: { name: Arabia }
product : silver
product : coins
product : fabrics
product : spices
product : silk
product : fruit
product : wine
...
!option --emit=yaml

INI

[chapter]
title = Raiders
abstract = The Wrath of the Norsemen

[chapter]
title = Traders
abstract = Global reach

[chapter.region]
name = Far East
product = timber
product = iron
product = furs
product = amber
product = soapstone
product = whetstones
product = slaves

[chapter.region]
name = Arabia
product = silver
product = coins
product = fabrics
product = spices
product = silk
product = fruit
product = wine
!option --emit=ini

TOML

[chapter]
attributes = { title = "Raiders" }
abstract = "The Wrath of the Norsemen"
[chapter]
attributes = { title = "Traders" }
abstract = "Global reach"
[chapter.region]
attributes = { name = "Far East" }
product = "timber"
product = "iron"
product = "furs"
product = "amber"
product = "soapstone"
product = "whetstones"
product = "slaves"
[chapter.region]
attributes = { name = "Arabia" }
product = "silver"
product = "coins"
product = "fabrics"
product = "spices"
product = "silk"
product = "fruit"
product = "wine"
!option --emit=toml

Summary

The built-in emitters are:

  • HTML5
  • XHTML 1.1 for ePubs
  • XML 1.0
  • Daring Fireball Markdown
  • Github Flavored Markdown
  • Wikimedia-style wikitext
  • JSON (IETF RFC 8259)
  • HAML 5.0
  • YAML 1.2
  • TOML 0.5
  • Windows INI
  • Apple property list
  • plain text
Further Reading

BLUE-PHRASE Basics Getting started with symbolic endophrasing. Learn how to author documents with many of the commonly used typographic techniques found in word processors, by using BLUE-PHRASE symbolic endophrasing. There are only a few basic rules to learn.

BLUE-PHRASE Essentials A primer for effectively using BLUE-PHRASE. Learn the essentials necessary to effectively use BLUE-PHRASE, and discover techniques to perform commonly occurring tasks with greater ease using shorthand notation.

BLUE-PHRASE + CSS The fundamentals of styling Learn how to style BLUE-PHRASE with Cascading Style Sheets.

BLUE-PHRASE Quick Ref Syntax cheat sheet A quick reference to BLUE-PHRASE syntax.

Related Sites

BLUE-PHRASE HTML templating and blogging. A computer language for solving problems related to reading, writing, and publishing.

RWSERVE Caching HTTP/2 server with dynamic JavaScript plugins. HTTP/2 is all about speed: fewer bytes, reduced latency, longer connections, multiplexing and prioritization.

READ WRITE GROK A different take on a tech blog. Follow along as Tangled Web Services boldly goes where tech has gone before.

Contact Us

Read Write Tools is able to offer free and low-cost software products because it has low overhead and limited staff. We are happy to answer your customer service and technical support questions when our self-service options aren't able to meet your needs.

Many of the most common customer service issues can be resolved without our help. Check the licensing and accounts pages for ways to resolve issues related to registration, customer numbers, passwords and access keys.

Technical support issues can sometimes be resolved using one of the public forums like Stack Overflow, so search for error messages, blue-phrase syntax questions, and technical problems there. For best results include the name of the product in your search, like rwdoc, rwreuse, rwserve, etc.

For problems that you can't resolve yourself, ask for help.

Connections

Twitter @ReadWriteTools Latest announcements from our developer advocate.

Medium @joehonton Using distraction-free tools for better reading, writing and publishing, and loving it!

Copyright

Copyright © 2020 Read Write Tools, All Rights Reserved.

Software Licensing

Read Write Tools Software License Agreement. The ReadWriteView, ReadWriteNote, ReadWriteDoc, and ReadWriteReuse desktop applications; and the ReadWriteServe server software may be used only in conjunction with the purchase of a software license.

BLUE PHRASE Software License Agreement. The Blue-phrase processor and Blue-phrase symbolic endophrasing may be used only in conjunction with the purchase of a software license.

Read Write Tools Open Source Software. Read Write Tools publishes some of its software portfolio under open source licenses, including RWSERVE plugins, web components, CSS style sheets, editor themes, command line build tools, and Node.js libraries. These are covered by two different open source licenses: the MIT license or the Creative Commons CC-BY-NC-ND 4.0 (Attribution-NonCommercial-NoDerivatives 4.0 International). See each individual file or its associated README file to learn which applies.

Privacy Policy

Data We Obtain From You

  • While you are browsing our website, we log all HTTPS requests from your browser and all responses by our servers.
  • Each time you use our software, we verify the authenticity of your license key using the device address of your computer, and the IP address of your computer network. We use this data to prevent piracy, and to block unlicensed use of our software.

Data Retention

  • We store site visitor log data for a minimum of 90 days.
  • We retain your customer number, license keys and purchase history for a minimum of three years.

Obtaining a copy of your data

  • You may login to your account using the customer number we assigned to you, and the password chosen by you, to view and print all of the data we retain about you.

Data sharing

  • When you purchase a license to any of our software products, we forward payment information from you to a PCI DSS compliant payment processing gateway.
  • We do not sell or share any information with third parties for the purpose of marketing.
Refund Policy

Refund Policy Our goal is customer satisfaction. If, in your opinion, we haven't met our goal, we will refund the unused, pro-rated portion of your license fee.

Polygot emitters in action

🔎