BookmarksManager 2.0.0

Library for handling browsers bookmarks (supports Netscape bookmarks format)

Install-Package BookmarksManager -Version 2.0.0
dotnet add package BookmarksManager --version 2.0.0
<PackageReference Include="BookmarksManager" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BookmarksManager --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

BookmarksManager (simple .NET Standard lib for importing/exporting browser bookmarks)

With this library you can:

  • Write/export and read/import Netscape bookmark file format (exported from Firefox, IE, etc.)
  • Read/import Firefox internal bookmarks sqlite database (places.sql)
  • Read/import Chrome bookmarks from browser api (https://developer.chrome.com/extensions/bookmarks) and Chrome bookmarks file (JSON format)

License: MIT license

NuGet packages: https://www.nuget.org/packages?q=bookmarksmanager

Usage examples:

//Read bookmarks from string
var reader = new NetscapeBookmarksReader();
var bookmarks = reader.Read(bookmarksString);
foreach (var b in bookmarks.AllLinks)
{
  Console.WriteLine("Url: {0}; Title: {1}", b.Url, b.Title);
}

//Read bookmarks from file
using (var file = File.OpenRead("path_to_file"))
{
  var reader = new NetscapeBookmarksReader();
  //supports encoding detection when reading from stream
  var bookmarks = reader.Read(file);
  foreach (var b in bookmarks.AllLinks.Where(l=>l.LastVisit < DateTime.Today))
  {
    Console.WriteLine("Type {0}, Title: {1}", b.GetType().Name, b.Title);
  }
}


//Write bookmarks
var bookmarks = new BookmarkFolder()
{
    new BookmarkLink("http://example.com", "Example")
};
var writter = new NetscapeBookmarksWritter(bookmarks);

Console.WriteLine(writter.ToString());

//supports writting to stream with custom encoding
writter.OutputEncoding = Encoding.GetEncoding(1257);
using (var file = File.OpenWrite("path_to_file"))
{
    writter.Write(file);
}

BookmarksManager (simple .NET Standard lib for importing/exporting browser bookmarks)

With this library you can:

  • Write/export and read/import Netscape bookmark file format (exported from Firefox, IE, etc.)
  • Read/import Firefox internal bookmarks sqlite database (places.sql)
  • Read/import Chrome bookmarks from browser api (https://developer.chrome.com/extensions/bookmarks) and Chrome bookmarks file (JSON format)

License: MIT license

NuGet packages: https://www.nuget.org/packages?q=bookmarksmanager

Usage examples:

//Read bookmarks from string
var reader = new NetscapeBookmarksReader();
var bookmarks = reader.Read(bookmarksString);
foreach (var b in bookmarks.AllLinks)
{
  Console.WriteLine("Url: {0}; Title: {1}", b.Url, b.Title);
}

//Read bookmarks from file
using (var file = File.OpenRead("path_to_file"))
{
  var reader = new NetscapeBookmarksReader();
  //supports encoding detection when reading from stream
  var bookmarks = reader.Read(file);
  foreach (var b in bookmarks.AllLinks.Where(l=>l.LastVisit < DateTime.Today))
  {
    Console.WriteLine("Type {0}, Title: {1}", b.GetType().Name, b.Title);
  }
}


//Write bookmarks
var bookmarks = new BookmarkFolder()
{
    new BookmarkLink("http://example.com", "Example")
};
var writter = new NetscapeBookmarksWritter(bookmarks);

Console.WriteLine(writter.ToString());

//supports writting to stream with custom encoding
writter.OutputEncoding = Encoding.GetEncoding(1257);
using (var file = File.OpenWrite("path_to_file"))
{
    writter.Write(file);
}

Release Notes

Ported to netstandard1.6;
Minor bugfixes;
Braking change: NetscapeBookmarksWritter renamed to NetscapeBookmarksWriter;

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 407 12/20/2018
1.1.1 1,303 7/22/2014
1.1.0 394 7/22/2014
1.0.0 680 6/18/2014