HOME

TheInfoList



OR:

Leo (Leonine Editor with Outlines) is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
text editor A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be u ...
/
outliner An outliner (or outline processor) is a specialized type of text editor (word processor) used to create and edit outlines, which are text files which have a tree structure, for organization. Textual information is contained in discrete sections c ...
that features clones (virtual copies of outline nodes) as a central tool of organization, navigation, customization and scripting.


Languages

Leo can manipulate text or code in any human or computer programming language (e.g., Python, C, C++, Java), as Leo is a language-independent or "adaptable LPE" (
literate programming Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of its logic in a natural language, such as English, interspersed (embedded) with snippets of macros and t ...
environment). Table 2: "Some Adaptable LPEs", p. 113. Same authors' abridged version in book form: Table 2: "Some Language Independent LPEs", p. 251 Syntax highlighting is provided for many different programming languages. Leo is written in Python and can be extended with plugins written in Python. The GUI uses the Qt toolkit; the syntax-aware editor is based on
Scintilla Scintilla (the Italian and Latin word for spark) may refer to: *Scintilla AG, a Swiss electrical engineering company, a 100 percent subsidiary of Robert Bosch GmbH since 2005 * Scintilla (comics), a fictional character in the Marvel Universe *S ...
. Leo outlines are stored as
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
files.


Trees, clones and views

Leo's foremost functionality, in addition to text editing, is that of an
outliner An outliner (or outline processor) is a specialized type of text editor (word processor) used to create and edit outlines, which are text files which have a tree structure, for organization. Textual information is contained in discrete sections c ...
, with a "vast range of convenience features for structuring and managing outlines" both by drag-and-drop via GUI and by keyboard commands. Leo discussed on pp. 12-13 of author's copy of published article. Leo's outline pane shows a
tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
of data nodes. Nodes contain headlines, body text, and other information. Headlines naturally serve as descriptions of the body text. For example, @file nodes are nodes whose headline starts with @file. Leo trees are in fact
directed acyclic graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one v ...
s; nodes may have more than one parent. Leo calls such nodes clones. Clones appear in several places in the outline pane. Views are simply nodes whose children contain clones. A single outline may contain arbitrarily many views of the nodes contained therein.


External files

@file nodes represent external files, files on the computer's file system other than the outline file. When saving an outline Leo automatically writes all changed @file trees back to the external files. Comments, called sentinel lines, in external files represent the outline structure. When Leo reads an outline, these comments allow Leo to recreate @file trees using only the data in the external file. @auto nodes represent external files without using sentinel comments. When reading @auto nodes, Leo uses the program structure of the external file to create the @auto tree.


Scripting

Leo's outline or hierarchical structure is distinct from the web of interleaved program and documentation "chunks" associated with classic
literate programming Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of its logic in a natural language, such as English, interspersed (embedded) with snippets of macros and t ...
tools. (p. 1009)Compares early version of LEO with
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer ...
's
WEB Web most often refers to: * Spider web, a silken structure created by the animal * World Wide Web or the Web, an Internet-based hypertext system Web, WEB, or the Web may also refer to: Computing * WEB, a literate programming system created b ...
.
The body text of any Leo node may contain a Leo script, a Python script executed in the context of a Leo outline. A simple
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
gives Leo scripts full access to all data in loaded outlines, as well as full access to Leo's own source code. The API includes Python
iterators In computer programming, an iterator is an object that enables a programmer to traverse a container, particularly lists. Various types of iterators are often provided via a container's interface. Though the interface and semantics of a given itera ...
that allow scripts to traverse outlines easily. Scripts may be composed of any tree of nodes. A
markup language Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
similar to
noweb Noweb, stylised in lowercase as noweb, is a literate programming tool, created in 1989–1999 by Norman Ramsey, and designed to be simple, easily extensible and language independent. As in WEB and CWEB, the main components of Noweb are two pro ...
tells Leo how to create scripts from (parts of) an outline. Headlines control and guide scripts. Examples are: *@test nodes create unit tests. Leo executes the body of an @test node as a unit test, without the body having to create an explicit subclass of Python's UnitTest.TestCase class. *@button nodes create user-defined commands. Leo executes the script of an @button node in the context of any other outline node.


References


External links

* * * * *, Leo's host for binary downloads of stable releases * *{{cite web , author=James Tauber , title=Using the Leo Outliner as a PIM , date=2004-05-15 , url=http://jtauber.com/blog/2004/05/15/using_the_leo_outliner_as_a_pim/ , author-link=James Tauber Outliners Literate programming Free software programmed in Python Free text editors Code navigation tools Software that uses Qt Software that uses Scintilla Software using the MIT license