From 21cb9ac9e1f2c0a9fc88eff73d8bc9fb8e861dc1 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Mon, 2 Mar 2015 15:21:27 -0300 Subject: [PATCH] feature: pages index. By having an index for the pages, it'd allow clients to build autocomplete's and show an index of pages making only one request (think `tldr list`). Subsequent caching of this file would prevent further requests. Included is a makefile to easily rebuild the index. It could be tailored in case the pages structure changed. In a particular case, the web client would benefit greatly from an index. It'd know exactly what folder a command is in and thus the number of requests would drop from 4 to 1. --- Makefile | 3 + pages/index.md | 189 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 Makefile create mode 100644 pages/index.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..89a2aabade --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +index: + ls -d1 ./pages/**/* | grep .md | awk -F"." '{print $$2}' | awk -F"/" '{print $$4,$$3}' | sort > pages/index.md + @echo "Index rebuilt." diff --git a/pages/index.md b/pages/index.md new file mode 100644 index 0000000000..5216ea5055 --- /dev/null +++ b/pages/index.md @@ -0,0 +1,189 @@ +ab common +ack common +ag common +airport osx +alias common +apropos common +apt-get linux +aptitude linux +ar common +awk common +base64 linux +brew osx +bundle common +caffeinate osx +cal common +cat common +cd common +chmod common +chown common +chsh common +cksum common +convert common +cp common +curl common +cut common +date common +deluser common +df common +diff common +dig common +diskutil osx +dpkg linux +drutil osx +du linux +du osx +echo common +electrum common +emerge linux +env common +exiftool common +fdupes common +ffmpeg common +find common +findmnt linux +firewall-cmd linux +free linux +fswebcam common +gcc common +gem common +gifsicle common +git common +git-add common +git-branch common +git-checkout common +git-clone common +git-commit common +git-diff common +git-init common +git-log common +git-merge common +git-push common +git-stash common +git-status common +gpg common +grep common +gzip common +handbrakecli common +haxelib common +head linux +head osx +iconv common +iostat linux +ip linux +ipcs common +journalctl linux +kill common +less common +ln common +locate linux +locate osx +ls common +lsof common +man common +md5 osx +md5sum linux +mdadm linux +mkdir common +more common +mount common +mp4box common +mtr common +mv common +mysql common +mysqldump common +nc common +netstat linux +networksetup osx +nmap common +node common +nohup common +npm common +open osx +pacman linux +passwd common +patch common +pbcopy osx +pbpaste osx +pgrep common +php common +ping common +pip common +play common +prctl sunos +prstat sunos +ps common +psql common +pushd common +pwd common +qlmanage osx +redis-cli common +rename common +rm common +rmdir common +route osx +rsync common +salt-call common +salt-key common +say osx +scp common +screen common +sed common +sha1sum linux +sha224sum linux +sha256sum linux +sha384sum linux +sha512sum linux +shuf linux +shutdown linux +shutdown osx +sort common +sox common +split common +srm common +ss linux +ssh common +sshfs common +sudo common +svcadm sunos +svccfg sunos +svcs sunos +svn common +sw_vers osx +sysctl osx +system_profiler osx +systemctl linux +systemsetup osx +tail common +tar common +tcpdump common +tcpflow linux +tee common +telnet common +time common +tldr common +tmux common +touch common +traceroute common +tree common +umount common +uname common +unzip common +useradd common +userdel common +userdel linux +usermod common +wacaw osx +wall linux +watch linux +wc common +wget common +which common +wpa_cli linux +xargs linux +xed osx +xsltproc osx +yes common +zfs common +zip common +zpool common