{"id":19950892,"url":"https://github.com/andy840119/JupyterSharpParser","last_synced_at":"2025-05-03T18:33:25.654Z","repository":{"id":100179934,"uuid":"157833003","full_name":"andy840119/JupyterSharpParser","owner":"andy840119","description":"Jupyter parser written in C#","archived":false,"fork":false,"pushed_at":"2019-02-23T06:07:12.000Z","size":49133,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T06:19:25.042Z","etag":null,"topics":["andy840119","csharp","jupyter","nuget","parser"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andy840119.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-11-16T08:00:21.000Z","updated_at":"2024-10-19T19:37:13.000Z","dependencies_parsed_at":"2023-06-16T11:15:18.926Z","dependency_job_id":null,"html_url":"https://github.com/andy840119/JupyterSharpParser","commit_stats":null,"previous_names":["andy840119/jupytersharpphaser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy840119%2FJupyterSharpParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy840119%2FJupyterSharpParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy840119%2FJupyterSharpParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy840119%2FJupyterSharpParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andy840119","download_url":"https://codeload.github.com/andy840119/JupyterSharpParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223932164,"owners_count":17227277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andy840119","csharp","jupyter","nuget","parser"],"created_at":"2024-11-13T01:05:55.597Z","updated_at":"2024-11-13T01:05:56.613Z","avatar_url":"https://github.com/andy840119.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JupyterSharpParser\n[![Build status](https://ci.appveyor.com/api/projects/status/awnpnnvevkj51b8m?svg=true)](https://ci.appveyor.com/project/andy840119/jupytersharpparser) \n[![CodeFactor](https://www.codefactor.io/repository/github/andy840119/jupytersharpparser/badge)](https://www.codefactor.io/repository/github/andy840119/jupytersharpparser)\n[![NuGet](https://img.shields.io/nuget/v/JupyterSharpParser.svg)](https://www.nuget.org/packages/JupyterSharpParser)\n[![NuGet](https://img.shields.io/nuget/dt/JupyterSharpParser.svg)](https://www.nuget.org/packages/JupyterSharpParser)\n[![NuGet](https://img.shields.io/badge/月子我婆-passed-ff69b4.svg)](https://github.com/andy840119/JupyterSharpParser)\n\nJupyter parser written in C#\n\nSamlpe : \n```csharp\nvar jupyterText = \"[Text in jupyer document]\";\nJupyterDocument document = Jupyter.Parse(jupyterText);\n\n//You can do anything in this document such as add cell\ndocument.Cells.Add(new CodeCell\n{\n    ExecutionCount = 10,\n    Source = new List\u003cstring\u003e{\"print(3 * 2)\"}\n});\n```\n\nConvert To Json : \n```csharp\n// Output\nvar writer = new StringWriter();\n\n// Create a HTML Renderer and setup it with the pipeline\nvar renderer = new JsonRenderer(writer);\n\n// Renders Jupyter Document to Json (to the writer)\nrenderer.Render(document);\n\n// Gets the rendered string\nvar result = writer.ToString();\n```\n\nConvert To Html : \n```csharp\n// Output\nvar writer = new StringWriter();\n\n// Create a HTML Renderer and setup it with the pipeline\nvar renderer = new HtmlRenderer(writer);\n\n// Renders Jupyter Document to Json (to the writer)\nrenderer.Render(document);\n\n// Gets the rendered string\nvar result = writer.ToString();\n```\n\nConvert To Pdf : \n```csharp\n//Note : Due to Select.HtmlToPdf.NetCore, PDF limited to most 5 page,\n//       And cannot work on other platform such as mac and linux.\n\n// Output\nusing(var stream = new FileStream(\"fileName\"))\n{\n    // Create a HTML Renderer and setup it with the pipeline\n    var renderer = new PdfRenderer(stream);\n\n    // Renders Jupyter Document to Json (to the writer)\n    renderer.Render(document);  \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy840119%2FJupyterSharpParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandy840119%2FJupyterSharpParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy840119%2FJupyterSharpParser/lists"}