diff options
| author | 2012-12-24 01:27:14 +0100 | |
|---|---|---|
| committer | 2012-12-24 01:27:14 +0100 | |
| commit | 77c7dbaa9ae845b0795f4da33eb0d285f6b9d1c4 (patch) | |
| tree | 0168de30ce7b4107ed13fc57974f95850ea88e73 /linkwave.scm | |
| download | markam-77c7dbaa9ae845b0795f4da33eb0d285f6b9d1c4.tar.gz markam-77c7dbaa9ae845b0795f4da33eb0d285f6b9d1c4.zip | |
Initial commit
Diffstat (limited to 'linkwave.scm')
| -rw-r--r-- | linkwave.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linkwave.scm b/linkwave.scm new file mode 100644 index 0000000..7e26a05 --- /dev/null +++ b/linkwave.scm @@ -0,0 +1,17 @@ +(declare (uses paths)) + +(require-extension sqlite3) +(require-library posix srfi-4) + +(: string-no-null (string -> string)) +(define (string-no-null str) + (substring str 0 (- (string-length str) 1))) + +(: print-row (string fixnum string string -> void)) +(define (print-row url seconds name description) + (format #t "~a~% ~a~% ~a~% ~a~%~%" (string-no-null name) (string-no-null description) + (string-no-null url) (seconds->string seconds))) + +(define db (open-database (data-file "linkwave.db"))) +(for-each-row print-row db "select * from bookmark") +(finalize! db #t) |
