alistair23-linux/Documentation/media/uapi/v4l
Laurent Pinchart c2b66cafdf [media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.

All changes have been generated by the following script.

import io
import re
import sys

def process_table(fname, data):
	if fname.endswith('hist-v4l2.rst'):
		data = re.sub(u'\n{1,2}\t( ?)  -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
		data = re.sub(u'\n(\t|       )-  \.\. row [0-9]+\n\t  ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
	else:
		data = re.sub(u'\n{1,2}       -( ?) ?', u'\n      -\\1', data, flags = re.MULTILINE)
		data = re.sub(u'(\n?)(\n\n    -  \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
		data = re.sub(u'\n    -  \.\. row [0-9]+\n      -( ?) ?', u'    * -\\1', data, flags = re.MULTILINE)
		data = re.sub(u'\n    -  \.\. row [0-9]+\n       \.\. (_[A-Z0-9_`-]*:)', u'\n    -  .. \\1', data, flags = re.MULTILINE)
		data = re.sub(u'\n    -  \.\. (_[A-Z0-9_`-]*:)\n      -', u'    * .. \\1\n\n      -', data, flags = re.MULTILINE)
		data = re.sub(u'^       - ', u'      -', data, flags = re.MULTILINE)
		data = re.sub(u'^(\t{1,2})  ', u'\\1', data, flags = re.MULTILINE)

	return data

def process_file(fname, data):
	buf = io.StringIO(data)
	output = ''
	in_table = False
	table_separator = 0

	for line in buf.readlines():
		if line.find('.. flat-table::') != -1:
			in_table = True
			table = ''
		elif in_table and not re.match('^[\t\n]|(    )', line):
			in_table = False
			output += process_table(fname, table)

		if in_table:
			table += line
		else:
			output += line

	if in_table:
		in_table = False
		output += process_table(fname, table)

	return output

fname = sys.argv[1]

data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-22 07:03:14 -03:00
..
crop_files
dev-raw-vbi_files [media] docs-rst: re-generate vbi_525.pdf and vbi_625.pdf 2016-08-22 10:18:16 -03:00
dev-subdev_files
field-order_files
pixfmt-nv12mt_files
selection-api-003_files
subdev-formats_files
vidioc-g-selection_files
app-pri.rst
async.rst
audio.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
biblio.rst
buffer.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
capture-example.rst
capture.c.rst
colorspaces.rst
common-defs.rst
common.rst
compat.rst
control.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
crop.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
depth-formats.rst
dev-capture.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
dev-codec.rst [media] docs-rst: better use the .. note:: tag 2016-08-22 10:02:29 -03:00
dev-effect.rst
dev-event.rst
dev-osd.rst [media] docs-rst: fix some broken struct references 2016-09-09 09:55:18 -03:00
dev-output.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
dev-overlay.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
dev-radio.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
dev-raw-vbi.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dev-rds.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dev-sdr.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dev-sliced-vbi.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dev-subdev.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dev-teletext.rst
dev-touch.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
devices.rst [media] Documentation: add support for V4L touch devices 2016-08-23 16:39:23 -03:00
diff-v4l.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
dmabuf.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
driver.rst
dv-timings.rst
extended-controls.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
field-order.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
format.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
func-close.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
func-ioctl.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
func-mmap.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
func-munmap.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
func-open.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
func-poll.rst [media] docs-rst: fix two wrong :name: tags 2016-09-09 09:58:26 -03:00
func-read.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
func-select.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
func-write.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
hist-v4l2.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
io.rst
libv4l-introduction.rst [media] libv4l-introduction.rst: improve crossr-references 2016-09-09 09:56:33 -03:00
libv4l.rst
mmap.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
open.rst
pixfmt-002.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-003.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-004.rst
pixfmt-006.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-007.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-008.rst
pixfmt-013.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-grey.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-indexed.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-m420.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-nv12.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-nv12m.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-nv12mt.rst [media] docs-rst: remove width hints from pixfmt byte order tables 2016-08-22 10:16:18 -03:00
pixfmt-nv16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-nv16m.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-nv24.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-packed-rgb.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-packed-yuv.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-reserved.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-rgb.rst [media] doc-rst: Unify documentation of the 8-bit bayer formats 2016-09-09 11:08:47 -03:00
pixfmt-sbggr16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-sdr-cs08.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-sdr-cs14le.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-sdr-cu08.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-sdr-cu16le.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-sdr-ru12le.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-srggb8.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-srggb10.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-srggb10alaw8.rst [media] docs-rst: remove width hints from pixfmt byte order tables 2016-08-22 10:16:18 -03:00
pixfmt-srggb10dpcm8.rst
pixfmt-srggb10p.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-srggb12.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-tch-td08.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-tch-td16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-tch-tu08.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-tch-tu16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-uv8.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-uyvy.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-vyuy.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y8i.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y10.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y10b.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y12.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y12i.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y16-be.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-y41p.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv410.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv411p.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv420.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv420m.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv422m.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv422p.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuv444m.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yuyv.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-yvyu.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt-z16.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
pixfmt.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
planar-apis.rst [media] docs-rst: fix cross-references for videodev2.h 2016-09-09 09:57:23 -03:00
querycap.rst
rw.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
sdr-formats.rst
selection-api-002.rst
selection-api-003.rst
selection-api-004.rst
selection-api-005.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
selection-api-006.rst
selection-api.rst
selections-common.rst
standard.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
streaming-par.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
subdev-formats.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
tch-formats.rst [media] Documentation: add support for V4L touch devices 2016-08-23 16:39:23 -03:00
tuner.rst [media] docs-rst: fix cross-references for videodev2.h 2016-09-09 09:57:23 -03:00
user-func.rst
userp.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
v4l2-selection-flags.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
v4l2-selection-targets.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
v4l2.rst [media] docs-rst: fix cross-references for videodev2.h 2016-09-09 09:57:23 -03:00
v4l2grab-example.rst
v4l2grab.c.rst
video.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
videodev.rst
vidioc-create-bufs.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-cropcap.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-dbg-g-chip-info.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-dbg-g-register.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-decoder-cmd.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-dqevent.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-dv-timings-cap.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-encoder-cmd.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enum-dv-timings.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enum-fmt.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enum-frameintervals.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enum-framesizes.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enum-freq-bands.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enumaudio.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-enumaudioout.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-enuminput.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enumoutput.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-enumstd.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-expbuf.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-audio.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-audioout.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-crop.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-ctrl.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-dv-timings.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-edid.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-enc-index.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-ext-ctrls.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-fbuf.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-fmt.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-frequency.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-input.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-g-jpegcomp.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-modulator.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-output.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-g-parm.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-priority.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-selection.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-sliced-vbi-cap.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-g-std.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
vidioc-g-tuner.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-log-status.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
vidioc-overlay.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
vidioc-prepare-buf.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
vidioc-qbuf.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
vidioc-query-dv-timings.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-querybuf.rst [media] docs-rst: simplify c:type: cross references 2016-09-09 09:54:54 -03:00
vidioc-querycap.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-queryctrl.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-querystd.rst [media] docs-rst: Convert V4L2 uAPI to use C function references 2016-08-22 21:23:27 -03:00
vidioc-reqbufs.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-s-hw-freq-seek.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-streamon.rst [media] docs-rst: convert uAPI structs to C domain 2016-09-09 09:34:01 -03:00
vidioc-subdev-enum-frame-interval.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-enum-frame-size.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-enum-mbus-code.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-g-crop.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-g-fmt.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-g-frame-interval.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subdev-g-selection.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
vidioc-subscribe-event.rst [media] v4l: doc: Remove row numbers from tables 2016-09-22 07:03:14 -03:00
yuv-formats.rst