• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language Perl 6
  • License
    GNU General Publi...
  • Created about 14 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Turn github into your publishing platform

1

Welcome To Gitdown

Gitdown is a simple tool for writing documentation hosted on a github repository. It uses ditaa to convert ascii diagrams into images, and produces markdown documents that can be uploaded to your repository along with code. I made Gitdown so that we could write technical white papers and user guides as plain text (including diagrams) and publish them with a single "git push" command. Gitdown is a simpler version of the tool we use to maintain the ØMQ Guide.

Gitdown is written and maintained by Pieter Hintjens. Please use the issue tracker for all comments and errata. This document was published on Thursday February, 2017 at 20:23:49, and generated by the magic of Gitdown from README.txt.

This is version 2011.03.24 of Gitdown. Changelog:

  • 2013.02.05: Gyepi Sam changed pull command to make chunk specification optional.
  • 2010.03.24: added .pull command to include chunks from other files.
  • 2010.10.11: don't do symbol substitution in code blocks.
  • 2010.10.09: added .toc token to generate table of contents.

Contents

License

Copyright (c) 2010-2011 Pieter Hintjens Copyright (c) 1996-2011 iMatix Corporation

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Installation and Use

The code is in the bin subdirectory. Here is how I install it on a new box:

sudo cp bin/* /usr/local/bin
export PERLLIB=$PATH    #   goes into .bash_profile

Gitdown includes Ditaa/0.9 and assumes that Ditaa goes into /usr/local/bin/ditaa0_9.jar.

Another option is to leave the files in the git directory and install a wrapper script. Assuming the directory ~/bin exists and is in your path, you can do the following:

install-wrapper ~/bin

to install the file ~/bin/gitdown, which will set things up to run correctly.

Gitdown assumes that these tools are already installed on your box, which is easy if you're running Linux:

  • ImageMagick, specifically mogrify.
  • Perl.
  • Java, a Java run-time environment is needed to run ditaa.

To use Gitdown, edit a text document much like this README.txt. Then:

gitdown myfile.txt
git add myfile.md images/
git commit -m "Hey, Gitdown is totally crazy!"
git push origin master

The images directory holds images for all documents in the current directory. You can write documents anywhere on the git tree but if they are not at the root you must tell Gitdown how to create a full image path by setting the SUBDIR symbol (see below).

Installation in Cygwin

Install apt-cyg - cygwin package manager:

  lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
  install apt-cyg /bin

Install ImageMagick:

  apt-cyg install ImageMagick

Download and install Java JDK from here, then restart your PC for the env vars to reflect

Copy the binaries to /usr/local/bin:

  cp bin/* to /usr/local/bin

Add this to your ~/.bash_profile:

  export PERLLIB=$PATH

How it Works

Gitdown exploits github.com's willingness to serve image blobs and Markdown documents that refer to them. This means you can publish a document with correctly-formatted links, together with images, in a single Git operation. It is a neat and comfortable way to work. Kudos to Stathis Sideris for making Ditaa. Gitdown also adds a preprocessing layer for symbolic insertion and simple macros like 'table of contents'. This code was recycled from htmlpp, a HTML preprocessor that looked a lot like Markdown.

The Gitdown workflow is:

2

  1. You edit a text file that contains text and diagrams in a single document.
  2. You process this document with Gitdown to give a Markdown document plus a number of images in an images subdirectory.
  3. You add the output (Markdown and images) to your commit set and push that to the repository.
  4. The Markdown document is now readable, with images, via the github.com user interface.

This README acts as an example.

Gitdown Syntax Summary

Gitdown is a pre-processor that adds these syntax elements on top of Markdown:

[diagram]                   Defines a ditaa diagram block
[/diagram]                  # represents diagram number 1..n

.- comment                  Comment line
.set name=value             Sets Gitdown symbol
.sub oldval=newval          Replaces oldval by newval in every line
.toc [top]                  Insert table of contents
.pull srcfile[@tag][,opts]  Pull a chunk of text, or the whole file, from srcfile
.end                        Everything past this is ignored

$\(xxx)                     Value of variable, anywhere in text
$\(xxx?zzz)                 Value of variable, or zzz if undefined
%\(text?zzz)                Value of environment variable, or zzz if undef
&abc\(text)                 Intrinsic function with arguments

time()                      Format current time as hh:mm:ss
date()                      Return current date value
date("picture")             Format current date using picture
date("picture", date, lc)   Format specified date using picture & language
week_day([date])            Get day of week, 0=Sunday to 6=Saturday
year_week([date])           Get week of year, 1 is first full week
julian_date([date])         Get Julian date for date
lillian_date([date])        Get Lillian date for date
date_to_days(date)          Convert yyyymmdd to Lillian date
days_to_date(days)          Convert Lillian date to yyyymmdd
future_date(days[,date])    Calculate a future date
past_date(days[,date])      Calculate a past date
date_diff(date1[,date2])    Calculate date1 - date2
image_height("image.ext")   Get image height (GIF, JPEG)
image_width("image.ext")    Get image width (GIF, JPEG)
file_size("filename",arg)   Get size of file: optional arg K or M
file_date("filename")       Get date of file
file_time("filename")       Get time of file as hh:mm:ss
normalise("filename")       Normalise filename to UNIX format
system("command")           Call a system utility
lower("string")             Convert string to lower case
upper("string")             Convert string to upper case

The top argument for .toc tells it the top header level in the text. Lower levels are shown horizontally. E.g. this file has level 2 headers in the text and uses .toc 1 to get these laid-out on a single row.

If the .pull command includes an optional @tag, the named chunk of text is pulled from the source file. A chunk of text is identified by '@tag' anywhere in the line before the chunk, and any other tag signalling the end. '@end' can be used to close any chunk. Tag names must be alphanumeric. If @tag is omitted, the entire file is included.

The opts argument for .pull can be: 'code' to indicate the results should be indented 4 spaces. An opts of 'left' removes any left margin.

These symbols have special meaning:

  • GIT defines the root HTTP URL of the git repository.
  • BRANCH defines the respository branch, defaults to 'master'.
  • SUBDIR defines the sub/dir/ to the current file, if not empty, should end in / if not empty.

These symbols are predefined by gitdown for you:

  • INPUT specifies the original input file name.
  • SELF specifies the input file name without extension.
  • OUTPUT specifies the current output file name,

Markdown Syntax Summary

This is an extract of the most useful Markdown syntax.

# Header 1              or follow by ===== on next line
## Header 2             or follow by ----- on next line
### Header 3
#### Header 4

> Blockquote            can continue over multiple lines
* List item             can continue over multiple lines
1. List item            can continue over multiple lines

    code block          indented 4 spaces

<url>                   automatic link, e.g. <[email protected]>
![alt](url)             image link
[text](url)             inline link
[text][]                implicit reference link
  [text]: url           defined later in document

*emphasis*              usually, italics
**strong**              usually, bold
`Code`                  fixed-space font
  • You can put HTML anywhere in your text.
  • Blank lines separate paragraphs.
  • For more details see the markdown syntax page.

This documentation was generated from gitdown/README.txt using Gitdown

More Repositories

1

libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
C++
8,996
star
2

pyzmq

PyZMQ: Python bindings for zeromq
Python
3,480
star
3

netmq

A 100% native C# implementation of ZeroMQ for .NET
C#
2,822
star
4

jeromq

Pure Java ZeroMQ
Java
2,288
star
5

cppzmq

Header-only C++ binding for libzmq
C++
1,737
star
6

zeromq.js

⚡ Node.js bindings to the ØMQ library
TypeScript
1,371
star
7

zmq.rs

A native implementation of ØMQ in Rust
Rust
1,124
star
8

czmq

High-level C binding for ØMQ
C
1,110
star
9

zyre

Zyre - an open-source framework for proximity-based peer-to-peer applications
C
843
star
10

jzmq

Java binding for ZeroMQ
Java
584
star
11

goczmq

goczmq is a golang wrapper for CZMQ.
Go
552
star
12

php-zmq

ZeroMQ for PHP
C
543
star
13

zeromq4-x

ØMQ 4.x stable release branch - bug fixes only
C++
446
star
14

zmqpp

0mq 'highlevel' C++ bindings
C++
418
star
15

zeromq2-x

ØMQ/2.x distribution
C++
365
star
16

malamute

The ZeroMQ Enterprise Messaging Broker
C
311
star
17

gomq

Pure Go Implementation of a Subset of ZeroMQ
Go
290
star
18

clrzmq

CLR (.NET & Mono) binding for 0MQ
C#
272
star
19

filemq

FileMQ is a publish-subscribe file service based on 0MQ
Java
271
star
20

rbzmq

Ruby binding for 0MQ
C
248
star
21

clrzmq4

ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)
C#
235
star
22

zproto

A protocol framework for ZeroMQ
C
228
star
23

zeromq3-x

ØMQ/3.2 release branch - bug fixes only
C++
228
star
24

JSMQ

Javascript client for ZeroMQ/NetMQ
JavaScript
190
star
25

chumak

Pure Erlang implementation of ZeroMQ Message Transport Protocol.
Erlang
189
star
26

erlzmq2

Erlang binding for 0MQ (v2)
C
165
star
27

libcurve

An encryption and authentication library for ZeroMQ applications
C
161
star
28

zproject

CLASS Project Generator
Shell
142
star
29

lzmq

Lua binding to ZeroMQ
Lua
133
star
30

zeromq4-1

ZeroMQ 4.1.x stable release branch - bug fixes only
C++
125
star
31

exzmq

ZeroMQ for Elixir
Elixir
116
star
32

pyre

Python port of Zyre
Python
116
star
33

fszmq

An F# binding for the ZeroMQ distributed computing library. For more information, please visit:
F#
112
star
34

majordomo

Majordomo Project
C
111
star
35

cljzmq

Clojure bindings for ØMQ
Clojure
105
star
36

rfc

ZeroMQ RFC project
C
104
star
37

dafka

Dafka is a decentralized distributed streaming platform
C
101
star
38

gyre

Golang port of Zyre
Go
87
star
39

zwssock

ZeroMQ WebSocket library for CZMQ
C
85
star
40

jszmq

Javascript port of zeromq
TypeScript
80
star
41

libzmtp

Minimal ZMTP implementation in C
C
53
star
42

ingescape

Model-based framework for broker-free distributed software environments. Any language, any OS, web, cloud.
C
52
star
43

zbroker

Elastic pipes
C
50
star
44

czmqpp

C++ wrapper for czmq. Aims to be minimal, simple and consistent.
C++
43
star
45

zeromq.org

ZeroMQ Website
HTML
32
star
46

cookbook

ZeroMQ Cookbook
Python
32
star
47

pyczmq

Python CZMQ bindings
Python
31
star
48

zebra

REST/HTTP to XRAP gateway
C++
27
star
49

zmtpdump

ZeroMQ Transport Protocol packet analyzer
Roff
26
star
50

jeromq-jms

JeroMQ JMS
Java
25
star
51

jzmq-api

A Java ØMQ API for abstracting the various implementations of ZeroMQ Message Transport Protocol
Java
24
star
52

zmq-jni

Simple High Performance JNI Wrapper for ØMQ
Java
22
star
53

perlzmq

version agnostic Perl bindings for zeromq
Perl
22
star
54

zmtp

Stuff related to the ZMTP protocol
C
18
star
55

contiki-zmtp

ZMTP for Contiki OS
C
16
star
56

zccp

ZeroMQ Command & Control Protocol
Go
14
star
57

jyre

Java implementation of ZRE protocol
Java
14
star
58

f77_zmq

Fortran binding for ZeroMQ
C
13
star
59

ztools

Tools for ØMQ auto-builds and API site
Perl
12
star
60

zeps

ZeroMQ Enterprise Publish-Subscribe (ZEPS) **DEPRECATED**
C
12
star
61

mruby-zmq

mruby bindings for libzmq (v4)
C
11
star
62

zeromq2-0

Packaging project for ØMQ/2.0 series
C++
9
star
63

zkernel

z kernel
C
9
star
64

nimczmq

Nim ( http://nim-lang.org/ ) bindings for CZMQ
Nim
6
star
65

curvezmq-java

Java
5
star
66

gozyre

Go bindings for zeromq libzyre - an open-source framework for proximity-based peer-to-peer applications
Go
5
star
67

issues

Issue test cases
C
4
star
68

zdiscgo

CZMQ service discovery zactor with support for Go plugins.
C
4
star
69

jdafka

Dafka protocol implementation in Java
Java
4
star
70

zlabs

Labs project for experimenting with CZMQ
Shell
4
star
71

zeromq-buildbot

A buildbot based regression tester for Zeromq
Python
3
star
72

azmq1-0

v1.0 release of azmq
C++
3
star
73

lyre

Lua port of Zyre
Lua
3
star
74

jeromq3-x

Java
3
star
75

jzmq3-x

Java
2
star
76

zmtp-java

Java
2
star
77

libzmq-relicense

This repo contains information regarding re-licensing libzmq
Python
2
star
78

clrzmq2

Old repository path for clrzmq
2
star
79

libzmq-fuzz-corpora

fuzzers corpus files for libzmq are stored in binary format in this repository
1
star
80

zeromq-download-redirect

HTML
1
star