mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
89a66d7610
This script uses pandoc to convert existing DocBook template files to RST templates. A couple of sed scripts are need to massage things both before and after the conversion, but the result is then usable with no hand editing. [Jani: Change usage to tmplcvt <in> <out>. Fix escaping for docproc directives. Add support the new kernel-doc extension.] Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
20 lines
301 B
Bash
Executable File
20 lines
301 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Convert a template file into something like RST
|
|
#
|
|
# fix <function>
|
|
# feed to pandoc
|
|
# fix \_
|
|
# title line?
|
|
#
|
|
|
|
in=$1
|
|
rst=$2
|
|
tmp=$rst.tmp
|
|
|
|
cp $in $tmp
|
|
sed --in-place -f convert_template.sed $tmp
|
|
pandoc -s -S -f docbook -t rst -o $rst $tmp
|
|
sed --in-place -f post_convert.sed $rst
|
|
rm $tmp
|