Asciidoctor-confluence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Asciidoctor-confluence

Guillaume
Hello everybody,

I'm glad to present you Asciidoctor-confluence, now only available here at the moment. Feel free to add comments and issues, I know the code can be improved  (I'm not a ruby dev so every piece of advise is good).

Currently only the page creation is available, other features will arrive soon.
If you want to try it,  you have to install the gem manually (from the source), concerning the Confluence instance you can use a docker container like this one you will only need to have an Atlassian account to get a trial key.

Cheers,
Guillaume
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

Ted
That is awesome. I am a big fan of Confluence wiki. Keep up the good work.
- Ted @TedAtCIS
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

mojavelinux
Administrator
In reply to this post by Guillaume
Guillaume,

Congratulations on getting this project underway!

Two things that might really help get some feedback on this tool:

. Add a brief section to the README about the steps to create a page and what to expect will happen. I'm sure there are a few details / nuances in there that would benefit from a walk-through, even if it's short.

. Provide an example instance to allow people to try it without needing to find access to a Confluence server. Is there a test instance somewhere? Perhaps we can set one up on OpenShift or equivalent?

It might be interesting to hit the Arquillian team up about this. They are into AsciiDoc and also still use Confluence (although somewhat reluctantly).

I had a question about the tests. Do they currently require a local instance of Confluence to be running? You may want to look into a VCR testing tool to allow the tests to be run as pseudo integration tests. You can see the vcr gem in action in the Octokit project:

https://github.com/octokit/octokit.rb/blob/master/spec/octokit/client/issues_spec.rb


I'll have one additional idea, though it might be out of scope. I wonder how hard it would be to adapt this tool to Wordpress. Wordpress has a huge number of users and being able to post content from AsciiDoc source in the same way you are posting to Confluence would open up a world of users. Perhaps everything is the same except the actual API to handle the post and update. If you could think about creating an abstraction layer there, it might leave room for someone else to come along and add an additional adapter.

Keep up the great work!

-Dan

On Tue, Jan 27, 2015 at 3:18 AM, Guillaume [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello everybody,

I'm glad to present you Asciidoctor-confluence, now only available here at the moment. Feel free to add comments and issues, I know the code can be improved  (I'm not a ruby dev so every piece of advise is good).

Currently only the page creation is available, other features will arrive soon.
If you want to try it,  you have to install the gem manually (from the source), concerning the Confluence instance you can use a docker container like this one you will only need to have an Atlassian account to get a trial key.

Cheers,
Guillaume


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-confluence-tp2719.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

Guillaume
Hi Dan,

I'll add a "Try it" section in the README file. I personally use a docker container with a trial key as I mentioned above.

Currently the tests don't need any Confluence instance, I used mock but at some point it could be interesting to have end-to-end tests using a real Confluence server.

I had actually the same idea. Extracting the main part and creating a asciidoctor-publisher which is going to use modules (confluence, wordpress, etc.). As you can see in the code, I have separated classes for the confluence API and so we can logically and easily create a WordPress module.

I think we should first see how asciidoctor-confluence goes and then work on the general publisher gem. WDYT ?

Cheers,
Guillaume
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

wimdeblauwe
Great idea. Do you need any plugins installed in Confluence to make it work? Maybe you can add what versions of Confluence this works with?

regards,

Wim
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

Guillaume
The only thing you need is the REST API from Confluence which is enabled by default.
I have tested it against confluence v5.x
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

Guillaume
By the way, the gem has been published to rubygem.
See: https://rubygems.org/gems/asciidoctor-confluence

If you find an issue, please open a issue on Github

Cheers,
Guillaume
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

GMoussallem-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

mojavelinux
Administrator
Off the top of my head, I'd say the problem is likely that the backend needs to be set to "xhtml" instead of "html". That will ensure that Asciidoctor outputs XHTML, which seems to be required. And the img element is one of those elements that is affected.

Cheers,

-Dan

On Fri, Jun 26, 2015 at 9:57 AM, gmoussallem [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,
I could not find a solution for this issue although I might have missed it.
I am encountering "Error parsing xhtml" exception when trying to push into confluence an adoc file including images.
Can you please assist?
Thanks


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-confluence-tp2719p3445.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

mojavelinux
Administrator
In reply to this post by GMoussallem-2
I think passing the following flag will do the trick:

-b xhtml

-Dan

On Fri, Jun 26, 2015 at 3:21 PM, Dan Allen <[hidden email]> wrote:
Off the top of my head, I'd say the problem is likely that the backend needs to be set to "xhtml" instead of "html". That will ensure that Asciidoctor outputs XHTML, which seems to be required. And the img element is one of those elements that is affected.

Cheers,

-Dan

On Fri, Jun 26, 2015 at 9:57 AM, gmoussallem [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,
I could not find a solution for this issue although I might have missed it.
I am encountering "Error parsing xhtml" exception when trying to push into confluence an adoc file including images.
Can you please assist?
Thanks


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-confluence-tp2719p3445.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



--
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

GMoussallem
Thanks Dan.

However, adding this option at the end of the command line requires modifying the options.rb to include "backend" in the list of asciidoc options to parse.
Another change seems to be required in the libs of ruby.

Although not recommended to change a gem, is it the correct way to proceed or is there another way to do so?

Thanks for the help!
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

GMoussallem
Hello,

Figured out a way by only adding :backend:xhtml to adoc file
The remaining issue is that resources such as images are not published

Can you please let me know if there is a workaround for that problem or should we add an issue on Git?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

mojavelinux
Administrator
I'm glad you found a workaround. We should add that as an option to the processor (or make it the default if that's what Confluence expects). Can you file an issue?


On Tue, Jun 30, 2015 at 8:20 AM, GMoussallem [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Can you please let me know if there is a workaround for that problem or should we add an issue on Git?

I don't think that's been addressed. I recommend filing an issue.

Cheer,

Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

GMoussallem
An issue (https://github.com/asciidoctor/asciidoctor-confluence/issues/6) has been inserted to offer the possibility to add an image to the generated html in Confluence along with the adoc content.

Thanks,
Gloria
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

mojavelinux
Administrator
Thanks Gloria!

I also filed an issue to generate XHTML by default.


-Dan

On Wed, Jul 1, 2015 at 3:26 AM, GMoussallem [via Asciidoctor :: Discussion] <[hidden email]> wrote:
An issue (https://github.com/asciidoctor/asciidoctor-confluence/issues/6) has been inserted to offer the possibility to add an image to the generated html in Confluence along with the adoc content.

Thanks,
Gloria


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-confluence-tp2719p3456.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

jaredmorgs
This post was updated on .
mojavelinux wrote
Thanks Gloria!

I also filed an issue to generate XHTML by default.

https://github.com/asciidoctor/asciidoctor-confluence/issues/7

-Dan

On Wed, Jul 1, 2015 at 3:26 AM, GMoussallem [via Asciidoctor :: Discussion]
<[hidden email]> wrote:

> An issue (https://github.com/asciidoctor/asciidoctor-confluence/issues/6)
> has been inserted to offer the possibility to add an image to the generated
> html in Confluence along with the adoc content.
>
> Thanks,
> Gloria
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://discuss.asciidoctor.org/Asciidoctor-confluence-tp2719p3456.html
>  To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> To unsubscribe from Asciidoctor :: Discussion, click here
> <http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
> .
> NAML
> <http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Dan Allen | http://google.com/profiles/dan.j.allen
What if you just added the :data-uri: option to documents. Wouldn't that just embed images into the code as a workaround.

I used this to embed images into Jive documents with success, but that was using asciidoctor natively.
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-confluence

jaredmorgs
In reply to this post by Guillaume
Guillaume wrote
By the way, the gem has been published to rubygem.
See: https://rubygems.org/gems/asciidoctor-confluence

If you find an issue, please open a issue on Github
Hey Guillaume

I opened an issue relating to http/https support, and some issues with actually pushing pages. I just wonder if the issues I'm experiencing relate to my instance of Confluence not having the HTML Macro enabled.

https://confluence.atlassian.com/doc/html-macro-38273085.html

I notice that in https://github.com/gscheibel/asciidoctor-confluence/blob/master/test/Asciidoctor/confluence/publisher_tests.rb that http is declared. How does this go when my confluence domain is https?