Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

28
LINES

< > BotCompany Repo | #1009107 // Read Firefox Bookmarks [abandoned, SqlJet can't read the db]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Transpiled version (1907L) is out of date.

1  
!7
2  
3  
lib 1009105 lib 1009109
4  
5  
import org.tmatesoft.sqljet.core.table.*;
6  
import org.tmatesoft.sqljet.core.schema.*;
7  
8  
p {
9  
  File profileDir = mozillaDefaultProfileDir();
10  
  if (profileDir == null) ret with print("No Firefox profile found");
11  
  print("Using Firefox profile: " + f2s(profileDir));
12  
  
13  
  File placesFile = newFile(profileDir, "places.sqlite");
14  
  if (placesFile.exists())
15  
    print("Places DB found!");
16  
  else
17  
    fail("Places DB not found in: " + f2s(placesFile));
18  
    
19  
  SqlJetDb db = SqlJetDb.open(placesFile, false);
20  
  try {
21  
    print("DB opened!");
22  
    ISqlJetSchema schema = db.getSchema();
23  
    printAsciiHeading("Tables!");
24  
    pnl(schema.getTableNames());
25  
  } finally {
26  
    db.close();
27  
  }
28  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv

No comments. add comment

Snippet ID: #1009107
Snippet name: Read Firefox Bookmarks [abandoned, SqlJet can't read the db]
Eternal ID of this version: #1009107/12
Text MD5: 4753dc1ba2469a603ced6a58009dbaa3
Author: stefan
Category: javax / networking
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-14 16:30:32
Source code size: 733 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 364 / 487
Version history: 11 change(s)
Referenced in: [show references]