<commit_before>;;;; bookmark.lisp --- manage and create bookmarks

(in-package :next)

(defun initialize-bookmark-db ()
  "Create a databas file if necessary and make a table for bookmarks"
  (unless (probe-file "~/.next.d/bookmark.db")
    (with-open-file (p "~/.next.d/bookmark.db" :if-does-not-exist :create))
    (let ((db (sqlite:connect
	       (truename (probe-file "~/.next.d/bookmark.db")))))
      (sqlite:execute-non-query
       db"create table bookmarks (id integer primary key, url text not null)")<commit_msg>probe file instead of opening it<commit_after>;;;; bookmark.lisp --- manage and create bookmarks

(in-package :next)

(defun initialize-bookmark-db ()
  "Create a databas file if necessary and make a table for bookmarks"
  (unless (probe-file "~/.next.d/bookmark.db")
    (close (open "~/.next.d/bookmark.db" :direction :probe :if-does-not-exist :create))
    (let ((db (sqlite:connect
	       (truename (probe-file "~/.next.d/bookmark.db")))))
      (sqlite:execute-non-query
       db"create table bookmarks (id integer primary key, url text not null)")
{'fraction_non_alphanumeric': 0.1556997219647822, 'fraction_numerical': 0.0, 'mean_word_length': 3.5762711864406778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '479262', 'n_tokens_mistral': 368, 'n_tokens_neox': 355, 'n_words': 102}