1 ! Copyright (C) 2017 Alexander Ilin.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays combinators.short-circuit formatting io
4 io.directories.search io.encodings.utf8 io.files io.pathnames
5 kernel math namespaces prettyprint sequences ui.gadgets.panes
10 : all-docs-files ( -- seq )
12 recursive-directory-files [ "-docs.factor" tail? ] filter
17 dup utf8 file-lines [ 1 + 2array ] map-index
20 { [ CHAR: space = ] [ CHAR: " = ] } 1||
26 [ first2 swap "%d: %s\n" printf ] each