mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
![Jonathan Corbet](/assets/img/avatar_default.png)
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>
19 lines
301 B
Bash
Executable file
19 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
|