summary refs log tree commit diff
path: root/GitStaticPageBuilder/Program.cs
blob: e70e3c09f5ab5416eaa4c2c291e40a55af8bda63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// See https://aka.ms/new-console-template for more information

using GitStaticPageBuilder.Pages;
using LibGit;
using LibGit.Extensions;

Console.WriteLine("Hello, World!");

var repo = new GitRepo("/home/root@Rory/git/spacebar/server/.git");
Console.WriteLine(repo.ToJson(ignoreNull: false, indent: true, unsafeContent: true));
if(!Directory.Exists("output"))
    Directory.CreateDirectory("output");
File.WriteAllText("output/repo.json", repo.ToJson(ignoreNull: false, indent: true, unsafeContent: true));
File.WriteAllText("output/repo.html", RepoPage.GetRepoPage(repo));