pchampin / sophia_rs

Sophia: a Rust toolkit for RDF and Linked Data
Other
214 stars 23 forks source link

Provide some "Getting Started" documentation #14

Closed JordanShurmer closed 8 months ago

JordanShurmer commented 4 years ago

This create looks really promising for my Linked Data project. However, I'm really unsure about how to get started using it.

It would be really useful to have some examples of doing the most common things in the rust docs. For example: How to create a graph, add some triples, and write it as turtle to a file; How to read a turtle file in, parse it as a graph, then modify it's contents.

I'd be happy to contribute the documentation, if I can get some pointers on how to do it :)

pchampin commented 4 years ago

Thanks for your interest in this crate. And thanks to @MattesWhite for quickly responding with a proposal. I adapted the example and merged it.

I leave this issue open, because I intend to add more examples later. But that will be after I integrate more parsers (Turtle, TriG...) from the https://github.com/Tpt/rio crate.

JordanShurmer commented 4 years ago

Awesome! Thanks @MattesWhite

huhn511 commented 3 years ago

I think it would be nice to have some examples for each crate. Also very helpful, would be a mdbook for detailed documentation - and the rendered docs page a nice start for developers.

What do you think about it? I could add PR with a docs folder and prepare something (setup mdbook, structure. GitHub deploy action, etc).

Best wishes ✌️

pchampin commented 3 years ago

@huhn511 That would be really nice indeed, and yes, a PR would be greatly appreciated :)

hoijui commented 3 years ago

In a loop over all triples, I wanted to put all literal objects in one vec, all subjects and non-literal (and non-blank) objects in one vec, and all predicates + their subject and object in an other data structure (vec?), to be able to use them in a graph-data structure (petgraph) later on. I was not able to do that, as I am a rust newb, and got lost in the lifetime, and nested data-structure complexity of it (from the sophia side). Such an example would be nice to see for me (without the petgraph part, maybe?).

hoijui commented 3 years ago

I guess I would store the Rc<str> in my vec, right? how would I get to it, in the loop?

pchampin commented 3 years ago

@hoijui I just opened the discussion feature, so that we can have StackOverflow style Q&A's, which I think is more appropriate for that kind of question. I suggest that you open a question there, and provide an code example... I'll have a look.

hoijui commented 3 years ago

done: https://github.com/pchampin/sophia_rs/discussions/102

pchampin commented 8 months ago

We now have an MD-Book here: https://pchampin.github.io/sophia_rs/

It is far from complete, but I consider maintaining it as part of maintaining the crate, so this issue can be closed.