Python Forum
the data format i am designing with indentation
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
the data format i am designing with indentation
#1
i am designing a data format intended to be a simple format for humans to enter genealogical data as files that be easily read, especially when not too large. each line will represent a person with various singular information about that person such as name, date/place of birth/death. more information, especially multiple information, such as spouses will be on an indented line that follows. further indentation would supplement this in context. the context for a marriage would be their children. but souses and children can later have unindented lines providing more info about them. a lot of info follows keyword like "m" (married), "b" (born), "s" (son), "d" (daughter or death in context of what follows, name or date).

the idea is that this data format uses indentation to create a grouping context much like a function's code follows a "def" until unindented. so i might end up needing to do some indentation processing and tracking.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Is this not something you could use YAML for?
Reply
#3
I would use YAML for this. It is very readable, based upon indentation and there are many benefits in using an already existing and mature format. One of them is that you can convert it readily to other formats such as json.
Reply
#4
i personally found YAML hard to read
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
That's surprising. In what way? In any case, I wouldn't underestimate the work involved in writing your own serialisation format and then maintaining it. Perfect is the enemy of good, and all that.
Reply
#6
i just tend to not grok what's going on in YAML files. maybe better explanations would help. but i'm really not interested in YAML, anymore. i'm just going to have keywords and data words express a natural text meaning with the indentation to organize it.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#7
I guess nothing will stop you if you're determined to write your own format.
Reply
#8
i am interested in discussing available tools for processing and handling indentations. one of the reasons i don't like to give out a lot of other information is because that make it hard to keep the discussion on topic. the intended topic of my initial question was indentation. i should have been more specific. if discussing indentation is not interesting to you, then maybe you can find interest in another thread.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Copy xlsx cell format into data frame or table Johnse 4 2,708 Aug-30-2019, 04:27 PM
Last Post: Johnse

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020