Exemple #1
0
 private static Launchables LoadFF3Bookmarks(File file) {
     using (var connection = new Connection(file)) {
         var reader =
             connection.ExecuteQuery(
                 "select b.title,  p.url,k.keyword from moz_places p join moz_bookmarks b on p.id = b.fk left outer join moz_keywords k on keyword_id = k.id where b.title is not null");
         var bookmarks = new Launchables();
         while (reader.Read()) {
             if (!reader["url"].ToString().StartsWith("place:"))
                 bookmarks.AddRange(CreateBookmarks(reader["title"].ToString(), reader["url"].ToString(), reader["keyword"].ToString()));
         }
         return bookmarks;
     }
 }
Exemple #2
0
 private static Launchables LoadFFDeliciousBookmarks(File file) {
     using (var connection = new Connection(file)) {
         SQLiteDataReader keywordsReader =
             connection.ExecuteQuery("SELECT name as title, url, shortcut as keyword FROM bookmarks where title is not null and keyword <> ''");
         var bookmarks = new Launchables();
         while (keywordsReader.Read())
             bookmarks.AddRange(CreateBookmarks(keywordsReader["title"].ToString(), keywordsReader["url"].ToString(),
                                                keywordsReader["keyword"].ToString()));
         var tagsReader = connection.ExecuteQuery("SELECT name, rowid from tags");
         while (tagsReader.Read()) {
             if (!tagsReader["name"].ToString().StartsWith("shortcut:"))
                 bookmarks.Add(new DeliciousTag(tagsReader["name"].ToString(), int.Parse(tagsReader["rowid"].ToString()), file));
         }
         return bookmarks;
     }
 }