~jpgleeson/spawsh

ea937f825e3e475d137db78d1557586a3d0c9338 — Jack Gleeson 3 years ago d640667
Update to dotnet5.0. Better error and link handling
2 files changed, 24 insertions(+), 3 deletions(-)

M Program.cs
M spawsh.csproj
M Program.cs => Program.cs +23 -2
@@ 181,13 181,14 @@ namespace spawsh
                    string[] fetchedPage = fetchPage();

                    LineBuffer = fetchedPage;

                    if (LineBuffer[0] == "No such host is known.")
                    
                    if (LineBuffer[0] == "No such host is known." || LineBuffer[0] == "Resource temporarily unavailable")
                    {
                        linksInPage = new string[0];
                    }
                    else
                    {
                        Console.WriteLine("here");
                        linksInPage = buildLinkSet(LineBuffer);
                    }
                    


@@ 263,6 264,26 @@ namespace spawsh

        static bool buildRequest(string inputString)
        {
            if (inputString.Length == 0)
            {
                return false;
            }
            
            if (inputString.Contains('\t'))
            {
                string[] broken = inputString.Split('\t');
                
                inputString = broken[1];
            }
            else if (inputString.Contains(' '))
            {
                string[] broken = inputString.Split(' ');
                
                inputString = broken[1];
            }
            
            Console.WriteLine("here - " + inputString);
            
            if (inputString.Contains("gemini://"))
            {
                inputString = inputString.Trim();

M spawsh.csproj => spawsh.csproj +1 -1
@@ 2,7 2,7 @@

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <TargetFramework>netcoreapp5.0</TargetFramework>
  </PropertyGroup>

</Project>