edinburghlivinglab / dds-notebooks

IPython Notebooks for Data, Design and Society
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

License in notebook metadata #14

Open gngdb opened 9 years ago

gngdb commented 9 years ago

There is a metadata section in the notebook json. This would be a good place to put the License of the project. Would be easy to make a script to parse the json and add this. Or it may also be possible with nbformat, but this might not be supported anymore.

franciscovargas commented 9 years ago

We can also add tags to the metadata section for the indexing bit. Parsing it will be easy enough.

ewan-klein commented 9 years ago

Yes, agree about adding some topic tags.

I guess the approved approach would be to parse an existing notebook with nbformat.read(), add some metadata about copyright, license, year, etc which could be kept in a top-level specification (e.g. in JSON format), and then written out again using nbformat.write().

There's some previous discussion on notebook metadata, but I didn't find it particularly helpful. Though perhaps for good form's sake, if we use say CC-BY, it's good to link to the online version of the license, so maybe having a JSON-LD context would help.

franciscovargas commented 9 years ago

Still have not touched the parsing but managed to create an index page which passes an option from the home menu and then can shuffle the list of notebooks depending on that option and re-displays them based on that (this was done on our fork of jupyterhub0. Also the page no longer has the jupyter logo but the school of inf one and it can be customized more and more. It was the best solution we could come up with and tornado is surprisingly easy to use as a web framework, it even feels a bit more lightweight than flask. On the python side all I added to jupyterhub was around 5 lines of code. On the html side it was about 10 and on the JS side is where most of the code is at but still not much. I should probably create a seperate issue for this.