1. 14 3月, 2017 1 次提交
  2. 01 12月, 2016 1 次提交
  3. 17 11月, 2016 3 次提交
  4. 22 9月, 2016 1 次提交
    • L
      [media] v4l: doc: Remove row numbers from tables · c2b66caf
      Laurent Pinchart 提交于
      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: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      c2b66caf
  5. 09 9月, 2016 4 次提交
  6. 23 8月, 2016 1 次提交
  7. 22 8月, 2016 5 次提交
    • M
      [media] docs-rst: fix some LaTeX errors when in interactive mode · 8c978c08
      Mauro Carvalho Chehab 提交于
      There are several minor issues that are seen when building
      PDF on interactive mode.
      
      Fix them.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      8c978c08
    • M
      [media] subdev-formats.rst: adjust tables size for LaTeX output · a3045153
      Mauro Carvalho Chehab 提交于
      There are two big tables here that are very hard to adjust its
      size.
      
      The first one would fit into one page, but the latex.py logic
      at Sphinx auto-switches to longtable when there are more than 30
      rows. There's no way to override without coding.
      
      The second one is really big, and won't fit on a single page.
      So, it has to use tiny font to fit.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      a3045153
    • M
      [media] docs-rst: fix warnings introduced by LaTeX patchset · fa92b04d
      Mauro Carvalho Chehab 提交于
      Sphinx is really pedantic with respect to the order where
      table tags and references are created. Putting things at
      the wrong order causes troubles.
      
      The order that seems to work is:
      
      	.. raw:: latex
      
      	.. tabularcolumns::
      
      	.. _foo_name:
      
      	.. cssclass: longtable
      
      	.. flat-table::
      
      Reorder the tags to the above order, to avoid troubles, and
      fix remaining warnings introduced by media recent patches.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      fa92b04d
    • M
      [media] subdev-formats.rst: adjust most of the tables to fill in page · 2ec70874
      Mauro Carvalho Chehab 提交于
      Fix mosto fo the tables there in order to make them fit at the
      page size.
      
      There are, however, two exceptions: RGB and YUV big tables,
      where adding the raw latex adjustbox caused the tables to not
      be properly formatted. I suspect that the problem is because
      those are long tables, but not really sure.
      
      The thing is that Sphinx lacks an "adjustbox" tag that would
      avoid the raw latex hacks.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      2ec70874
    • M
      [media] docs-rst: add tabularcolumns to all tables · 5bd4bb78
      Mauro Carvalho Chehab 提交于
      LaTeX doesn't handle too well auto-width on tables, and ReST
      markup requires an special tag to give it the needed hints.
      
      As we're using A4 paper, we have 17cm of useful spaces. As
      most media tables have widths, let's use it to generate the
      needed via the following perl script:
      
      my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
      my $out;
      my $header = "";
      my @widths = ();
      sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
      while (<>) {
      	if (!$table_header) {
      		$has_cols = 1 if (m/..\s+tabularcolumns::/);
      		if (m/..\s+flat-table::/) {
      			$table_header = 1;
      			$header = $_;
      			next;
      		}
      		$out .= $_;
      		next;
      	}
      	$header .= $_;
      	@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
      	if (m/^\n$/) {
      		if (!$has_cols && @widths) {
      			my ($tot, $t, $i) = (0, 0, 0);
      			foreach my $v(@widths) { $tot += $v; };
      			$out .= ".. tabularcolumns:: |";
      			for ($i = 0; $i < scalar @widths - 1; $i++) {
      				my $v = $widths[$i];
      				my $w = round(10 * ($v * $line_size) / $tot) / 10;
      				$out .= sprintf "p{%.1fcm}|", $w;
      				$t += $w;
      			}
      			my $w = $line_size - $t;
      			$out .= sprintf "p{%.1fcm}|\n\n", $w;
      		}
      		$out .= $header;
      		$table_header = 0;
      		$has_cols = 0;
      		$header = "";
      		@widths = ();
      	}
      }
      print $out;
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      5bd4bb78
  8. 13 7月, 2016 2 次提交
  9. 08 7月, 2016 2 次提交
  10. 05 7月, 2016 2 次提交
  11. 04 7月, 2016 1 次提交
  12. 01 7月, 2016 1 次提交