Skip to content

vvakame/ptproc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ptproc - Plain Text PROCessor

review-preproc (JA) like text processor.

Install

$ go install github.com/vvakame/ptproc/cmd/ptproc

mapfile directive

mapfile directive embeds specified file.

Hello, world!
mapfile:external.txt
mapfile.end
Good night, world.
Good afternoon, world.
Hello, world!
mapfile:external.txt
Good afternoon, world.
mapfile.end
Good night, world.

maprange directive

maprange directive embeds segment of the specified file.

Hello, world!
maprange:external.txt,targetB
maprange.end
Good night, world.
foo
range:targetA
Good afternoon, world.
range.end
range:targetB
Good evening, world.
range.end
bar
Hello, world!
maprange:external.txt,targetB
Good evening, world.
maprange.end
Good night, world.

examples

$ ptproc ./_misc/testdata/**/testcase/test.md
$ docker run -v "$(pwd):/work" ghcr.io/vvakame/ptproc \
    --logLevel debug \
    --replace \
    --config ./_misc/config/default/testcase/ptproc.yaml \
    --glob "./_misc/testdata/*/*/testcase/test.md"