From 6b51f92a7fd11f75013aff71ee0fe1ec768231c5 Mon Sep 17 00:00:00 2001 From: Bitl Date: Sat, 9 Nov 2019 17:45:08 -0700 Subject: [PATCH] wip parser --- .gitignore | 388 +++++++++++++++--- NovetusLauncher/.vs/NovetusLauncher/v14/.suo | Bin 170496 -> 170496 bytes NovetusLauncher/NovetusFuncs/Downloader.cs | 21 +- .../NovetusTest_RobloxXMLFileParser/v14/.suo | Bin 38912 -> 46592 bytes .../RobloxXMLParser.cs | 20 +- 5 files changed, 368 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 2691555..2f1229f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,62 +1,350 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore -# Folder config file -Desktop.ini +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates -# Recycle Bin used on file shares -$RECYCLE.BIN/ +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs -# Windows Installer files -*.cab -*.msi -*.msm -*.msp +# Mono auto generated files +mono_crash.* -# Windows shortcuts -*.lnk +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ -# ========================= -# Operating System Files -# ========================= +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ -# OSX -# ========================= +# Visual Studio 2017 auto generated files +Generated\ Files/ -.DS_Store -.AppleDouble -.LSOverride +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* -# Thumbnails -._* +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk +# Benchmark Results +BenchmarkDotNet.Artifacts/ -# Debug/Release shit -bin/* -obj/* -Release/* -Debug/* -.vs/* -*.cache -*.resources -*.exe +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch *.pdb -*.txt -*.exe.config -*.dll -*.vhost.exe.manifest \ No newline at end of file +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ \ No newline at end of file diff --git a/NovetusLauncher/.vs/NovetusLauncher/v14/.suo b/NovetusLauncher/.vs/NovetusLauncher/v14/.suo index c2d1e5924d6070605fe15fc973b6afc65e00353b..1a8a944f0314822169ab5f069134a5860bf9ae66 100644 GIT binary patch delta 3226 zcmcIndr*|u75~oJ4_t6T9*Tkr%R>VznB^fMYGqkghoBR8)M9kvgK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downloader.cs +++ b/NovetusLauncher/NovetusFuncs/Downloader.cs @@ -11,7 +11,6 @@ class Downloader private string downloadOutcome; private string downloadOutcomeAddText; private static string downloadOutcomeException; - private SaveFileDialog saveFileDialog1; public Downloader(string url, string name, string filter) { @@ -30,11 +29,29 @@ class Downloader return downloadOutcome; } + public void InitDownload(string path, string fileext, string additionalText = "") + { + downloadOutcomeAddText = additionalText; + + string outputfilename = fileName + "." + fileext; + string fullpath = path + "\\" + outputfilename; + + try + { + int read = DownloadFile(fileURL, fullpath); + downloadOutcome = "File " + outputfilename + " downloaded! " + read + " bytes written! " + downloadOutcomeAddText + downloadOutcomeException; + } + catch (Exception ex) + { + downloadOutcome = "Error when downloading file: " + ex.Message; + } + } + public void InitDownload(string additionalText = "") { downloadOutcomeAddText = additionalText; - saveFileDialog1 = new SaveFileDialog() + SaveFileDialog saveFileDialog1 = new SaveFileDialog() { FileName = fileName, //"Compressed zip files (*.zip)|*.zip|All files (*.*)|*.*" diff --git a/NovetusTest_RobloxXMLFileParser/.vs/NovetusTest_RobloxXMLFileParser/v14/.suo b/NovetusTest_RobloxXMLFileParser/.vs/NovetusTest_RobloxXMLFileParser/v14/.suo index f8db15e95ad53f31871c1c0e3c910c985333bd7f..2b93b165c24937183ab5c03b7847b9e8eac875f4 100644 GIT binary patch delta 2493 zcmb_eYfKzf6rMZGE-RgZWna9uyWL6~Y++d_3e@G5g;H6{E`k&i4Az#24QWlw%7V1J z)<MtC{Nob>CK^plOiYY1Mu|U6V`4NRDUB4*8D{8Oi8i4(`SzZB z9{1k)=A1JdpXKAf@d-cMHCL0xGdp;AcV@!#NnPL6w`>o`arMP8%8#;HSmi_FK2#VG z8#o}_QE05jMV!HCdW&e*^tw$NMa6Z7KR9xM2?hO5l*mj&LYcP8K-|K$O|xa=Y(Y4* zbvn+ih~3&c6Xya=rX$@5il-r>Y=`G9IfX@H)dT6Nq6I-oRnQAg zHQca&dAB?`RUR;&hW;k>8O)Y?(XJUNW1!bE;Mc7csCaO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}j1Tn g>%e$e5+Z}&F)pFMt`vQK<$DW#C+F$0E8d*n0e5!@3jhEB diff --git a/NovetusTest_RobloxXMLFileParser/NovetusTest_RobloxXMLFileParser/RobloxXMLParser.cs b/NovetusTest_RobloxXMLFileParser/NovetusTest_RobloxXMLFileParser/RobloxXMLParser.cs index bcb9753..bf7dfe8 100644 --- a/NovetusTest_RobloxXMLFileParser/NovetusTest_RobloxXMLFileParser/RobloxXMLParser.cs +++ b/NovetusTest_RobloxXMLFileParser/NovetusTest_RobloxXMLFileParser/RobloxXMLParser.cs @@ -10,13 +10,20 @@ using System.Xml.Linq; public class RobloxXMLParser { + /* + * todo: make it so it: + * + * - downloads files from ROBLOX's servers from the links in the xml + * - puts them in their respective assetcache folders, naming them as [ID].[FILEEXT} + * - modifies the value in the xml to contain the new link + * - save the roblox xml. + */ public static void SearchNodes(string path, string itemClassValue, string itemIdValue) { try { string oldfile = File.ReadAllText(path); string fixedfile = RemoveInvalidXmlChars(ReplaceHexadecimalSymbols(oldfile)); - Console.WriteLine("Valid: " + CheckValidXmlChars(fixedfile)); XDocument doc = XDocument.Parse(fixedfile); var v = from nodes in doc.Descendants("Item") @@ -60,19 +67,14 @@ public class RobloxXMLParser } } - public static string RemoveInvalidXmlChars(string content) + private static string RemoveInvalidXmlChars(string content) { - return new string(content.Where(ch => System.Xml.XmlConvert.IsXmlChar(ch)).ToArray()); + return new string(content.Where(ch => XmlConvert.IsXmlChar(ch)).ToArray()); } - static string ReplaceHexadecimalSymbols(string txt) + private static string ReplaceHexadecimalSymbols(string txt) { string r = "[\x00-\x08\x0B\x0C\x0E-\x1F\x26]"; return Regex.Replace(txt, r, "", RegexOptions.Compiled); } - - public static bool CheckValidXmlChars(string content) - { - return content.All(ch => System.Xml.XmlConvert.IsXmlChar(ch)); - } }