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

Write support? #2

Open
olenz opened this issue Feb 6, 2014 · 3 comments
Open

Write support? #2

olenz opened this issue Feb 6, 2014 · 3 comments

Comments

@olenz
Copy link

olenz commented Feb 6, 2014

Do you see a chance to support writing the Semantic data in the wiki? The RDF export is handled via the Special page, but there is no corresponding thing for writing data, is there?

@baojie
Copy link
Owner

baojie commented Feb 6, 2014

It would be very easy to do so by adding some scripts on a page

page = wiki.site.Pages['SnowWhite']
old_content = page.edit()
new_content = old_content + "[[Category:Princess]][[friend of::Grumpy]]"
page.save(new_content)

330055c

@olenz
Copy link
Author

olenz commented Feb 7, 2014

That's not exactly what I meant. I thought that there would be a function to more directly modify the SMW data, e.g. by allowing to upload an RDF file (basically the inverse of "getRDF").
However, I see that this might be a problem, as all data should somehow be reflected in the contents of the article, I guess.

@baojie
Copy link
Owner

baojie commented Feb 9, 2014

In SMW, the page content is primary, and database version is secondary. If we directly write to the database, the written data could be lost when the subject page is refreshed.

I agree that it would be very useful to import RDF data into wiki. The RDFIO extension [1] maybe used, although it requires a bit more setup at server side.

It may be useful to enable client-side Python support (without changing server code) by rewriting RDF triples to wiki scripts. Let's keep it in the roadmap

[1] http://www.mediawiki.org/wiki/Extension:RDFIO

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

No branches or pull requests

2 participants