Skip to content
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

author name instead of etherpad's author ID? #12

Open
gulaschskanone opened this issue Jul 23, 2015 · 2 comments
Open

author name instead of etherpad's author ID? #12

gulaschskanone opened this issue Jul 23, 2015 · 2 comments

Comments

@gulaschskanone
Copy link

Thanks for the nice plugin!

In my case etherpad's author ID is inserted, but I want to show the author's name (maybe like in comments export ?). Is there any workaround?

<line>
 <attribute key="author" value="a.lkC2bWYR70mHmw0y">text</attribute>
 <!-- /author -->
</line>
@stefanmintert
Copy link
Owner

Hi gulaschskanone. I will check this.

@stefanmintert
Copy link
Owner

Hi gulaschskanone

there a (at least) two solutions:

a) write an "author name export" plugin..... and query it for every author name after exporting to xml.

or

b) improve the xml export plugin in the following way:

After the latest refactorings from @tm-linkwerk, we have a "CommentCollector"
https://github.com/stefanmintert/ep_xmlexport/blob/develop/PadProcessor.js#L13

One could copy that approach and write an "AuthorCollector", which looks pretty much the same.

An authorCollector instance (like the commentCollector https://github.com/stefanmintert/ep_xmlexport/blob/develop/PadProcessor.js#L53) would collect the author-IDs.

An authorLoader, like https://github.com/stefanmintert/ep_xmlexport/blob/develop/PadProcessor.js#L55 , would get the authors names by calling http://etherpad.org/doc/v1.5.6/#index_getauthorname_authorid

The serializer would write <authors><author id="..." name="..."/>...</authors> as a sibling element next to <comments>..

That's the idea. Unfortunately, I don't have the time right now; maybe in a few days/weeks. But if you want to implement this, please fork and PR ! If you fork, please fork develop, not master. We have many changes in develop, not yet merged to master. (Still waiting for a bug fix before merging. See issues for details..)

I will leave this issue open, until we have a fix....

Kind regards, Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants