Trying to get started with AtomWiki

0 views
Skip to first unread message

chris

unread,
Jun 6, 2008, 5:51:29 AM6/6/08
to atomicwiki-users
Hi there,

I am trying to get started with AtomWiki, but there are some things I
dont grok. First, just for clarification, the documentation on the
exist site at http://exist-db.org/atompub.html has nothing to do with
Atomwiki, right? I was trying to follow along there, but then I
realized that the details do not seem to match what I see in the
AtomWiki application.

Now, what URL should I use to post a new entry to a feed? I am using
Alexander Milowskid "Poster" Firefox extension to try to send a post
to the AtomWiki, but what I get is just the top page of the feed.
Here are the details I filled in:

URL: http://localhost:8000/blogs/chris/

content Type application/atom+xml

Userauth: (user/password for the wiki user)

Then I put the following in the Content pane:

<entry xmlns="http://www.w3.org/2005/Atom">
<author><name>Chris</name></author>
<id>new</id>
<title>A test entry</title>
<updated>2003-12-13T18:30:02Z</updated>
<content>Content goes here</content>
</entry>

and press POST. The response then contains the HTML of the feed as
it was before, without a new entry.
I guess I am missing something really basic, but can't quite figure it
out. Maybe somebody can help?

All the best,

Chris

Wolfgang Meier

unread,
Jun 6, 2008, 4:37:33 PM6/6/08
to atomicwi...@googlegroups.com
Hi,

> I am trying to get started with AtomWiki, but there are some things I
> dont grok. First, just for clarification, the documentation on the
> exist site at http://exist-db.org/atompub.html has nothing to do with
> Atomwiki, right?

Well, AtomicWiki uses eXist's atom interface in the background.
Somehow you could see it as a web frontend to the atom backend. If you
edit an entry in AtomicWiki, the data will be wrapped into an atom XML
doc and posted to eXist's atom interface. The idea behind this is that
I would like to be able to use different backends. Right now the
separation is not complete, but this may change in the future.

This means that the atom examples given in
http://exist-db.org/atompub.html should indeed be applicable to your
AtomicWiki installation.

> Now, what URL should I use to post a new entry to a feed? I am using
> Alexander Milowskid "Poster" Firefox extension to try to send a post
> to the AtomWiki, but what I get is just the top page of the feed.
> Here are the details I filled in:
>
> URL: http://localhost:8000/blogs/chris/

The URL should be something like

http://localhost:8000/atom/edit/wiki/blogs/chris/

/atom/edit -> selects the edit module of the atom interface

/wiki -> the root collection of the wiki content

/blogs/chris -> path of the feed to edit

I had some problems with passing user credentials through Poster, so I
tried curl instead. The following line post a new entry read from
entry.xml to the feed "util":

curl -i --data @entry.xml -u editor:atom -H "Content-Type:
application/atom+xml" http://localhost:8000/atom/edit/wiki/util/

Wolfgang

chris

unread,
Jun 6, 2008, 10:34:51 PM6/6/08
to atomicwiki-users
Dear Wolfgang,

On Jun 7, 5:37 am, "Wolfgang Meier" <wolfg...@exist-db.org> wrote:
>
> This means that the atom examples given inhttp://exist-db.org/atompub.htmlshould indeed be applicable to your
> AtomicWiki installation.

Thank you for clearing this up. With your example below, this is much
clearer now.

> curl -i --data @entry.xml -u editor:atom -H "Content-Type:
> application/atom+xml"http://localhost:8000/atom/edit/wiki/util/

OK, switched to curl. With my entry.xml as above, posted with this
URL:

curl -i --data @entry-sample.xml -u admin:**** -H "Content-Type:
application/atom+xml" http://localhost:8000/atom/edit/wiki/blogs/chris

this is the response:

<entry xmlns="http://www.w3.org/2005/
Atom"><published>2008-06-07T11:19:35+09:00</published><link href="?
id=urn:uuid:261a1388-595d-40d1-9552-069569f6630e" rel="edit"
type="application/atom+xml"/>
<author><name>Chris</name></author> <id>urn:uuid:
261a1388-595d-40d1-9552-069569f6630e</id> <title>A test entry</
title> <updated>2008-06-07T11:19:35+09:00</updated>
<content>Content goes here</content></entry>


I get indeed a new entry in the blog. There still seems to be a small
interface issue; if I look at the blog now, I get a line that says
"Continue reading", but even if I click there it still says "Continue
reading". This might be because there is now WIKI id yet? Instead of
the usual 'title without whitespace' URL, I see the link using the
long urn:uuid ... ATOM id.

All the best,

Christian
Reply all
Reply to author
Forward
0 new messages