HOME

TheInfoList



OR:

Leo is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
text editor A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
/
outliner An outliner (or outline processor) is a specialized type of text editor (word processor) used to create and edit Outline (list), outlines, which are text files which have a tree structure or a tree view, for organization. Textual information is co ...
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 (LP) is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macr ...
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 Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
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 data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
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 Outline (list), outlines, which are text files which have a tree structure or a tree view, for organization. Textual information is co ...
, 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, e.g., including only woody plants with secondary growth, only ...
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 ...
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 and @clean 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. When reading @clean nodes, Leo uses the structure of the ''outline'' to create the @clean 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 (LP) is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macr ...
tools. (p. 1009)Compares early version of LEO with
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist and mathematician. He is a professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of comp ...
'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 by ...
.
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 connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
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 (computing), object that progressively provides access to each item of a Collection (abstract data type), collection, in order. A collection may provide multiple iterators via its Interface (objec ...
that allow scripts to traverse outlines easily. Scripts may be composed of any tree of nodes. A
markup language A markup language is a Encoding, text-encoding system which specifies the structure and formatting of a document and potentially the relationships among its parts. Markup can control the display of a document or enrich its content to facilitate au ...
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 prog ...
tells Leo how to create scripts from (parts of) an outline. Headlines control and guide scripts. For example, @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

* * * * * * *{{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