CockyGrabber icon indicating copy to clipboard operation
CockyGrabber copied to clipboard

Change JavaScriptConverter to JsonConvert.DeserializeObject

Open TypNull opened this issue 11 months ago • 1 comments

Subject: Request for Enhancements in CokyGrabber: .NET Core Support and Librewolf Integration

Hello,

I am reaching out regarding the functionality of CockyGrabber for extracting bookmarks from Librewolf (Gecko). I have encountered an issue with the current project's lack of support for .NET Core, as I intend to utilize it with .NET 6 or a higher version. Upon using your NuGet package, an error was triggered due to the absence of the file containing "System.Web.Script.Serialization;". To overcome this obstacle, I resorted to manually copying your source code and change it for my usage.

I am kindly requesting the following enhancements to enhance compatibility and functionality:

  1. Replace the JavascriptConverter with JsonConvert.DeserializeObject to facilitate support for dynamic JSON objects in .NET Core:
using Newtonsoft.Json;
dynamic json = JsonConvert.DeserializeObject(File.ReadAllText(profile + BookmarkPath));
  1. Incorporate Librewolf support in the UniversalGrabber feature of CockyGrabber:
public class LibrefoxGrabber : GeckoGrabber
{
    public override string ProfileDirPath => Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\librewolf\\Profiles";
}
  1. I believe there may be an error in the documentation regarding the implementation of your own GeckoGrabber, where the base class should not be the BlinkGrabber: Link to documentation correction

Thank you for considering these requests.

TypNull avatar Mar 15 '24 17:03 TypNull

Can I refactor the code myself instead? This way, you won't have to do it. I prefer not to fork your project but to create a new branch where I can make the changes. Ultimately, I need a NugetPackage for grabbing, as I automate my project builds with GitHub actions. It seems that you don't publish your packages with GitHub actions. I would like to update your NugetPackage, giving credit to you for the project. Could you please add a GitHub secret named "NUGET_API_KEY" that contains an API key to push new CockyGrabber packages to Nuget?

I plan to update the project to .NET 6 for long-term support and compatibility. I believe that many features in .NET 8 (C# 12) are unnecessary. I'm unsure about which tasks from your ToDo list I can tackle, but I'm willing to try if you're open to me refactoring the code. GitHub is great for version control, so I believe it should work smoothly.

TypNull avatar Mar 17 '24 10:03 TypNull