Still missing most of the content.
|
@ -1,6 +1,7 @@
|
|||
*~
|
||||
*#*#
|
||||
*.#*
|
||||
*.py[co]
|
||||
.cache/
|
||||
/.old/
|
||||
/.local/
|
||||
|
@ -12,4 +13,5 @@ log.mege
|
|||
.finallog.mege
|
||||
apache-config
|
||||
.debug
|
||||
/mege/
|
||||
/mege
|
||||
.test.org
|
||||
|
|
|
@ -1,4 +1,37 @@
|
|||
# macros
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
# Ugly hack for local installations
|
||||
htmlgen = sys.modules['mege.htmlgen']
|
||||
htmlfunc = sys.modules['mege.htmlfunc']
|
||||
import mege.git as git
|
||||
import mege.misc as misc
|
||||
|
||||
|
||||
def download_prog(root, fname):
|
||||
return ''
|
||||
|
||||
def list_pages(pathdir):
|
||||
dl = htmlfunc.DefList()
|
||||
fs = [(os.path.join(pathdir, f), f) for f in filter(
|
||||
lambda f: f.endswith('.org') and f != 'index.org',
|
||||
os.listdir(pathdir))]
|
||||
fs.sort(key=lambda pf: git.rr.get_last_modified_date(pf[0])[0] or
|
||||
misc.utcwhenmodified(pf[0]))
|
||||
for p, f in fs[::-1]:
|
||||
a = htmlgen.org_to_abstract(p, isfile=True, only_metadata=True)
|
||||
dl.add_item(htmlfunc.link(f[:-4], a.title), a.summary if a.summary
|
||||
else 'No summary.')
|
||||
return dl.generate_html()
|
||||
|
||||
def titlelink(path, pathdir=None):
|
||||
pathdir = misc.macrog('pathdir', pathdir)
|
||||
orgpath = misc.get_org_path(os.path.join(pathdir, path))
|
||||
if orgpath:
|
||||
a = htmlgen.org_to_abstract(orgpath, isfile=True, only_metadata=True)
|
||||
title = a.title
|
||||
else:
|
||||
title = path
|
||||
return htmlfunc.link(path, title).generate_html()
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#+title: Revision error
|
||||
|
||||
* Revision error
|
||||
|
||||
Error: <@deval page.error@>
|
||||
|
||||
[[<@deval page.allrevs@>][View all revisions]]
|
|
@ -1,5 +1,19 @@
|
|||
#+title: Server error
|
||||
|
||||
* <@deval page.error@>
|
||||
* Server error
|
||||
|
||||
There was an error, most likely due to sloppy programming.
|
||||
There was an error, most likely due to sloppy programming:
|
||||
|
||||
#&block
|
||||
<@deval page.error@>
|
||||
#&
|
||||
|
||||
<@deval page.errortraceback@>
|
||||
|
||||
** Fixing it
|
||||
|
||||
This error has been logged. However, it might get fixed more quickly if you
|
||||
send an e-mail to Niels at [[mailto:ns@metanohi.org][ns@metanohi.org]] explaining what you did to trigger
|
||||
this tragedy.
|
||||
|
||||
Thanks.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#+title: Sitemap
|
||||
|
||||
* Sitemap
|
||||
|
||||
<@eval page.sitemap@>
|
|
@ -10,7 +10,7 @@ sys.path.insert(0, _filedir)
|
|||
try:
|
||||
import mege.wsgi
|
||||
except ImportError:
|
||||
sys.path.insert(0, os.path.join(_filedir, 'mege'))
|
||||
import mege.wsgi
|
||||
pass#sys.path.insert(0, os.path.join(_filedir, 'mege'))
|
||||
#import mege.wsgi
|
||||
os.chdir(_filedir)
|
||||
application = mege.wsgi.create_application()
|
||||
|
|
|
@ -30,26 +30,39 @@ is_screen_media = function() {
|
|||
};
|
||||
|
||||
set_min_height = function() {
|
||||
var ws, wh, ww, h;
|
||||
ws = get_window_size();
|
||||
wh = ws[0];
|
||||
ww = ws[1];
|
||||
|
||||
h = metadiv.offsetHeight + 15;
|
||||
metadiv.style.position = 'absolute';
|
||||
metadiv.style.bottom = '5px';
|
||||
metadiv.style.width = (contentdiv.offsetWidth - 22) + 'px';
|
||||
contentdiv.style.paddingBottom = h + 'px';
|
||||
|
||||
h = wh - h - menudiv.offsetHeight - 145;
|
||||
contentdiv.style.minHeight = h + 'px';
|
||||
};
|
||||
|
||||
set_logo_width = function() {
|
||||
var ws;
|
||||
ws = get_window_size();
|
||||
ww = ws[1];
|
||||
logodiv.style.width = ww + 'px';
|
||||
};
|
||||
|
||||
adjust_sizes = function() {
|
||||
if (!is_screen_media())
|
||||
return;
|
||||
var ws, wh, ww, h
|
||||
ws = get_window_size()
|
||||
wh = ws[0]
|
||||
ww = ws[1]
|
||||
|
||||
h = metadiv.offsetHeight + 15
|
||||
metadiv.style.position = 'absolute'
|
||||
metadiv.style.bottom = '5px'
|
||||
metadiv.style.width = (bodydiv.offsetWidth - 22) + 'px'
|
||||
bodydiv.style.paddingBottom = h + 'px'
|
||||
|
||||
h = wh - h - menudiv.offsetHeight - 145
|
||||
bodydiv.style.minHeight = h + 'px'
|
||||
set_min_height();
|
||||
set_logo_width();
|
||||
};
|
||||
|
||||
window.addEventListener('load', function(event){
|
||||
menudiv = document.getElementById('menu');
|
||||
bodydiv = document.getElementById('body');
|
||||
contentdiv = document.getElementById('content');
|
||||
metadiv = document.getElementById('metadata');
|
||||
set_min_height();
|
||||
logodiv = document.getElementById('logo');
|
||||
adjust_sizes();
|
||||
}, false);
|
||||
|
|
|
@ -64,7 +64,7 @@ ul#menulinks {
|
|||
color: #2433ff;
|
||||
}
|
||||
|
||||
#body {
|
||||
#content {
|
||||
width: 720px;
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
|
@ -76,10 +76,20 @@ ul#menulinks {
|
|||
}
|
||||
|
||||
#body.full {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#body.full #content {
|
||||
margin: 0 7px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#bodyend {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#metadata {
|
||||
margin-top: 10px;
|
||||
border-style: dashed;
|
||||
|
@ -166,7 +176,7 @@ h1, h2, h3, h4, h5, h6 {
|
|||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 10px;
|
||||
margin: 16px 0 5px 0;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
|
@ -175,29 +185,29 @@ h1:first-child {
|
|||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 9px;
|
||||
margin: 14px 0 5px 0 ;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 6px;
|
||||
margin: 9px 0 3px 0;
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 5px;
|
||||
margin: 7px 0 2px 0;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin-top: 3px;
|
||||
margin-top: 5px 0 1px 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h6 {
|
||||
margin-top: 2px;
|
||||
margin: 3px 0 1px 0;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -228,6 +238,7 @@ tt, code, samp, pre, var {
|
|||
|
||||
img {
|
||||
border: none;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
cite, quote {
|
||||
|
@ -235,7 +246,7 @@ cite, quote {
|
|||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 20px;
|
||||
margin: 0 0 5px 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
@ -272,34 +283,49 @@ hr {
|
|||
/* Lists */
|
||||
|
||||
ul, ol {
|
||||
margin: 0 3px 4px 0;
|
||||
margin-bottom: 4px;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
ul > ul, ul > ol, ol > ul, ol > ol {
|
||||
margin-left: 17px;
|
||||
margin-bottom: 0;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: disc;
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
ul > ul, ol > ul {
|
||||
list-style-type: square;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
ul > * > ul, ol > * > ul {
|
||||
list-style-type: circle;
|
||||
list-style-type: circle;
|
||||
}
|
||||
|
||||
ul > * * > ul, ol > * * > ul {
|
||||
list-style-type: disc; ! important
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
ol > ol, ul > ol {
|
||||
list-style-type: upper-alpha;
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
|
||||
ol > * > ol, ul > * > ol {
|
||||
list-style-type: lower-alpha;
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
ol > * * > ol, ul > * * > ol {
|
||||
list-style-type: decimal; ! important
|
||||
}
|
||||
|
||||
|
||||
/* Definition lists */
|
||||
|
||||
dd {
|
||||
|
@ -307,28 +333,30 @@ dd {
|
|||
}
|
||||
|
||||
dl > dl {
|
||||
margin-left: 25px;
|
||||
margin-left: 21px;
|
||||
padding-left: 5px;
|
||||
border-left: 4px solid #000;
|
||||
}
|
||||
|
||||
|
||||
/* Tables */
|
||||
|
||||
table {
|
||||
margin: 0 auto;
|
||||
margin: 0 auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table, td, th {
|
||||
border: 1px solid black;
|
||||
border: 2px inset black;
|
||||
}
|
||||
|
||||
td, th {
|
||||
margin: 0 5px;
|
||||
padding: 1px 3px;
|
||||
margin: 0 5px;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
|
||||
/* Misc. classes */
|
||||
/* Formatting-related classes */
|
||||
|
||||
.strong {
|
||||
font-weight: bold;
|
||||
|
@ -394,3 +422,12 @@ td, th {
|
|||
font-size: 8px; ! important
|
||||
}
|
||||
|
||||
|
||||
/* Misc. classes */
|
||||
|
||||
.warning {
|
||||
background-color: #ffa400;
|
||||
font-weight: bold;
|
||||
padding: 5px 5px 0 5px;
|
||||
border: 1px outset black;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ if page.created_rfc3339:
|
|||
if page.modified_rfc3339:
|
||||
print(" <meta name='DCTERMS.modified' content='{}' />".format(page.modified_rfc3339))
|
||||
@-->
|
||||
<!--@eval ' '*4@-->
|
||||
<meta name='DCTERMS.language' content='en' />
|
||||
<meta name='DCTERMS.isPartOf' content='http://metanohi.org/' />
|
||||
<meta name='DCTERMS.isVersionOf' content='<!--@eval page.core_url@-->' />
|
||||
|
@ -54,7 +53,6 @@ if page.licenses:
|
|||
<link rel='copyright' href='{x.url}' />
|
||||
<meta name='DCTERMS.license' content='{x.url}' />\
|
||||
""".format(x=x))@-->
|
||||
<!--@eval ' '*4@-->
|
||||
<meta name='robots' content='ALL' />
|
||||
<link rel='icon' type='image/png' href='/favicon.png' />
|
||||
<!--
|
||||
|
@ -76,23 +74,26 @@ if page.licenses:
|
|||
<div id='menu'>
|
||||
<ul id='menulinks'>
|
||||
<!--@prexec
|
||||
for x in('projects', 'writings', 'films', 'about'):
|
||||
for x in('projects', 'writings', 'about', 'sitemap'):
|
||||
print(' ' * 14 + "<li><a href='/{x}/'>{x}</a></li>".format(x=x))@-->
|
||||
</ul>
|
||||
</div>
|
||||
<div id='body'<!--@exec if page.is_fullpage: print(" class='full'", end='')@-->>
|
||||
<div id='content'>
|
||||
<!--@eval "<div id='toc'><h3>Contents</h3>" + page.toc_html + '</div>' if page.has_toc else ''@-->
|
||||
<!--@eval run_macros(page.body)@-->
|
||||
<!--@eval "<hr /><div id='footnotes'><h3>Footnotes</h3>" + page.footnotes_html + '</div>' if page.footnotes else ''@-->
|
||||
<div id='metadata'>
|
||||
<div id='bodyend'></div>
|
||||
<div id='metadata'>
|
||||
<!--@eval run_macros(page.metadata_html)@-->
|
||||
<!--@exec
|
||||
if page.is_dynamic:
|
||||
print("<p><a href='{}'>View source</a></p>".format(page.sourcepath), end='')@-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='logo'>
|
||||
<a href='/'></a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
26
rules.mege
|
@ -16,3 +16,29 @@ convert prestatic/template.html .
|
|||
|
||||
# Redirects (in site/)
|
||||
redirect mege projects/mege/
|
||||
redirect aboutme about/niels/
|
||||
redirect 124 projects/wontofor/
|
||||
redirect enigma projects/enigma
|
||||
redirect simplechat projects/simplechat
|
||||
redirect {zita,zit} projects/zita
|
||||
redirect {bito,bit} projects/bito
|
||||
redirect {totxt,totext} projects/totxt/
|
||||
redirect an[5s]w projects/an5w/
|
||||
redirect projects/{bibbob,wikiaq} projects/
|
||||
redirect {canvas,projects/canvas} http://projects.metanohi.org/canvas/
|
||||
redirect {eonaton,projects/eonaton} http://projects.metanohi.org/eonaton/
|
||||
redirect {evolution,projects/evolution} http://projects.metanohi.org/evolution/
|
||||
redirect {snake,projects/snake} http://projects.metanohi.org/snake/
|
||||
redirect {words,projects/words} http://projects.metanohi.org/words/
|
||||
redirect {projects/{cln,cli},cln,cli} http://old.projects.metanohi.org/cln/
|
||||
|
||||
redirect bsq http://old.projects.metanohi.org/bsq/
|
||||
redirect gt3000 http://old.projects.metanohi.org/gt3000/
|
||||
redirect {algo,algohol} http://old.projects.metanohi.org/algo/
|
||||
redirect dsktp http://old.projects.metanohi.org/dsktp/
|
||||
redirect jap http://old.projects.metanohi.org/jap/
|
||||
redirect pedro http://old.projects.metanohi.org/pedro/
|
||||
redirect snowman http://old.projects.metanohi.org/snowman/
|
||||
redirect sq http://old.projects.metanohi.org/sq/
|
||||
redirect webcli http://old.projects.metanohi.org/webcli/
|
||||
redirect x http://old.projects.metanohi.org/x/
|
||||
|
|
After Width: | Height: | Size: 320 KiB |
After Width: | Height: | Size: 870 KiB |
|
@ -0,0 +1,6 @@
|
|||
#+title: About Niels
|
||||
|
||||
* About Niels
|
||||
|
||||
Niels Serup is the creator of metanohi and mege.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#+title: Films
|
||||
|
||||
* Films
|
||||
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
* This is metanohi
|
||||
|
||||
*metanohi* is a website founded in 2009 with a well-defined purpose: to
|
||||
exist. It is the personal website of [[/about/niels][Niels Serup]], a [[/writings/hacking/][hacker]] in a world of
|
||||
exist. It is the personal website of [[/about/niels][Niels Serup]], a [[/writings/hacking][hacker]] in a world of
|
||||
non-hackers.
|
||||
|
||||
Historically, this start page has featured text which had little purpose except
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#+title: Projects
|
||||
#&summary
|
||||
Where all the prominent projects are listed.
|
||||
#&
|
||||
#+license: bysa
|
||||
#&fullpage
|
||||
|
||||
* Projects
|
||||
|
||||
<boxes go here>
|
||||
|
||||
#+mark: old
|
||||
** Old
|
|
@ -0,0 +1,315 @@
|
|||
#+title: mege documentation
|
||||
#&summary
|
||||
Documentation for the metanohi generator
|
||||
#&
|
||||
#+license: bysa
|
||||
|
||||
#&+classes=warning
|
||||
Ooops. It appears this document is not quite finished yet.
|
||||
#&
|
||||
|
||||
* Quick overview
|
||||
|
||||
+ headers
|
||||
+ paragraphs
|
||||
+ inline modifiers
|
||||
+ strong, *bold*
|
||||
+ em, /italic/
|
||||
+ _underline_
|
||||
+ combinations
|
||||
+ xhtml1.1-based
|
||||
+ acronym
|
||||
+ abbreviation
|
||||
+ cite
|
||||
+ code
|
||||
+ samp
|
||||
+ kbd
|
||||
+ var
|
||||
+ dfn
|
||||
+ sub
|
||||
+ sup
|
||||
+ del
|
||||
+ ins
|
||||
+ q
|
||||
+ images
|
||||
+ tables
|
||||
+ head
|
||||
+ body
|
||||
+ foot
|
||||
+ rows
|
||||
+ cells
|
||||
+ lists
|
||||
+ not numbered
|
||||
+ numbered
|
||||
+ definition lists
|
||||
+ links
|
||||
+ with name
|
||||
+ without name
|
||||
+ footnotes
|
||||
+ source code highlighting
|
||||
+ LaTeX to PNG
|
||||
+ xhtml1.1-based block elements
|
||||
+ video/audio
|
||||
+ address
|
||||
+ blockquote
|
||||
+ pre
|
||||
+ hr
|
||||
+ forms
|
||||
|
||||
* Detailed overview
|
||||
|
||||
** Headings
|
||||
|
||||
\*{1,6}\s*(INLINE)\n?
|
||||
|
||||
** Paragraphs
|
||||
|
||||
INLINE
|
||||
|
||||
** Escaped characters
|
||||
|
||||
Syntax: =\c= where c&var is a character.
|
||||
|
||||
** Modifiers
|
||||
|
||||
In the case of =#&something;args=, default args (defargs) = =[,
|
||||
width=width][,height=height][,float=left|right][,align=left|right|center][,classes=class1
|
||||
class2...][,caption=caption]=.
|
||||
|
||||
** Inline modifiers
|
||||
|
||||
*** Strong/bold
|
||||
|
||||
Signal *importance*. Syntax: =*INLINE*=
|
||||
|
||||
HTML equivalent:
|
||||
#+BEGIN_SRC html
|
||||
<strong>INLINE</strong>
|
||||
#+END_SRC
|
||||
|
||||
*** Emphasize/italic
|
||||
|
||||
/Emphasize/ something. Syntax: =/INLINE/=
|
||||
|
||||
HTML equivalent:
|
||||
#+BEGIN_SRC html
|
||||
<em>INLINE</em>
|
||||
#+END_SRC
|
||||
|
||||
*** Underline
|
||||
|
||||
_Underline_ something. Syntax: =_INLINE_=
|
||||
|
||||
HTML equivalent:
|
||||
#+BEGIN_SRC html
|
||||
<span class='underline'>INLINE</span>
|
||||
#+END_SRC
|
||||
|
||||
*** Generic modifiers and groups
|
||||
|
||||
Text with spaces can be put in ={= and =}= brackets to function as a group. The
|
||||
ampersand (&) character is commonly used after something, as in =&var= or
|
||||
=&color=red=, which can also be combined to things like =&var,color=red=. A
|
||||
two-part modifier like the =~= in =*bold*= must be preceded by nothing or a
|
||||
space character, and it must be followed by another space character, a period,
|
||||
a comma, an exclamation mark, a question mark, a semicolon, a colon, or
|
||||
something similar. If this is not enough, further abstractions are possible
|
||||
with the =#&code= + newline + text + newline + =#&= construct.
|
||||
|
||||
The *text is strongly emphasized* and in one paragraph.
|
||||
|
||||
The
|
||||
#&-strong
|
||||
text is strongly emphasized
|
||||
#&
|
||||
but it's still just in one paragraph even though the =*...*= modifier wasn't
|
||||
used. Inline modifiers cannot be nested, but block modifiers can.
|
||||
|
||||
This construct must be used in cases where the data is not inline.
|
||||
|
||||
*** Acronym, abbreviation, variable, definition
|
||||
|
||||
Describe an acronym, an abbreviation, a variable, or a definition. Syntax:
|
||||
=text&(abbr|acro)(=meaning)?= or =text&(var|dfn)=.
|
||||
|
||||
Example 1: =mege&abbr\='metanohi generator'= equals mege&abbr='metanohi
|
||||
generator'.
|
||||
|
||||
Example 2: ={A. B.}&acro=AlBook= equals {A. B.}&acro=AlBook.
|
||||
|
||||
HTML equivalents: =<acronym title\='meaning'>acronym[INLINE]</acronym>=&html,
|
||||
=<abbr title\='meaning'>abbreviation[INLINE]</abbr>=&html,
|
||||
=<var>variable[INLINE]</var>=&html, and =<dfn>definition[INLINE]</dfn>=&html.
|
||||
|
||||
*** Quouting and citing
|
||||
|
||||
Quote without citing: =a^2+b^2=c^2"e=.
|
||||
|
||||
Cite without quoting: =http://en.wikipedia.org/&cite=.
|
||||
|
||||
Quote and cite: ={metanohi exists}&cite=http://metanohi.org/=.
|
||||
|
||||
HTML equivalent:
|
||||
#+BEGIN_SRC html
|
||||
<q cite='cited'>quote[INLINE]</q>
|
||||
#+END_SRC
|
||||
|
||||
*** Code
|
||||
|
||||
Syntax: ==code== or ={=code\=}&lang=. Example: ==print('hi')==,
|
||||
==print('hi')\=&py3=. If you do not specify a language, the code will not be
|
||||
highlighted.
|
||||
|
||||
Sample output from a program, with the syntax =~sample~= uses the same
|
||||
logic.
|
||||
|
||||
*** Keyboard
|
||||
|
||||
Describe keyboard shortcuts (mainly). Syntax: -shortcut-.
|
||||
|
||||
Examples: -C-f-, -C-u C-u M-x C-q s-y s-f M-C-n M-C-S-k- (I don't have this
|
||||
keybinding), -Ctrl+Alt+U-, etc.
|
||||
|
||||
HTML:
|
||||
#+BEGIN_SRC html
|
||||
<kbd>shortcut</kbd>
|
||||
#+END_SRC
|
||||
|
||||
*** Subscript and superscript
|
||||
|
||||
To achieve something like CH_{3}CO_{2}^{3-} or x_{new} = 2^{50} without
|
||||
resorting to math mode, use the =^= character for superscripts and the =_=
|
||||
character for subscripts. Bracket groups must be used. Note that this is
|
||||
different from LaTeX.
|
||||
|
||||
|
||||
*** del, ins
|
||||
|
||||
=text&del=, =text&ins= = text&del, text&ins.
|
||||
|
||||
*** Other modifiers
|
||||
|
||||
Sizes: tiny, small, medium (normal), large, huge. Syntax: =text&size=,
|
||||
eg. =text&large=.
|
||||
|
||||
Color: =text&color=color=.
|
||||
|
||||
More than one modifier: =&dfn&color=green=.
|
||||
|
||||
|
||||
*** Combinations
|
||||
|
||||
..are allowed. However, a certain logic applies. It will not be explained
|
||||
here. It is not yet well-defined.
|
||||
|
||||
|
||||
** Video/audio
|
||||
|
||||
Syntax: =#&video|audio;url='...'[, autoplay][defargs]=
|
||||
|
||||
** Images
|
||||
|
||||
Syntax for images in blocks: =#&img;url='...',alt='...'[defargs]=.
|
||||
|
||||
** Blockquote, address, preformatted text
|
||||
|
||||
Indent a blockquote or specify an address or show text without
|
||||
post-formatting. Syntax:
|
||||
|
||||
#+BEGIN_SRC
|
||||
#&block[;cite='url']
|
||||
paragraphs
|
||||
#&
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC
|
||||
#&address
|
||||
address
|
||||
#&
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC
|
||||
#&pre
|
||||
This is
|
||||
pre-formatted *text*, though not entirely
|
||||
#&
|
||||
#+END_SRC
|
||||
|
||||
Note: The effect achieved by =#&pre= can also be achieved in another way.
|
||||
|
||||
** Block container (div)
|
||||
|
||||
#+BEGIN_SRC
|
||||
#&+[args]
|
||||
blah
|
||||
#&
|
||||
#+END_SRC
|
||||
|
||||
** Line (hr)
|
||||
|
||||
Syntax: =#&line=
|
||||
|
||||
** Links
|
||||
|
||||
Syntax: =[[url]]= or =[[url][name]]=.
|
||||
|
||||
** Footnotes
|
||||
|
||||
Syntax: =This is a footnote[fn:serup2011].=, and:
|
||||
|
||||
=[fn:serup2011] It's true!=
|
||||
|
||||
** Lists
|
||||
|
||||
Same as Org-Mode.
|
||||
|
||||
** Tables
|
||||
|
||||
Same as Org-Mode.
|
||||
|
||||
** Python execution and evaluation
|
||||
|
||||
Inline, it's =<&eval ... &>=, =<&exec ... &>=, =<&deval ... &>=, and =<&dexec
|
||||
... &>=. For blocks, see below.
|
||||
|
||||
** Source code
|
||||
|
||||
Begin with =#+BEGIN_SRC[ language]= and end with =#+END_SRC=. If nothing or
|
||||
=#++high= comes before =#+BEGIN_SRC=, highlight the source code. If =#++show=
|
||||
comes before, just show it (useful for HTML, JavaScript and CSS code). to show
|
||||
inline HTML code, use the =<@html CODE@>= construct. If =#++pre=, show it, but
|
||||
only use inline formatting. If =#++exec=, evaluate it as Python code. If
|
||||
=#++dexec=, do the same thing, but do it whenever the site is reloaded
|
||||
("dynamic exec"). =#++eval= and =#++deval= can also be used.
|
||||
|
||||
** Math
|
||||
|
||||
Inline math: =$LaTeX$=, example: $\frac{32}{x} = 8 \Rightarrow x \neq \infty$.
|
||||
|
||||
Block math: =#&math\nLaTeX\n#&=.
|
||||
|
||||
** Forms
|
||||
|
||||
Only accesible via the dynamic execution constructs (at some point --- not
|
||||
implemented yet).
|
||||
|
||||
* Special features
|
||||
|
||||
+ The =#+...= construct works for single lines only
|
||||
+ The =#&...= construct along with =#&= to end it can last over several lines
|
||||
+ The =#++...= construct can add instructions to a =#+...= construct if the
|
||||
=#++= is placed just above the =#+=.
|
||||
|
||||
* Special variables
|
||||
|
||||
Formatting is not accepted in the following variables.
|
||||
|
||||
+ Title if =#+title:TITLE= is specified
|
||||
+ Summary if =#+summary:SUMMARY= or =#&summary\n...\n#&= is specified
|
||||
+ Table of contents if =#&toc= is specified
|
||||
+ Levels in a table of contents defaults to 3, different if =#+toclvl:lvl= is
|
||||
specified
|
||||
+ Full page if =#&fullpage= is specified
|
||||
+ License added if =#+license:LICENSEID[, covering what]= is specified (several
|
||||
licenses can be specified)
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#+title: mege
|
||||
#&summary
|
||||
mege the metanohi generator
|
||||
#&
|
||||
#+license: bysa
|
||||
|
||||
* mege the metanohi generator
|
||||
|
||||
+ [[./tests/][Tests]]
|
||||
+ [[./docs/][Documentation]]
|
||||
|
||||
Both are works in progress, like mege. Note that the author of mege does
|
||||
believe in good documentation. And while believing is not the same as doing,
|
||||
good mege documentation /will/ exist at some point in the near future.
|
|
@ -4,9 +4,35 @@ Test of mege's most important and most commonly used features
|
|||
#&
|
||||
#+license: bysa
|
||||
|
||||
* Test of mege features
|
||||
* Test of basic mege features
|
||||
*mege* has many features. A bit /too/ many, perhaps.
|
||||
|
||||
Remember to visit [[<@eval page.locurl@>.org]] to see the source of this document.
|
||||
|
||||
|
||||
** Basic inline formatting
|
||||
|
||||
This is a paragraph.
|
||||
|
||||
This is a *paragraph* with the last word *strongly* /emphasized/. _This_ is
|
||||
underlined. _/*The effects*/ can /be/ combined_. Press -C-n- to scroll down if
|
||||
your web browser is Conkeror (-Ctrl+N- in non-emacs speak).
|
||||
|
||||
Type this: =$ echo echo=.
|
||||
|
||||
** Extended inline formatting
|
||||
|
||||
mege uses postfix operators for less essential inline formatting.
|
||||
|
||||
More&strong strong text&samp. And even acronyms and abbreviations:
|
||||
GNU&acro="GNU's not UNIX" and MF&abbr="Medlem af Folketinget". {Other
|
||||
colors}&color=red and {other sizes}&small as well, {{and also}&color=green
|
||||
combinations}&large.
|
||||
|
||||
Now subtract y&var from x&var - 2^{32}. And a definition: {An integer above 0
|
||||
is above -1_{a number}}&dfn.
|
||||
|
||||
|
||||
** Lists
|
||||
|
||||
+ A
|
||||
|
@ -46,10 +72,15 @@ Another list:
|
|||
#+with a caption on two lines
|
||||
#&img;url=test0.png, alt='This is a test picture', width=240, float=right
|
||||
|
||||
#&caption
|
||||
A test picture
|
||||
#&
|
||||
#&img;url=test0.png, alt='This is a test picture', width=210, float=right
|
||||
|
||||
** Links
|
||||
|
||||
Here is a link: [[http://example.com/][Wizard's webpage]]. And a shorter one: [[http://example.com/]]! I
|
||||
want to _underline_ this link: _[[http://example.com/]]_.
|
||||
want to _underline_ this link: [[http://example.com/]]&underline.
|
||||
|
||||
** Block containers
|
||||
|
||||
|
@ -127,6 +158,17 @@ introduction by the Master of Falsefulness
|
|||
|
||||
x_{tallyho} = 33^{12}, escaped: x_\{tallyho} = 33^\{12}
|
||||
|
||||
** Code
|
||||
|
||||
: ver *ba* tim
|
||||
: auoiao =aa
|
||||
|
||||
|
||||
#++pre
|
||||
: ver *ba* tim /aa/
|
||||
: abc
|
||||
|
||||
|
||||
** Eval'd Code
|
||||
Inline code: <@eval 2 + 3@>. <@exec print('aha')
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#+title: Test of mege code
|
||||
#&summary
|
||||
Code in mege
|
||||
#&
|
||||
#+license: bysa
|
||||
|
||||
* Test of mege code
|
||||
|
||||
While the <@eval macros.titlelink('basics')@> does include code,
|
||||
this test contains more. And all of it's different.
|
||||
|
|
@ -12,6 +12,10 @@ To make sure its html generation is working properly, the following test pages
|
|||
have been created:
|
||||
|
||||
+ [[basics][Basics]]
|
||||
+
|
||||
+ [[tables][Tables]]
|
||||
+ [[math][Math]]
|
||||
+ [[code][Code]]
|
||||
+ [[video][Video]]
|
||||
|
||||
Perhaps /mege/ will grow and come near to perfection one day.
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#+title: Test of mege math
|
||||
#&summary
|
||||
Math in mege
|
||||
#&
|
||||
#+license: bysa
|
||||
|
||||
* Test of mege math
|
||||
|
||||
While the <@eval macros.titlelink('basics', page.pathdir)@> does include math,
|
||||
this test contains more. And all of it's different.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#+title: Test of mege tables
|
||||
#&summary
|
||||
Tables in mege
|
||||
#&
|
||||
#+license: bysa
|
||||
|
||||
* Test of mege tables
|
||||
|
||||
While the <@eval macros.titlelink('basics', page.pathdir)@> does include
|
||||
tables, this test contains more. And they're all different.
|
||||
|
||||
* Basic table
|
||||
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
@ -0,0 +1,6 @@
|
|||
#+title: Test of mege video
|
||||
#+license: bysa
|
||||
#+summary: How to show a video in mege
|
||||
|
||||
* Test of mege video
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#+title: Atem: a new word
|
||||
|
||||
wiktionary meta
|
|
@ -0,0 +1,10 @@
|
|||
#+title: Free culture
|
||||
|
||||
* Free software
|
||||
|
||||
** My definition
|
||||
|
||||
|
||||
** Other definitions
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#+title: Free software
|
||||
|
||||
* Free software
|
||||
|
||||
** My definition
|
||||
|
||||
|
||||
|
||||
|
||||
** Other definitions
|
||||
|
||||
|
|
@ -1,3 +1,12 @@
|
|||
#+title: Hacking
|
||||
|
||||
Hacking
|
||||
* Hacking
|
||||
|
||||
** My definition
|
||||
|
||||
|
||||
|
||||
|
||||
** Other definitions
|
||||
|
||||
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#+title: Writings
|
||||
|
||||
* Writings
|
||||
|
||||
<@eval macros.list_pages(page.pathdir)@>
|
||||
|
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 198 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 38 KiB |