Echomail in Fidonet: generator of headers.
npm install efgh
efgh) is a generator of HTML5 representations of headers for Fidonet echomail messages.
npm install efgh
npm install https://github.com/Mithgol/efgh/tarball/master
README because the package's version is not planned to grow after changes when they happen in README only. (And npm publish --force is forbidden nowadays.)
require() the installed module, an object is returned.
sync property represents the synchronous interface. An asynchronous interface is planned, but not (yet) implemented.
require() the installed module, an object is returned. Its sync property represents the synchronous interface.
nodelist — by default, false. It may also contain an object constructed by the constructor returned from the Fidonet nodelist module. In the latter case, the Fidonet nodelist is used to determine the physical location (town, suburb, city, etc.) of the message's sender (using the Fidonet address); that location is displayed in the header.
avatarWidth — width (in CSS pixels) of an avatar of the message's author (or of a default avatar). By default, 140. This value does not have to be equal to the avatar's width in physical pixels (for example, where window.devicePixelRatio != 1 in your client-side code).
avatarURL — URL of the avatar (i.e. of the picture).
from — the sender's name.
origAddr — the sender's address.
to — the recipient's name.
origTime — the time when the message was written. Either a string or an array of year, month, day, hour, minute, second.
procTime — the time when the message was processed by an echoprocessor. Either a string or an array of year, month, day, hour, minute, second.
undefined value if you prefer the headers of the same Fidonet message to be exactly the same on different Fidonet systems (i.e. to not depend on the processing's time). For example, it helps to prevent redundant copies of the message in a global content-addressable storage (such as IPFS).
subj — the message's subject line.
URL — FGHI URL of the message.
messageHTML — by default, false. It means that the HTML5 table is closed by its closing tag ().
messageHTML === true, the header (HTML5 ) is not completed and thus the returned string ends with open tr and td elements; the message's main text (in HTML) can be added after those elements and ended with
to end the table. The td element is given the class messageText.
messageHTML can be a JavaScript string containing the message's main text (in HTML). In such case the string returned from .sync() contains the whole message (not only the header as an HTML table, but also the main text in the last row of the same HTML table).
inverse — this class is assigned to individual headers (From, To, Subj, FGHI URL) and provides an inverted look (white text on dark background)
avatar — this class is assigned to the TH element of the avatar (user's picture) and ensures its proper display (for example, background-size: contain).
styles/efgh.css. Users of EFGH are expected to reference that file or include it in their CSS.
require('efgh').pathCSS() returns path.join(__dirname, 'styles', 'efgh.css') (in other words, the full path to the efgh.css file).
description elements of RSS items).
npm install mocha -g) or locally (npm install mocha in the directory of EFGH).
npm install jshint -g) or locally (npm install jshint in the directory of EFGH).
npm test (in the directory of EFGH).
LICENSE file).