Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84738

parsing tree from excel sheet

From al.basili@gmail.com (alb)
Newsgroups comp.lang.python
Subject parsing tree from excel sheet
Date 2015-01-28 10:12 +0000
Message-ID <cirqviF15qtU1@mid.individual.net> (permalink)

Show all headers | View raw


Hi everyone,

I've a document structure which is extremely simple and represented on a 
spreadsheet in the following way (a made up example):

subsystem | chapter | section | subsection | subsubsec |
    A     |         |         |            |           |
          | func0   |         |            |           |
          |         |interface|            |           |
          |         |latency  |            |           |
          |         |priority |            |           |
          | func1   |         |            |           |
          |         |interface|            |           |
          |         |latency  |            |           |
          |         |priority |            |           |
          |         |depend   |            |           |
          |         |         | variables  |           |
          |         |         |            | static    |
          |         |         |            | global    |
          |         |         | functions  |           |
          |         |         |            | internal  |
          |         |         |            | external  |

And I'd like to get a tree like this:

    A
    +-------> func0
    |           +---> interface
    |           +---> latency
    |           \---> priority
    \-------> func1
                +---> interface
                +---> latency
                +---> priority
                \---> depend
                         +---> variables
                         |         +---> static
                         |         \---> local
                         \---> functions
                                   +---> internal
                                   \---> external

I know about the xlrd module to get data from excel and I'm also aware 
about the ETE toolkit (which is more specific for bioinformatics, but I 
guess can suitable fill the need).

Does anyone recommend any other path other than scripting through these 
two modules?

Is there any more suitable module/example/project out there that would 
achieve the same result?

The reason for parsing is because the need behind is to create documents 
edited in excel but typeset in LaTeX, therefore my script will spill out 
\chapter, \section and so forth based on the tree structure.

Every node will have some text and some images with a very light markup 
like mediawiki that I can easily convert into latex.

Hope I've not been too confusing.
Thanks for any pointer/suggestion/comment.

Al

p.s.: I'm not extremely proficient in python, actually I'm just starting 
with it!

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-28 10:12 +0000
  Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-01-28 15:08 +0100
    Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-28 14:27 +0000
    Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-29 21:02 +0000
      Re: parsing tree from excel sheet MRAB <python@mrabarnett.plus.com> - 2015-01-29 21:16 +0000
        Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-29 21:32 +0000
          Re: parsing tree from excel sheet Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-29 21:59 +0000
          Re: parsing tree from excel sheet Chris Kaynor <ckaynor@zindagigames.com> - 2015-01-29 14:30 -0800
          Re: parsing tree from excel sheet Chris Angelico <rosuav@gmail.com> - 2015-01-30 10:46 +1100
    Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-30 15:05 +0000
      Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-01-30 18:11 +0100
        Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-31 22:45 +0000
          Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-02-01 11:11 +0100
      Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-01-30 18:24 +0100
      Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-01-31 10:07 +0100
      Re: parsing tree from excel sheet Peter Otten <__peter__@web.de> - 2015-01-31 10:07 +0100
  Re: parsing tree from excel sheet Tim Chase <python.list@tim.thechases.com> - 2015-01-28 08:13 -0600
    Re: parsing tree from excel sheet al.basili@gmail.com (alb) - 2015-01-29 21:22 +0000

csiph-web