Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change JavaScriptConverter to JsonConvert.DeserializeObject #47

Open
TypNull opened this issue Mar 15, 2024 · 1 comment
Open

Change JavaScriptConverter to JsonConvert.DeserializeObject #47

TypNull opened this issue Mar 15, 2024 · 1 comment

Comments

@TypNull
Copy link

TypNull commented Mar 15, 2024

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
Copy link
Author

TypNull commented Mar 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant