-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need the ability to read from and write to the <desc> element within .tds files #72
Comments
A first pass could be to add something in a simple unformatted tag -- I worry about the RTF-ness of our descriptions and trying to build an XML serializer to describe the rich text |
I would be fine reading and writing everything in the tag as a block and handling the the values during pre/post processing.
|
Reading should be straight-forward to add since we are already parsing some of the information out of the column tags. Writing is a bit trickier since we don't currently support writing fields. I'll see if I can get reading done this week so it's included in the august release. |
* Add description to the field object Pull in the description if it exists on a `<column>` tag. This change returns the entire `<desc>` tag including all subtags. e.g.: ``` <desc> <formatted-text> <run>Total number of people in a country</run> </formatted-text> </desc> ``` * improving the test code to use 'in'
Just a note that I'm doing a little research on what rtf-generating libs exist out there already. https://github.com/grangier/pyrtf exists but seems like overkill |
@RussTheAerialist I'm thinking of an approach like this, so we don't have to re-implement RTF or take a dependency on pyrtf/pyrtf-ng:
will create a simple RTF blob of
And then we can also have
Which will insert the raw xml blob. |
Could you also do a .update_xml() function so the end user could do their own formatting with the tags? Or are you concerned the user will introduce malformed XML corrupting the file that way? Sent from my iPhone
|
I'm planning to add the ability to change the formatted text. There is some pending work that needs to get done before we start enabling more edit scenarios. I prefer the idea of an update method you can pass in text, rtf-based xml, or an rtf object that hopefully has an as_string or something similar so we can support various different ways of updating without having the change the signature. I have some high-priority other things I need to get done unrelated to the document-api for September, so I'm not sure when I'll get to it. |
Im interested this feature too. my use-case is :
thanks a lot for all the effort, this API already being very useful to my work. |
In order to more efficiently manage metadata documentation regarding fields in Tableau data sources, I need the ability to read the information in the element for a column so that I can write that information to a database. Conversely I need to be able to write information back out to this element after reading the information stored in a database. It will also be necessary for me to be able to determine what table a field comes from. Below is an example of the data I want to be able to read/write.
The text was updated successfully, but these errors were encountered: