From 526de11fe8aec8f9ed8099ab7c3859afeb1e83a4 Mon Sep 17 00:00:00 2001 From: Chevdor Date: Tue, 24 Jul 2018 11:12:53 +0200 Subject: [PATCH] WIP: Asciidoc (#407) * Rename readme * Add some Asciidoc demo * Remove extra lines --- polkadot/api/README.adoc | 5 ++++ polkadot/cli/README.adoc | 11 +++++++ polkadot/cli/doc/shell-completion.adoc | 41 ++++++++++++++++++++++++++ polkadot/collator/README.adoc | 5 ++++ polkadot/consensus/README.adoc | 5 ++++ polkadot/executor/README.adoc | 5 ++++ polkadot/network/README.adoc | 5 ++++ polkadot/parachain/README.adoc | 5 ++++ polkadot/primitives/README.adoc | 5 ++++ polkadot/runtime/README.adoc | 5 ++++ polkadot/service/README.adoc | 5 ++++ polkadot/src/README.adoc | 5 ++++ polkadot/statement-table/README.adoc | 5 ++++ polkadot/transaction-pool/README.adoc | 5 ++++ 14 files changed, 112 insertions(+) create mode 100644 polkadot/api/README.adoc create mode 100644 polkadot/cli/README.adoc create mode 100644 polkadot/cli/doc/shell-completion.adoc create mode 100644 polkadot/collator/README.adoc create mode 100644 polkadot/consensus/README.adoc create mode 100644 polkadot/executor/README.adoc create mode 100644 polkadot/network/README.adoc create mode 100644 polkadot/parachain/README.adoc create mode 100644 polkadot/primitives/README.adoc create mode 100644 polkadot/runtime/README.adoc create mode 100644 polkadot/service/README.adoc create mode 100644 polkadot/src/README.adoc create mode 100644 polkadot/statement-table/README.adoc create mode 100644 polkadot/transaction-pool/README.adoc diff --git a/polkadot/api/README.adoc b/polkadot/api/README.adoc new file mode 100644 index 0000000000..8f382d4f43 --- /dev/null +++ b/polkadot/api/README.adoc @@ -0,0 +1,5 @@ + += Polkadot API + +placeholder +//TODO Write content :) diff --git a/polkadot/cli/README.adoc b/polkadot/cli/README.adoc new file mode 100644 index 0000000000..54fa5f3f32 --- /dev/null +++ b/polkadot/cli/README.adoc @@ -0,0 +1,11 @@ + += Polkadot CLI + +== Summary + +[source, toml] +---- +include::Cargo.toml[lines=2..5] +---- + +include::doc/shell-completion.adoc[] diff --git a/polkadot/cli/doc/shell-completion.adoc b/polkadot/cli/doc/shell-completion.adoc new file mode 100644 index 0000000000..2486bed09e --- /dev/null +++ b/polkadot/cli/doc/shell-completion.adoc @@ -0,0 +1,41 @@ + +== Shell completion + +The Polkadot cli command supports shell auto-completion. For this to work, you will need to run the completion script matching you build and system. + +Assuming you built a release version using `cargo build --release` and use `bash` run the following: + +[source, shell] +source target/release/completion-scripts/polkadot.bash + +You can find completion scripts for: +- bash +- fish +- zsh +- elvish +- powershell + +To make this change persistent, you can proceed as follow: + +.First install + +[source, shell] +---- +COMPL_DIR=$HOME/.completion +mkdir -p $COMPL_DIR +cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/ +echo "source $COMPL_DIR/polkadot.bash" >> $HOME/.bash_profile +source $HOME/.bash_profile +---- + +.Update + +When you build a new version of Polkadot, the following will ensure you auto-completion script matches the current binary: + +[source, shell] +---- +COMPL_DIR=$HOME/.completion +mkdir -p $COMPL_DIR +cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/ +source $HOME/.bash_profile +---- diff --git a/polkadot/collator/README.adoc b/polkadot/collator/README.adoc new file mode 100644 index 0000000000..3a5408b489 --- /dev/null +++ b/polkadot/collator/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Collator + +placeholder +//TODO Write content :) diff --git a/polkadot/consensus/README.adoc b/polkadot/consensus/README.adoc new file mode 100644 index 0000000000..a3ac5f631c --- /dev/null +++ b/polkadot/consensus/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Consensus + +placeholder +//TODO Write content :) diff --git a/polkadot/executor/README.adoc b/polkadot/executor/README.adoc new file mode 100644 index 0000000000..1c91cccab5 --- /dev/null +++ b/polkadot/executor/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Executor + +placeholder +//TODO Write content :) diff --git a/polkadot/network/README.adoc b/polkadot/network/README.adoc new file mode 100644 index 0000000000..1c2ad29b1b --- /dev/null +++ b/polkadot/network/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Network + +placeholder +//TODO Write content :) diff --git a/polkadot/parachain/README.adoc b/polkadot/parachain/README.adoc new file mode 100644 index 0000000000..fbce59a188 --- /dev/null +++ b/polkadot/parachain/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Parachain + +placeholder +//TODO Write content :) diff --git a/polkadot/primitives/README.adoc b/polkadot/primitives/README.adoc new file mode 100644 index 0000000000..a8468a0cd9 --- /dev/null +++ b/polkadot/primitives/README.adoc @@ -0,0 +1,5 @@ + += Polkadot primitives + +placeholder +//TODO Write content :) diff --git a/polkadot/runtime/README.adoc b/polkadot/runtime/README.adoc new file mode 100644 index 0000000000..86dc313134 --- /dev/null +++ b/polkadot/runtime/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Runtime + +placeholder +//TODO Write content :) diff --git a/polkadot/service/README.adoc b/polkadot/service/README.adoc new file mode 100644 index 0000000000..3de3867128 --- /dev/null +++ b/polkadot/service/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Service + +placeholder +//TODO Write content :) diff --git a/polkadot/src/README.adoc b/polkadot/src/README.adoc new file mode 100644 index 0000000000..fed228df0b --- /dev/null +++ b/polkadot/src/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Src + +placeholder +//TODO Write content :) diff --git a/polkadot/statement-table/README.adoc b/polkadot/statement-table/README.adoc new file mode 100644 index 0000000000..402f55108f --- /dev/null +++ b/polkadot/statement-table/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Statement table + +placeholder +//TODO Write content :) diff --git a/polkadot/transaction-pool/README.adoc b/polkadot/transaction-pool/README.adoc new file mode 100644 index 0000000000..868a3434b3 --- /dev/null +++ b/polkadot/transaction-pool/README.adoc @@ -0,0 +1,5 @@ + += Polkadot Transactin pool + +placeholder +//TODO Write content :)