Benutzer-Werkzeuge

    ~~ RM: keiner ~~ UI: ---start--- ~~ IP:18.188.152.162~~

Webseiten-Werkzeuge


Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
de:wiki:csv [2013/04/10 17:26] – de:wiki:syntaxaddon umbenann in de:wiki:csv (passender) MWankede:wiki:csv [2015/10/08 01:23] (aktuell) MWanke
Zeile 1: Zeile 1:
-====== Syntax-Addon ====== +====== CSV (Syntax======
-{{:de:baustelle.gif|Baustelle}}+
  
-===== 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 ''%%<csv>%%'' and ''%%</csv>%%'' or be read from a file in the media area using ''%%<csv namespace:test.csv></csv>%%''. You can also give an HTTP URL to a CSV file instead of an uploaded media file.+
  
 +Der frühere Default-Wert 'Komma-getrennt' sollte in das hier in DE gebräuchliche Semikolon geändert werden. Dies ist den Grundeinstellungen des Plugins bereits getan.
 +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 '**%%\\ %%**' (zwei Bachslash mit einem Leerzeichen!).
- +
-^ Option                       ^ Description ^ +
-| ''file=<filename>''          | where <filename> can be any <namespace:file.csv> or <http url> Default: ''''+
-| ''hdr_rows=//<n>//''         | Format the first //<n>// rows of data from the CSV as column headers. Default: ''1''+
-| ''hdr_cols=//<n>//''         | Format the first //<n>// columns of each row as column headers. Default: ''0''+
-| ''span_empty_cols=//[01]//'' | Create colspans for each empty (two adjacent commascell following a cell with content. Default: ''0''+
-| ''delim=//<char>//''         | The delimiter used between cells. Specify ''tab'' for a tab separated file. Default: '',''+
- +
-Other options of the form <key>=<value> are possible but not used for displaying csv data yet. +
- +
-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 'Edit-Table' funktioniert hier natürlich nicht : ist ja auch keine Wiki-Tabelle.
  
-===== itemtable =====+====== erweitertes Beispiel ====== 
 +im Hinblick auf Assembly-Listen umgestrickt:\\ 
 <code> <code>
-<itemtable c=name,[name...];[options]> +<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=#fee0e0> ..data.. </csv>
-. +
-. +
-</itemtable>+
 </code> </code>
  
-<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=#fee0e0
-<itemtable c=Column1,Column2,Column3;fdelim=:;header=Titel-Header+COMMO-#;Qty.;Part;Value;Form;Designator 
-</code>+;;; 
 +^;;Circuit Board;;; 
 +3xxx;1;PCB;Rev.?;; 
 +;;;;; 
 +^;;IC Big;;;;; 
 +390084-01;1; CPU MC6B000FN8;8MHZ;PLCC68;U1, 
  
-=== Options === +391105-01;2; DRAM;256K X 16 80NS;SMD;U16, U17,  
-^Option^Description^Format^Default^ +391084-01;1; VIDEO ENCODER;CXA1145M;SO-24;U12,  
-|c=name,[name,...]|Names fields of the table which are separated by a commaThe order of the colums follows the orders how the columns are listed here | |For legacy reasonsthe c{...}=colum could be listed for each individual column individually. | +;;; 
-|fdelim|Field Delimeter representing how each DW-DB field is seperated |Character |:| +^;;IC Commo;;; 
-|header|Table Heading representing the line in which a table name is defined |Character | | +390544-01;1;AGNUS PAL; 8375R0 HR;PLCC84;U2 
-|twidth|Width of the HTML table |integer |Undefined Dokuwiki decides | +391155-01;1;GAYLE;4145R0F020;PLCC84 ?;U5 
-|norender|Outputs the DW-tables in Dokuwiki text format |Charactier |Undefined |+391081-01;1;DENISE;8375R4 HiRes;PLCC52;U4,  
 +391077-01;1;PAULA;8364R7 SMT;PLCC52;U3,  
 +391079-01;1;KEYBD UP;6571R4 UP;PLCC44;U13,  
 +~391078-01;2; 8520R4 CIA 1MHZ ;8520R4 CIA 1MHZ ;PLCC44;U7, U8, U7, U8, U7; U8, 
 +391304-01;1;ROM;KICKSTART V2.0;DIP40;U6,  
 +</acsv> 
 +Mit Absicht, um zu verdeutlichen, was ein Semikolon auch anstellen kann:\\  
 +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 <tablecelland </tablecell>.**+====== Syntax ====== 
 +FIXME 
 +Alle Parameter mit Leerzeichen trennen und Zuweisung: Name=Wert 
 +<acsv hdr_cols=2> 
 +*;Name;default;Beschreibung 
 +;hdr_rows;1;Anzahl <nKopfzeilen hervorheben (Fettschrift und alle zentriert) 
 +;hdr_cols;0;bei <n> Spalten  
 +;delim;";";Trennzeichen (Semikolon dringend empfohlen (zur Not ''|'')) 
 +;enclosure; ;  ;" 
 +;escape;" 
 +;border;0;Rahmen- und Trennlinien-Dicke (0/0.5/1/1.5) in Arbeit 
 +;firstno;0;für extra Zeilennummerierung dann Startwert größer Null setzen 
 +s;max_cols;false;Tabelle fest auf eine bestimmte Anzahl Spalten trimmen 
 +s;calign;false;Feld mit Ausrichtungen der Spalten 
 +s;cwidth;false;Feld mit Breiten der Spalten 
 +R;rowmark;false;Markierungszeichen z.B. '^'  Gruppenzeilen 
 +M;marker;false;Markierungszeichen z.B.  '~'  für hervorgehobene Zeile 
 +;hcolor;#eee;Header-Farbe (die ggf. erste Zeile und ggf. erste Spalte) 
 +R;rcolor;#f6f6f6;Abschnittszeilen-Farbe (z.B. Gruppen) 
 +M;mcolor;#f0fef0;Markier-Farbe um bestimmte Zeilen hervorzuheben) 
 +;fsize;90;Schriftgröße in % des normalen Wiki-Textes 
 +</acsv> 
 +<code>Beispiel obige Tabelle <acsv hdr_cols=2>...</acsv></code>
  
-Note that with twidth, and norender, you must assign some sort of value, for example, ''norender=1''.+ToDo: Verlinkungen und Wiki-Syntax ermöglichen.\\  
 +CSS anpassen\\  
 +... und vielleicht die Leerzeilen auf halbe Höhe setzen ?!
  
 +==== Standard-Syntax: ====
 +  <acsv delim=;>
 +  Spalte1;Spalte2;Spalte3
 +  Wert1;Wert2;Wert3
 +  </acsv>
 +Ergebnis:
 +<acsv delim=;>
 +Spalte1;Spalte2;Spalte3
 +Wert1;Wert2;Wert3
 +</acsv>
 +\\ 
  
-<code>+==== Spezial-Syntax: ==== 
 +  <acsv delim=; border=0 hdr_rows=0> 
 +  Spalte1;Spalte2;Spalte3 
 +  Wert1;Wert2;Wert3 
 +  </acsv> 
 +Ergebnis: 
 +<acsv delim=; border=0 hdr_rows=0> 
 +Spalte1;Spalte2;Spalte3 
 +Wert1;Wert2;Wert3 
 +</acsv> 
 +\\  
 +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,column_c;c=column_d;fdelim=:>+==== Variante: ==== 
 +  <acsv delim=; border=0  hdr_rows=0 hdr_cols=1> 
 +  Spalte1;Spalte2;Spalte3 
 +  Wert1;Wert2;Wert3 
 +  </acsv> 
 +Ergebnis: 
 +<acsv delim=; border=0 hdr_rows=0 hdr_cols=1> 
 +Spalte1;Spalte2;Spalte3 
 +Wert1;Wert2;Wert3 
 +</acsv> 
 +\\ 
  
-_line_a 
-column_a:text_a1 
-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:text_b2  
  
-</itemtable>+====== original Syntax ======
  
-</code>+__Kopie des Standard-Plugin-Textes FIXME__\\ 
  
-<itemtable header=test;c=column_a;c=column_b,column_c;c=column_d;fdelim=:>+The ''%%<csv>%%'' tag allows for additional options to be specified as well as a file reference.
  
-_line_a +^ Option                       ^ Description                                                                             ^ Default value  ^ 
-column_a:text_a1 +| ''hdr_rows=//<n>//''         | Format the first //<n>// rows of data from the CSV as column headers                    |  ''1''  | 
-column_b:<tablecell>text_a2 \\ This is an example +| ''hdr_cols=//<n>//''         Format the first //<n>// columns of each row as column headers                          |  ''0''  | 
-how to fill a cell over several lines</tablecell> +''span_empty_cols=//[01]//'' Create colspans for each empty (two adjacent commas) cell following a cell with content |  ''0''  | 
- +''delim=//<char>//''         The delimiter used between cells. Specify ''tab'' for a tab separated file.             |  '',''  |
-_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:text_b2  +
- +
-</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 [[:plugin:exttab1|full-fledged rework of the syntax]]. +
- +
- +
-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   2  |    4   +
-</code> +
-|100% 50px - 5em 10em 10% >| +
-^ A  ^  B  ^  C  ^  D  ^  E  ^ +
- |  2  |  3  |  4  |  5  |+
 \\  \\ 
  
-If there are more columns in the table than there are values in the width specification, the width will be applied to the columns from left to right: 
-\\  
- 
-<code> 
-|< 50em 20% >| 
-^ 20%              ^ 80%                          ^ 
-| Specified width  | The rest of the table width  | 
-</code> 
-|< 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.
  
  
 \\  \\ 
  
-{{  :awschriftzug.gif|amigawiki.de}}+{{  :awschriftzug.gif?nolink|www.amigawiki.org}}
 ====== Links ====== ====== Links ======
-  * zu Nachweisquellen 
   * zu Dokumentationen   * zu Dokumentationen
-  Software-Updates+    https://www.dokuwiki.org/plugin:csv
  
Zuletzt geändert: 2013/04/10 17:26