From: csanyipal@gmail.com (Csányi Pál)
To: emacs-orgmode@gnu.org
Subject: Re: Export the org spreadsheet into a tab seperated text file
Date: Tue, 15 Jul 2008 00:25:06 +0200 [thread overview]
Message-ID: <87hcasqf25.fsf@debian-asztal.csanyi-pal.info> (raw)
In-Reply-To: 51E797DC-2C7F-42A8-954C-50A8001BCE17@uva.nl
[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]
Carsten Dominik <dominik@uva.nl> writes:
> On Jul 12, 2008, at 1:41 AM, Csányi Pál wrote:
>
>> Bernt Hansen <bernt@norang.ca> writes:
>>
>>> csanyipal@gmail.com (Csányi Pál) writes:
>>
>>>> Is there available from Org-mode to export a table to a Tab
>>>> separated
>>>> text file?
>>
>>> Yes it's easy. Put the pointer on the table and M-x org-table-export
>>> Export table to: /tmp/some-table.txt
>>> Format: orgtbl-to-tsv
>>
>> OK it works but only for one org table at a time.
>>
>> But what to do if I have an org file with more than one table with
>> different columns x rows and between these tables moreover I have some
>> text, like the follows:
>>
>> [options]
>>
>> Here is an org tabe.
>>
>> [pins]
>>
>> Here is an org tabe.
>>
>> etc.
>>
>> Can I export in org mode the whole file with these tables end texts
>> mixed this way in to one Tab separated text file? (Tab separated only
>> where was an org table so in this example abowe in tab separated text
>> file there should to get two places with tab separated rows that
>> contain datas taken from the tables.)?
>
>
> No, you cannot. What would be the application for this?
If I would get the tab separated text file from org tables, then I
would be to run on it the tragesym python script. Tragesym can to make
from this tab separated text file an electric symbol for gEDA suite.
http://geda.seul.org/wiki/geda:tragesym_readme
However, I can now to send an org table within org file to tab
separated lines. I run orgtbl-send-table on every org-table in the org
file.
After that I can to run on this org file tragesym, but get an error
message in some circumstances. If I edit one table in this org file so
that I put '#' character at start of every line then I get the
electric symbol file when run tragesym on the org file. If I leave the
file unedited then I get error message:
Traceback (most recent call last):
File "/usr/local/geda-0.0.2/bin/.scripts/tragesym.py", line 586, in <module>
opts,attr,pins=readsrc(file_in)
File "/usr/local/geda-0.0.2/bin/.scripts/tragesym.py", line 143, in readsrc
geda_attr[(string.strip(element[0]),nr)]=string.strip(element[1])
IndexError: list index out of range
But this is maybe the issue for the geda news group:
gmane.comp.cad.geda.user
The file with edited lines that don't cause this error because of '#'
characters at beginning of the lines is attached here..
[-- Attachment #2: The edited org file with '#' characters at one torg table --]
[-- Type: application/octet-stream, Size: 3852 bytes --]
# This is the template file for creating symbols with tragesym
# every line starting with '#' is a comment line.
[options]
# wordswap swaps labels if the pin is on the right side an looks like
# this:
# "PB1 (CLK)". That's useful for micro controller port labels
# rotate_labels rotates the pintext of top and bottom pins
# this is useful for large symbols like FPGAs with more than 100 pins
# sort_labels will sort the pins by it's labels
# useful for address ports, busses, ...
#+ORGTBL: SEND options orgtbl-to-generic :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
| wordswap | yes |
| rotate_labels | no |
| sort_labels | yes |
| generate_pinseq | yes |
| sym_width | 1400 |
| pinwidthvertical | 400 |
| pinwidthhorizontal | 400 |
# BEGIN RECEIVE ORGTBL options #
wordswap yes
rotate_labels no
sort_labels yes
generate_pinseq yes
sym_width 1400
pinwidthvertical 400
pinwidthhorizontal 400
# END RECEIVE ORGTBL options #
[geda_attr]
# name will be printed in the top of the symbol
# if you have a device with slots, you'll have to use slot= and
# slotdef=
# use comment= if there are special information you want to add
#+ORGTBL: SEND geda_attr orgtbl-to-generic :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
#| version | 20080127 1 |
#| name | MCT6 |
#| device | DUAL_PHTR_OPTCPLR |
#| refdes | U? |
#| footprint | none |
#| description | dual phototransistor optocoupler |
#| documentation | http://www.fairchildsemi.com/ds/MC/MCT6.pdf |
#| author | Paul Csanyi |
#| numslots | 0 |
#| dist-license | GPL |
#| use-license | unlimited |
# BEGIN RECEIVE ORGTBL geda_attr #
version 20080127 1
name MCT6
device DUAL_PHTR_OPTCPLR
refdes U?
footprint none
description dual phototransistor optocoupler
documentation http://www.fairchildsemi.com/ds/MC/MCT6.pdf
author Paul Csanyi
numslots 0
dist-license GPL
use-license unlimited
# END RECEIVE ORGTBL geda_attr #
[pins]
# tabseparated list of pin descriptions
# ----------------------------------------
# pinnr is the physical number of the pin
# seq is the pinseq= attribute, leave it blank if it doesn't matter
# type can be (in, out, io, oc, oe, pas, tp, tri, clk, pwr)
# style can be (line,dot,clk,dotclk,none). none if only want to add a
# net
# posit. can be (l,r,t,b) or empty for nets
# net specifies the name of the net. Vcc or GND for example.
# label represents the pinlabel.
# negation lines can be added with "\_" example: \_enable\_
# if you want to write a "\" use "\\" as escape sequence
#-----------------------------------------------------
#+ORGTBL: SEND pins orgtbl-to-generic :skip 1 :tstart "" :tend "" :lstart "" :lend "" :sep "\t"
| pinnr | seq | type | style | posit. | net | label |
| 1 | 1 | pas | line | l | | ANODE |
| 2 | 2 | pas | line | l | | CATHODE |
| 3 | 3 | pas | line | l | | CATHODE |
| 4 | 4 | pas | line | l | | ANODE |
| 5 | 5 | pas | line | r | | EMITTER |
| 6 | 6 | pas | line | r | | COLLECTOR |
| 7 | 7 | pas | line | r | | COLLECTOR |
| 8 | 8 | pas | line | r | | EMITTER |
# BEGIN RECEIVE ORGTBL pins #
1 1 pas line l ANODE
2 2 pas line l CATHODE
3 3 pas line l CATHODE
4 4 pas line l ANODE
5 5 pas line r EMITTER
6 6 pas line r COLLECTOR
7 7 pas line r COLLECTOR
8 8 pas line r EMITTER
# END RECEIVE ORGTBL pins #
[-- Attachment #3: Type: text/plain, Size: 259 bytes --]
Without these '#' characters at the '[geda_attr]' org table I get the
error message: IndexError: list index out of range
This is maybe a tragesym bug..
Any advices will be appreciated!
--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm
[-- Attachment #4: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
prev parent reply other threads:[~2008-07-14 22:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 18:42 Export the org spreadsheet into a tab seperated text file Csányi Pál
2008-07-11 19:39 ` Bernt Hansen
2008-07-11 21:08 ` Re: Export the org spreadsheet into a tab seperated textfile Parker, Matthew
2008-07-11 21:12 ` Bernt Hansen
2008-07-11 21:25 ` Parker, Matthew
2008-07-14 21:56 ` Carsten Dominik
2008-07-12 8:41 ` Export the org spreadsheet into a tab seperated text file Csányi Pál
2008-07-14 18:38 ` Carsten Dominik
2008-07-14 22:25 ` Csányi Pál [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hcasqf25.fsf@debian-asztal.csanyi-pal.info \
--to=csanyipal@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.