git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3033 from tarleb/github-readme

PoC: GitHub-optimized README

commit199489c12c69a3a0b55671edfa7d980b43489777 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 22 Jul 2016, 15:52 (10 years ago) parent27762af2824688
12 files changed+145−26
.gitignore+2−2 CONTRIBUTING.md+4−4 INSTALL+1−1 README → MANUAL.txt Makefile+1−1 README.md+119 appveyor.yml+1−1 pandoc.cabal+2−2 src/Text/Pandoc/Data.hsb+1−1 src/Text/Pandoc/Shared.hs+2−2 windows/make-windows-installer.bat+2−2 windows/pandoc.wxs+10−10
.gitignore+2−2
@@ -1,7 +1,7 @@
11*~
22dist/*
3−README.*
4−!README.Debian
3+MANUAL.*
4+!MANUAL.txt
55INSTALL.*
66.configure-stamp
77.cabal-sandbox
CONTRIBUTING.md+4−4
@@ -29,7 +29,7 @@ Out of scope?
2929-------------
3030
3131A less than perfect conversion does not necessarily mean there's
32−a bug in pandoc. Quoting from the README:
32+a bug in pandoc. Quoting from the MANUAL:
3333
3434> Because Pandoc's intermediate representation of a document is less
3535> expressive than many of the formats it converts between, one should
@@ -124,7 +124,7 @@ Please follow these guidelines:
124124 below under [Tests](#tests).) If you are adding a new writer or reader,
125125 you must include tests.
126126
127−7. If you are adding a new feature, include updates to the README.
127+7. If you are adding a new feature, include updates to the README and MANUAL.
128128
1291298. All code must be released under the general license governing pandoc
130130 (GPL v2).
@@ -259,7 +259,7 @@ The library is structured as follows:
259259 - `Text.Pandoc.Shared` is a grab-bag of shared utility functions.
260260 - `Text.Pandoc.Writers.Shared` contains utilities used in writers only.
261261 - `Text.Pandoc.Slides` contains functions for splitting a markdown document
262− into slides, using the conventions described in the README.
262+ into slides, using the conventions described in the MANUAL.
263263 - `Text.Pandoc.Templates` defines pandoc's templating system.
264264 - `Text.Pandoc.UTF8` contains functions for converting text to and from
265265 UTF8 bytestrings (strict and lazy).
@@ -270,7 +270,7 @@ The library is structured as follows:
270270
271271[pandoc-discuss]: http://groups.google.com/group/pandoc-discuss
272272[issue tracker]: https://github.com/jgm/pandoc/issues
273−[User's Guide]: http://pandoc.org/README.html
273+[User's Guide]: http://pandoc.org/MANUAL.html
274274[FAQs]: http://pandoc.org/faqs.html
275275[EditorConfig]: http://editorconfig.org/
276276[Haskell platform]: http://www.haskell.org/platform/
INSTALL+1−1
@@ -95,7 +95,7 @@ Quick install with cabal
9595
9696The `pandoc.1` man page will be installed automatically. cabal shows
9797you where it is installed: you may need to set your `MANPATH`
98−accordingly. If `README` has been modified, the man page can be
98+accordingly. If `MANUAL.txt` has been modified, the man page can be
9999rebuilt: `make man/pandoc.1`.
100100
101101The `pandoc-citeproc.1` man page will also be installed automatically.
README → MANUAL.txtrenamed

The content is the same.

Makefile+1−1
@@ -56,7 +56,7 @@ pandoc-$(version)-windows.msi:
5656 osslsigncode sign -pkcs12 ~/Private/ComodoCodeSigning.exp2017.p12 -in pandoc.msi -i http://johnmacfarlane.net/ -t http://timestamp.comodoca.com/ -out $@ -askpass
5757 rm pandoc.msi
5858
59−man/pandoc.1: README man/pandoc.1.template
59+man/pandoc.1: MANUAL.txt man/pandoc.1.template
6060 pandoc $< -t man -s --template man/pandoc.1.template \
6161 --filter man/capitalizeHeaders.hs \
6262 --filter man/removeNotes.hs \
README.mdnew file+119
@@ -0,0 +1,119 @@
1+Pandoc
2+======
3+
4+The universal markup converter
5+------------------------------
6+
7+Pandoc is a [Haskell] library for converting from one markup format to
8+another, and a command-line tool that uses this library. It can read
9+[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown],
10+[MultiMarkdown], and (subsets of) [Textile], [reStructuredText], [HTML],
11+[LaTeX], [MediaWiki markup], [TWiki markup], [Haddock markup], [OPML], [Emacs
12+Org mode], [DocBook], [txt2tags], [EPUB], [ODT] and [Word docx]; and it can
13+write plain text, [Markdown], [CommonMark], [PHP Markdown Extra],
14+[GitHub-Flavored Markdown], [MultiMarkdown], [reStructuredText], [XHTML],
15+[HTML5], [LaTeX] (including [`beamer`] slide shows), [ConTeXt], [RTF], [OPML],
16+[DocBook], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki
17+markup], [DokuWiki markup], [ZimWiki markup], [Haddock markup],
18+[EPUB] (v2 or v3), [FictionBook2], [Textile], [groff man] pages,
19+[Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI Simple], and [Slidy],
20+[Slideous], [DZSlides], [reveal.js] or [S5] HTML slide shows. It can also
21+produce [PDF] output on systems where LaTeX, ConTeXt, or `wkhtmltopdf` is
22+installed.
23+
24+Pandoc's enhanced version of Markdown includes syntax for footnotes, tables,
25+flexible ordered lists, definition lists, fenced code blocks, superscripts and
26+subscripts, strikeout, metadata blocks, automatic tables of contents, embedded
27+LaTeX math, citations, and Markdown inside HTML block elements. (These
28+enhancements, described in the manual under *pandoc's Markdown*, can be
29+disabled using the `markdown_strict` input or output format.)
30+
31+In contrast to most existing tools for converting Markdown to HTML, which
32+use regex substitutions, pandoc has a modular design: it consists of a
33+set of readers, which parse text in a given format and produce a native
34+representation of the document, and a set of writers, which convert
35+this native representation into a target format. Thus, adding an input
36+or output format requires only adding a reader or writer.
37+
38+Because pandoc's intermediate representation of a document is less
39+expressive than many of the formats it converts between, one should
40+not expect perfect conversions between every format and every other.
41+Pandoc attempts to preserve the structural elements of a document, but
42+not formatting details such as margin size. And some document elements,
43+such as complex tables, may not fit into pandoc's simple document
44+model. While conversions from pandoc's Markdown to all formats aspire
45+to be perfect, conversions from formats more expressive than pandoc's
46+Markdown can be expected to be lossy.
47+
48+[Markdown]: http://daringfireball.net/projects/markdown/
49+[CommonMark]: http://commonmark.org
50+[PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/
51+[GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/
52+[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/
53+[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
54+[S5]: http://meyerweb.com/eric/tools/s5/
55+[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
56+[Slideous]: http://goessner.net/articles/slideous/
57+[HTML]: http://www.w3.org/html/
58+[HTML5]: http://www.w3.org/TR/html5/
59+[XHTML]: http://www.w3.org/TR/xhtml1/
60+[LaTeX]: http://latex-project.org
61+[`beamer`]: https://ctan.org/pkg/beamer
62+[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf
63+[ConTeXt]: http://contextgarden.net/
64+[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
65+[DocBook]: http://docbook.org
66+[txt2tags]: http://txt2tags.org
67+[EPUB]: http://idpf.org/epub
68+[OPML]: http://dev.opml.org/spec2.html
69+[OpenDocument]: http://opendocument.xml.org
70+[ODT]: http://en.wikipedia.org/wiki/OpenDocument
71+[Textile]: http://redcloth.org/textile
72+[MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting
73+[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki
74+[ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html
75+[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules
76+[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html
77+[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html
78+[Haskell]: https://www.haskell.org
79+[GNU Texinfo]: http://www.gnu.org/software/texinfo/
80+[Emacs Org mode]: http://orgmode.org
81+[AsciiDoc]: http://www.methods.co.nz/asciidoc/
82+[DZSlides]: http://paulrouget.com/dzslides/
83+[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx
84+[PDF]: https://www.adobe.com/pdf/
85+[reveal.js]: http://lab.hakim.se/reveal-js/
86+[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
87+[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf
88+[TEI Simple]: https://github.com/TEIC/TEI-Simple
89+
90+[![license](https://img.shields.io/badge/license-GPLv2+-brightgreen.svg)](https://www.gnu.org/licenses/gpl.html)
91+[![hackage release](https://img.shields.io/hackage/v/pandoc.svg?label=current+release)](http://hackage.haskell.org/package/pandoc)
92+[![stackage LTS package](http://stackage.org/package/pandoc/badge/lts)](http://stackage.org/lts/package/pandoc)
93+[![github release](https://img.shields.io/github/release/jgm/pandoc.svg?label=github+release)](https://github.com/jgm/pandoc/releases)
94+[![travis build status](https://img.shields.io/travis/jgm/pandoc.svg)](https://travis-ci.org/jgm/pandoc)
95+
96+
97+Documentation
98+-------------
99+
100+The full documentation can be found [online](https://pandoc.org/MANUAL.html)
101+and as pandoc-flavored Markdown in the file `MANUAL.txt`.
102+
103+
104+Contributing
105+------------
106+
107+Pull requests, bug reports, and feature requests are welcome. Please make
108+sure to read [the contributor guidelines](CONTRIBUTING.md) before opening a
109+new issue.
110+
111+
112+License
113+-------
114+
115+© 2006-2016 John MacFarlane (jgm@berkeley.edu). Released under the
116+[GPL], version 2 or greater. This software carries no warranty of
117+any kind. (See COPYRIGHT for full copyright and warranty notices.)
118+
119+[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
appveyor.yml+1−1
@@ -37,7 +37,7 @@ after_test:
3737 # .\ in the stack commandline seems to be .\windows\ (where the stack-appveyor.yaml is)
3838 - cd windows
3939 - 7z a "pandoc.zip" pandoc.exe
40− - .\pandoc.exe -s -S --toc ..\README -o README.html
40+ - .\pandoc.exe -s -S --toc ..\MANUAL.txt -o MANUAL.html
4141 - .\pandoc.exe -s -S ..\COPYING -o COPYING.rtf
4242 - copy ..\COPYRIGHT COPYRIGHT.txt
4343 - |
pandoc.cabal+2−2
@@ -105,10 +105,10 @@ Data-Files:
105105 -- bash completion template
106106 data/bash_completion.tpl
107107 -- documentation
108− README, COPYRIGHT
108+ MANUAL.txt, COPYRIGHT
109109Extra-Source-Files:
110110 -- documentation
111− INSTALL, BUGS, CONTRIBUTING.md, changelog
111+ INSTALL, BUGS, README.md, CONTRIBUTING.md, changelog
112112 man/pandoc.1
113113 -- stack build plan
114114 stack.yaml
src/Text/Pandoc/Data.hsb+1−1
@@ -12,4 +12,4 @@ dataFiles = map (\(fp, contents) ->
1212 (Posix.joinPath (splitDirectories fp), contents)) dataFiles'
1313
1414dataFiles' :: [(FilePath, B.ByteString)]
15−dataFiles' = ("README", %blob "README") : %blobs "data"
15+dataFiles' = ("MANUAL.txt", %blob "MANUAL.txt") : %blobs "data"
src/Text/Pandoc/Shared.hs+2−2
@@ -873,7 +873,7 @@ readDefaultDataFile fname =
873873 go as x = x : as
874874#else
875875 getDataFileName fname' >>= checkExistence >>= BS.readFile
876− where fname' = if fname == "README" then fname else "data" </> fname
876+ where fname' = if fname == "MANUAL.txt" then fname else "data" </> fname
877877
878878checkExistence :: FilePath -> IO FilePath
879879checkExistence fn = do
@@ -1071,7 +1071,7 @@ blocksToInlinesWithSep sep blks = intercalate sep $ map blockToInlines blks
10711071
10721072blocksToInlines :: [Block] -> [Inline]
10731073blocksToInlines = blocksToInlinesWithSep [Space, Str "¶", Space]
1074−
1074+
10751075
10761076--
10771077-- Safe read
windows/make-windows-installer.bat+2−2
@@ -2,7 +2,7 @@
22stack install --test
33if %errorlevel% neq 0 exit /b %errorlevel%
44for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
5−%BINPATH%\pandoc.exe -s -S --toc ..\README -o README.html
5+%BINPATH%\pandoc.exe -s -S --toc ..\MANUAL -o MANUAL.html
66if %errorlevel% neq 0 exit /b %errorlevel%
77%BINPATH%\pandoc.exe -s ..\COPYING -t rtf -S -o COPYING.rtf
88if %errorlevel% neq 0 exit /b %errorlevel%
@@ -14,7 +14,7 @@ for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
1414:next
1515if "%VERSION%" == "" (
1616 echo Error: could not determine version number.
17− exit /b 1
17+ exit /b 1
1818)
1919echo Detected version %VERSION%
2020echo Creating msi...
windows/pandoc.wxs+10−10
@@ -57,8 +57,8 @@
5757
5858 <Component Id="Documentation"
5959 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
60− <File Id="pandocREADME" Name="Pandoc User's Guide.html"
61− Source="README.html" KeyPath="yes">
60+ <File Id="pandocMANUAL" Name="Pandoc User's Guide.html"
61+ Source="MANUAL.html" KeyPath="yes">
6262 <Shortcut Id="ApplicationStartMenuShortcut"
6363 Directory="ApplicationProgramsFolder"
6464 Name="Pandoc User’s Guide" Advertise="yes" />
@@ -123,18 +123,18 @@
123123 </Feature>
124124 </Feature>
125125
126−
126+
127127 <!-- Set properties for add/remove programs -->
128128 <Property Id="ARPURLINFOABOUT" Value="http://pandoc.org" />
129129 <Property Id="ARPHELPLINK" Value="http://pandoc.org" />
130130 <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
131131 <Property Id="ARPNOMODIFY" Value="yes" Secure="yes" /> <!-- Remove modify -->
132132
133−
133+
134134 <!--Needed for WixUI_Advanced-->
135135 <Property Id="ApplicationFolderName" Value="Pandoc" />
136136 <Property Id="WixAppFolder" Value="WixPerUserFolder" />
137−
137+
138138 <!--For Single Package for dual purpose i.e. per User/Machine-->
139139 <!--<Property Id="ALLUSERS" Value="2" Secure="yes" />-->
140140 <Property Id="MSIINSTALLPERUSER" Value="1" />
@@ -145,7 +145,7 @@
145145 <CustomAction Id="SetExitDialogOptText"
146146 Property="WIXUI_EXITDIALOGOPTIONALTEXT"
147147 Value="!(loc.ExitDialogText)" />
148−
148+
149149 <!--Offer Per User installs only on workstations (block on servers)-->
150150 <!--Unless ALLUSERS=1 is specified on command line-->
151151 <SetProperty Id="WixUISupportPerUser" Value="0" Before="FindRelatedProducts">
@@ -177,12 +177,12 @@
177177 NOT Installed
178178 </Custom>
179179 </InstallUISequence>
180−
180+
181181 <UIRef Id="WixUI_Advanced_Custom"/>
182182 <!--Enable better description when debug logging-->
183183 <UIRef Id="WixUI_ErrorProgressText" />
184−
184+
185185 </Product>
186−
187−
186+
187+
188188</Wix>