Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
de:wiki:csv [2013/04/10 17:26] – de:wiki:syntaxaddon umbenann in de:wiki:csv (passender) MWanke | de:wiki:csv [2024/09/22 00:27] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Syntax-Addon | + | ====== |
- | {{: | + | |
- | ===== CSV ===== | + | Mit dem CSV-Plugin ist es möglich Komma-getrennte-Listen (fälschlich auch als EXcel-Listen bezeichnet) ohne umständliches Konvertieren direkt hier abzulegen und in Tabellenform anzeigen zu lassen. |
- | This is a simple that will display CSV data in table form. The data can either be inline between '' | + | |
+ | Der frühere Default-Wert ' | ||
+ | Die erste Zeile wird voreingestellt als Tabellenkopf dargestellt. Dies kann man ändern (s.u.) | ||
- | The ''%%<csv>%%'' tag allows for additional options to be specified as well as a file reference. | + | Übrigens: für alle Tabellen gilt, daß unterhalb der Tabelle kein zusätzlicher Platz freigehalten wird. Damit werden direkt untereinander stehende Tabellen ermöglicht. Um sich einen Abstand zum folgenden Text zu schaffen, muß ein Wiki-Seiten-Umbruch eingefügt werden |
- | + | ||
- | ^ Option | + | |
- | | '' | + | |
- | | '' | + | |
- | | '' | + | |
- | | '' | + | |
- | | '' | + | |
- | + | ||
- | Other options of the form < | + | |
- | + | ||
- | Cells that include a comma as part of the data are expected to be contained between double quotes, which is the typical behaviour of most systems when exporting .csv files. | + | |
- | + | ||
- | Empty lines in the csv file or data are displayed as horizontal separators in the table. | + | |
+ | ==== Einschränkungen ===== | ||
+ | Leider ist es (noch) nicht möglich Wiki-Syntax und -Links mit einzubinden. D.h. Verlinkungen sind nicht möglich. | ||
+ | Das Plugin ' | ||
- | ===== itemtable | + | ====== |
+ | im Hinblick auf Assembly-Listen umgestrickt: | ||
< | < | ||
- | <itemtable | + | <acsv rowmark=^ marker=~ hdr_rows=1 hdr_cols=0 max_cols=7 border=0 firstno=1 fsize=90 calign=l,c,,-,l |
- | . | + | cwidth=6,4,18,15,12,80 hcolor=# |
- | . | + | |
- | . | + | |
- | </itemtable> | + | |
</ | </ | ||
- | <code> | + | <acsv rowmark=^ marker=~ hdr_rows=1 hdr_cols=0 max_cols=7 border=0 firstno=1 fsize=90 calign=l,c,,-,l cwidth=6,4,18,15,12,80 hcolor=#f0f0fe rcolor=#e8fee8 mcolor=# |
- | < | + | COMMO-#; |
- | </ | + | ;;; |
+ | ^;;Circuit Board;;; | ||
+ | 3xxx; | ||
+ | ;;;;; | ||
+ | ^;;IC Big;;;;; | ||
+ | 390084-01; | ||
- | === Options === | + | 391105-01; |
- | ^Option^Description^Format^Default^ | + | 391084-01; |
- | |c=name,[name,...]|Names fields of the table which are separated by a comma; The order of the colums follows the orders how the columns are listed here | |For legacy reasons, the c{...}=colum could be listed for each individual column individually. | | + | ;;; |
- | |fdelim|Field Delimeter | + | ^;;IC Commo;;; |
- | |header|Table Heading | + | 390544-01; |
- | |twidth|Width of the HTML table |integer |Undefined | + | 391155-01; |
- | |norender|Outputs the DW-tables | + | 391081-01;1; |
+ | 391077-01; | ||
+ | 391079-01;1;KEYBD UP;6571R4 UP; | ||
+ | ~391078-01;2; 8520R4 CIA 1MHZ ;8520R4 CIA 1MHZ ;PLCC44;U7, U8, U7, U8, U7; U8, | ||
+ | 391304-01; | ||
+ | </ | ||
+ | Mit Absicht, um zu verdeutlichen, | ||
+ | Hier in der roten Zeile ist aus einem Komma ein Semikolon geworden und damit werden die folgenden Werte ein Feld weiter angezeigt. | ||
- | **Cellinput over several lines could be enclosed by the pair <tablecell> and </tablecell>.** | + | ====== Syntax ====== |
+ | FIXME | ||
+ | Alle Parameter mit Leerzeichen trennen und Zuweisung: Name=Wert | ||
+ | <acsv hdr_cols=2> | ||
+ | *; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ;enclosure; ; ;" | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | s; | ||
+ | s; | ||
+ | s; | ||
+ | R; | ||
+ | M; | ||
+ | ; | ||
+ | R; | ||
+ | M; | ||
+ | ; | ||
+ | </acsv> | ||
+ | < | ||
- | Note that with twidth, and norender, you must assign some sort of value, for example, '' | + | ToDo: Verlinkungen und Wiki-Syntax ermöglichen.\\ |
+ | CSS anpassen\\ | ||
+ | ... und vielleicht die Leerzeilen auf halbe Höhe setzen ?! | ||
+ | ==== Standard-Syntax: | ||
+ | <acsv delim=;> | ||
+ | Spalte1; | ||
+ | Wert1; | ||
+ | </ | ||
+ | Ergebnis: | ||
+ | <acsv delim=;> | ||
+ | Spalte1; | ||
+ | Wert1; | ||
+ | </ | ||
+ | \\ | ||
- | <code> | + | ==== Spezial-Syntax: |
+ | | ||
+ | Spalte1; | ||
+ | Wert1; | ||
+ | </ | ||
+ | Ergebnis: | ||
+ | <acsv delim=; border=0 hdr_rows=0> | ||
+ | Spalte1; | ||
+ | Wert1; | ||
+ | </ | ||
+ | \\ | ||
+ | So wird eine CSV-Tabelle generiert ohne Rahmen, ohne Hintergrundverfärbungen. | ||
+ | Sehr hilfreich bei strukturiertem Aufbau (sicherer als Tabulatoren).\\ | ||
+ | //Ups ... hier muß das CSS noch angepaßt werden. Sorry.// | ||
- | <itemtable header=test;c=column_a;c=column_b, | + | ==== Variante: ==== |
+ | | ||
+ | Spalte1;Spalte2; | ||
+ | Wert1; | ||
+ | </ | ||
+ | Ergebnis: | ||
+ | <acsv delim=; border=0 hdr_rows=0 hdr_cols=1> | ||
+ | Spalte1; | ||
+ | Wert1; | ||
+ | </acsv> | ||
+ | \\ | ||
- | _line_a | ||
- | column_a: | ||
- | column_b:< | ||
- | how to fill a cell over several lines</ | ||
- | _line_b | ||
- | column_a:< | ||
- | can be added to force a linebreak in the cell. Other formatting | ||
- | elements could be used as well. | ||
- | </ | ||
- | column_c: | ||
- | </ | + | ====== original Syntax ====== |
- | </ | + | __Kopie des Standard-Plugin-Textes FIXME__\\ |
- | <itemtable header=test; | + | The '' |
- | _line_a | + | ^ Option |
- | column_a: | + | | '' |
- | column_b:<tablecell>text_a2 \\ This is an example | + | | '' |
- | how to fill a cell over several lines</tablecell> | + | | '' |
- | + | | '' | |
- | _line_b | + | |
- | column_a:<tablecell>text_b1 \\ \\ As you can see, local DokuWiki CRLF sequences | + | |
- | can be added to force a linebreak in the cell. Other formatting | + | |
- | elements could be used as well. | + | |
- | </tablecell> | + | |
- | column_c: | + | |
- | + | ||
- | </itemtable> | + | |
- | + | ||
- | ===== Table Width ===== | + | |
- | The plugin allows to specify width for a DokuWiki table and its columns. This is a simple extension to the original table syntax, not a [[: | + | |
- | + | ||
- | + | ||
- | The width has to be specified at the start of a line before the table. The first value is used as width of the table, the rest is for columns. If you want to omit some value use a dash instead. The widths can be specified in any CSS units: | + | |
- | + | ||
- | <code> | + | |
- | |< 100% 50px - 5em 10em 10% >| | + | |
- | ^ A ^ B ^ C ^ D ^ E ^ | + | |
- | | 1 | + | |
- | </code> | + | |
- | |< 100% 50px - 5em 10em 10% >| | + | |
- | ^ A ^ B ^ C ^ D ^ E ^ | + | |
- | | 1 | 2 | 3 | 4 | 5 | | + | |
\\ | \\ | ||
- | If there are more columns in the table than there are values in the width specification, | ||
- | \\ | ||
- | |||
- | < | ||
- | |< 50em 20% >| | ||
- | ^ 20% ^ 80% ^ | ||
- | | Specified width | The rest of the table width | | ||
- | </ | ||
- | |< 50em 20% >| | ||
- | ^ 20% ^ 80% ^ | ||
- | | Specified width | The rest of the table width | | ||
+ | Cells that include a comma as part of the data are expected to be contained between double quotes, which is the typical behaviour of most systems when exporting .csv files. | ||
+ | Empty lines in the csv file or data are displayed as horizontal separators in the table. | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
====== Links ====== | ====== Links ====== | ||
- | * zu Nachweisquellen | ||
* zu Dokumentationen | * zu Dokumentationen | ||
- | | + | |