first commit

This commit is contained in:
sevi-kun 2021-05-28 20:05:12 +02:00
commit b6d5327243
32 changed files with 429 additions and 0 deletions

26
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net5.0/rhentai.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

42
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/rhentai.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/rhentai.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/rhentai.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

48
Program.cs Normal file
View File

@ -0,0 +1,48 @@
using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net.Http.Headers;
using System.IO;
namespace rhentai
{
class Program
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args){
await ProcessRepositories();
}
private static async Task ProcessRepositories(){
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/vnd.github.v3+json"));
// client.DefaultRequestHeaders.Add("User-Agent", ".NET Foundation Repository Reporter");
var stringTask = client.GetStringAsync("https://nhentai.net/random/");
var msg = await stringTask;
//Console.Write(msg);
await File.WriteAllTextAsync("output.txt", msg);
var fileRead = File.ReadAllTextAsync("output.txt");
var textread = await fileRead;
int index_tags_start = textread.IndexOf("Tags:");
int index_tags_end = textread.IndexOf("Artists:");
string filteredoutput = "";
for (int i = index_tags_start; i < index_tags_end; i++){
filteredoutput += textread[i];
}
Console.Write(filteredoutput);
}
}
}

1
README.md Normal file
View File

@ -0,0 +1 @@
# rhentai

Binary file not shown.

BIN
bin/Debug/net5.0/rhentai Executable file

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"rhentai/1.0.0": {
"runtime": {
"rhentai.dll": {}
}
}
}
},
"libraries": {
"rhentai/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"/home/belar/.dotnet/store/|arch|/|tfm|",
"/home/belar/.nuget/packages"
]
}
}

View File

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0"
}
}
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]

BIN
obj/Debug/net5.0/apphost Executable file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rhentai")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("rhentai")]
[assembly: System.Reflection.AssemblyTitleAttribute("rhentai")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -0,0 +1 @@
c7e7c101900146cf998b03ee48864513d6780038

View File

@ -0,0 +1,8 @@
is_global = true
build_property.TargetFramework = net5.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.PublishSingleFile =
build_property.IncludeAllContentForSelfExtract =
build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows

Binary file not shown.

View File

@ -0,0 +1 @@
dbcbf6bb51b27451db101b7859889f98f56ebf31

View File

@ -0,0 +1,16 @@
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai.deps.json
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai.runtimeconfig.json
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai.runtimeconfig.dev.json
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai.dll
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/ref/rhentai.dll
/home/belar/Documents/code/dotnet/csharp/rhentai/bin/Debug/net5.0/rhentai.pdb
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.csprojAssemblyReference.cache
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.GeneratedMSBuildEditorConfig.editorconfig
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.AssemblyInfoInputs.cache
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.AssemblyInfo.cs
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.csproj.CoreCompileInputs.cache
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.dll
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/ref/rhentai.dll
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.pdb
/home/belar/Documents/code/dotnet/csharp/rhentai/obj/Debug/net5.0/rhentai.genruntimeconfig.cache

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
e7cb325f8a7eb60da8f512fb2e15138b4f5a839f

Binary file not shown.

71
obj/project.assets.json Normal file
View File

@ -0,0 +1,71 @@
{
"version": 3,
"targets": {
"net5.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net5.0": []
},
"packageFolders": {
"/home/belar/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj",
"projectName": "rhentai",
"projectPath": "/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj",
"packagesPath": "/home/belar/.nuget/packages/",
"outputPath": "/home/belar/Documents/code/dotnet/csharp/rhentai/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/belar/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net5.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net5.0": {
"targetAlias": "net5.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net5.0": {
"targetAlias": "net5.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[5.0.0, 5.0.0]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/5.0.203/RuntimeIdentifierGraph.json"
}
}
}
}

10
obj/project.nuget.cache Normal file
View File

@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "+KYrRDxWep6bU4Pn1U4sbGsxOo+c5GJhI6eDUk0MleUQxC6NBIyFBF5Fbs4k+IFhLKg09oZ8GQAq/is/oxzh4w==",
"success": true,
"projectFilePath": "/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj",
"expectedPackageFiles": [
"/home/belar/.nuget/packages/microsoft.aspnetcore.app.ref/5.0.0/microsoft.aspnetcore.app.ref.5.0.0.nupkg.sha512"
],
"logs": []
}

View File

@ -0,0 +1,66 @@
{
"format": 1,
"restore": {
"/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj": {}
},
"projects": {
"/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj",
"projectName": "rhentai",
"projectPath": "/home/belar/Documents/code/dotnet/csharp/rhentai/rhentai.csproj",
"packagesPath": "/home/belar/.nuget/packages/",
"outputPath": "/home/belar/Documents/code/dotnet/csharp/rhentai/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/belar/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net5.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net5.0": {
"targetAlias": "net5.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net5.0": {
"targetAlias": "net5.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[5.0.0, 5.0.0]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/5.0.203/RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/belar/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/belar/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.9.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/belar/.nuget/packages/" />
</ItemGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

39
output.txt Normal file

File diff suppressed because one or more lines are too long

8
rhentai.csproj Normal file
View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>