We've got a RST table in sphinx that looks like this:
+-------------------------+---------------------------------------------+-----------------------------------------+
| Key | Appearance in the administration | Value |
+=========================+=============================================+=========================================+
| |text_line| | simple text input | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |text_area| | text area | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |text_editor| | text editor with formatting capabilities | HTML string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |checkbox| | checkbox | boolean |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |single_select| | list of radio buttons | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |multiple_select| | list of checkboxes | array of strings |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |color| | color picker | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |date| | date picker | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |time| | text input with time validation | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |url| | text input with URL validation | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |email| | text input with email validation | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |password| | password input | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |phone| | text input for a phone number | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |internal_links| | widget for selecting links to other pages | resolved pages as defined in parameters |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |single_internal_link| | widget for selecting a single page | resolved page as defined in parameters |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |smart_content| | widget for configuring a data source | resolved pages as defined in parameters |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |resource_locator| | widget for entering the URL of a page | string |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |tag_list| | autocomplete input for entering and adding | array of strings |
| | tags | |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |category_list| | autocomplete input for entering and adding | array of strings |
| | tags | |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |media_selection| | widget for selecting media (images, | array containing arrays with |
| | documents) | urls for every format |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |contact_selection| | widget for selecting contacts | array containing array representations | |
| | | of the contact objects |
+-------------------------+---------------------------------------------+-----------------------------------------+
| |snippet| | widget for selecting snippets | array containing array representations |
| | | of the snippets |
+-------------------------+---------------------------------------------+-----------------------------------------+
Since recently I get the following error when trying to build the documentation using make build:
ERROR: Malformed table.
It also outputs this table again, but without any hint what is wrong here, and I can't find it. Can anybody help me out?
While trying to format the code correctly I found the error on my own... The row for contact_selection contained a pipe at the very end of the line, after some tabs...
Related
I have a Google Sheet that contains names of characters, together with corresponding values for the group name, "selected" and attack power. It looks like this:
Sheet1
| NAME | GROUP NAME | SELECTED | ATTACK POWER |
|:---------|:-----------|----------:|-------------:|
| guile | Team Red | 1 | 333 |
|----------|------------|-----------|--------------|
| blanka | Team Red | 1 | 50 |
|----------|------------|-----------|--------------|
| sagat | Team Red | | 500 |
|----------|------------|-----------|--------------|
| ruy | Team Blue | 1 | 450 |
|----------|------------|-----------|--------------|
| vega | Team Blue | 2 | 150 |
Sheet2
In my second sheet, I have two columns. Group name, which contains names of each team from Sheet1 and names, which contains my current ArrayFormula:
=ARRAYFORMULA(TEXTJOIN(CHAR(10); 1;
REPT('Sheet1'!A:A; 1*('Sheet1'!B:B=A2))))
Using this formula I can combine all characters into one cell (with textjoin, repeated with row breaks) based on the value in Group name. The result looks like the following:
| GROUP NAME | NAME |
|:-----------|:--------------------------|
| Team Red | guile |
| | blanka |
| | sagat |
|------------|---------------------------|
| Team Blue | ruy |
| | vega |
|------------|---------------------------|
The problem is that I only want to combine the characters with having a selected value of 1. End-result should instead look like this:
| GROUP NAME | NAME |
|:-----------|:--------------------------|
| Team Red | guile |
| | blanka |
|------------|---------------------------|
| Team Blue | ruy |
|------------|---------------------------|
I tried the following setup using a IF-statement, but it just returns a string of FALSE:
=ARRAYFORMULA(TEXTJOIN(CHAR(10); 1;
REPT(IF('Sheet1'!C:C="1";'Sheet1'!A:A); 1*('Sheet1'!B:B=A2))))
Can this be one?
paste in F2 cell:
=UNIQUE(FILTER(B:B, C:C=1))
paste in G2 cell and drag down:
=TEXTJOIN(CHAR(10), 1, FILTER(A:A, B:B=F2, C:C=1))
or G2 cell be like:
=ARRAYFORMULA(TEXTJOIN(CHAR(10), 1,
REPT(FILTER(Sheet1!A:A, Sheet1!C:C=1), 1*(FILTER(Sheet1!B:B, Sheet1!C:C=1)=F2))))
When I use the following code:
+----------------------+---------------+---------------------------------------------------------------------+
| A | B | C |
+======================+===============+=====================================================================+
| Merchant Rating | Ad Extension | Star ratings plus number of reviews for the advertiser/merchant. |
| | | |
| | |.. image:: /images/merchant-rating.png |
+----------------------+---------------+---------------------------------------------------------------------+
The text preceding the image in column C gets wrapped in <blockquote> tags in the HTML output. Is there any way to avoid this?
To avoid the blockquote tag in the first paragraph of the third column, you could try using this:
+----------------------+---------------+---------------------------------------------------------------------+
| A | B | C |
+======================+===============+=====================================================================+
| Merchant Rating | Ad Extension | Star ratings plus number of reviews for the advertiser/merchant. |
| | | |
| | | |img| |
+----------------------+---------------+---------------------------------------------------------------------+
.. |img| image:: /images/merchant-rating.png
Instead, you'll get two paragraphs.
Use a substitution and remove the separating line so that Sphinx interprets the content as a single block of text.
+-----------------+--------------+------------------------------------------------------------------+
| A | B | C |
+=================+==============+==================================================================+
| Merchant Rating | Ad Extension | Star ratings plus number of reviews for the advertiser/merchant. |
| | | |img| |
+-----------------+--------------+------------------------------------------------------------------+
.. |img| image:: /images/merchant-rating.png
I have a sample output from a command
+--------------------------------------+------------------+---------------------+-------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+-------------------------------------+
| 04584e8a-c210-430b-8028-79dbf741797c | | 99.99.99.91 | |
| 12d2257c-c02b-4295-b910-2069f583bee5 | 20.0.0.92 | 99.99.99.92 | 37ebfa4c-c0f9-459a-a63b-fb2e84ab7f92 |
| 98c5a929-e125-411d-8a18-89877d3c932b | | 99.99.99.93 | |
| f55e54fb-e50a-4800-9a6e-1d75004a2541 | 20.0.0.94 | 99.99.99.94 | fe996e76-ffdb-4687-91a0-9b4df2631b4e |
+--------------------------------------+------------------+---------------------+-------------------------------------+
Now I want to fetch all the "floating _ip_address" for which "port_id" & "fixed_ip_address" fields are blank/empty (In above sample 99.99.99.91 & 99.99.99.93)
How can I do it with shell scripting?
You can use sed:
fl_ips=($(sed -nE 's/\|.*\|.*\|(.*)\|\s*\|/\1/p' inputfile))
Here inputfile is the table provided in the question. The array fl_ips contains the output of sed:
>echo ${#fl_ips[#]}
2 # Array has two elements
>echo ${fl_ips[0]}
99.99.99.91
>echo ${fl_ips[1]}
99.99.99.93
I am working with JasperReports 4.5.0, Spring 3.0.5 RELEASE. I am exporting my JR report in pdf, html, csv formats. With pdf, html the report is generating fine.
But when i am exporting my report in csv it is displaying all the fields and values in one column only. My code flow is exactly like this link.
Below is the example how I am getting now.
| A | B | C | D |
|S.No,IPAddress,TotalDuration,TotalBdrCount | | | |
|1,null,266082,null | | | |
2,null,null,null | | | |
3,null,null,null | | | |
4,null,null,null | | | |
Where S.No,IPAddress,TotalDuration,TotalBdrCount are the column headers and 1,null,266082,null are the values to the respective columns.
But my requirement is
| A | B | C | D |
| S.No | IPAddress | TotalDuration | TotalBdrCount |
I think you understood my problem. For this am i need to set any parameters? I am not getting. Can any one help me out regarding this issue.
I have these DB tables:
taggings
id | integer | not null default nextval('taggings_id_seq'::regclass) | plain |
tag_id | integer | | plain |
taggable_id | integer | | plain |
taggable_type | character varying(255) | | extended |
tagger_id | integer | | plain |
tagger_type | character varying(255) | | extended |
context | character varying(128) | | extended |
created_at | timestamp without time zone | | plain |
tags
id | integer | not null default nextval('tags_id_seq'::regclass) | plain |
name | character varying(255) | | extended |
These tables are created by the acts-as-taggable-on gem.
I am trying to get the count of most used tags that are stored in the table taggings, but I have no idea how to get them...
Could anyone give me some tip or link, how to get that?