The clipper Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The clipper Reference Manual

This is the clipper Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:41:19 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Clipper

Build Status Quicklisp dist

Clipper is a file attachment library.

Introduction to Clipper(Japanese)

Usage

(in-package :cl-user)
(defpackage clipper.sample
  (:use :cl
        :integral
        :clipper))
(in-package :clipper.sample)

(connect-toplevel :mysql :database-name "clipper_sample" :username "root")

(defclass picture ()
  ((id :col-type (:integer 11)
       :primary-key t
       :auto-increment t
       :not-null t
       :initarg :id)
   (image-file-name :col-type (:varchar 255)
                    :initarg :image-file-name)
   (image-content-type :col-type (:varchar 255)
                       :initarg :image-content-type)
   (image-file-size :col-type (:integer 11)
                    :initarg :image-file-size)
   (url :type string
        :initarg :url))
  (:metaclass <dao-table-class>)
  (:table-name "pictures"))

(setup-clipper :store-type :s3
               :aws-access-key (asdf::getenv "AWS_ACCESS_KEY")
               :aws-secret-key (asdf::getenv "AWS_SECRET_KEY")
               :s3-endpoint "s3-ap-northeast-1.amazonaws.com"
               :s3-bucket-name "clipper-sample"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "https://s3-ap-northeast-1.amazonaws.com/clipper-sample/1/lisplogo_alien_256.png"

(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :relative #P"/home/cl-user/common-lisp/clipper/"
               :prefix "http://localhost:3000/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "http://localhsot:3000/images/2/lisplogo_alien_256.png"

setup-clipper

(setup-clipper :store-type :local)

or

(setup-clipper :store-type :s3)

or you can create :store-type other than :local or :s3.

:store-type :local

(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :relative #P"/home/cl-user/common-lisp/clipper/"
               :prefix "http://localhost:3000/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "http://localhsot:3000/images/2/lisplogo_alien_256.png"
(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "/home/cl-user/common-lisp/clipper/images/2/lisplogo_alien_256.png"
(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :relative #P"/home/cl-user/common-lisp/clipper/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "images/2/lisplogo_alien_256.png"
(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :relative #P"/home/cl-user/common-lisp/clipper/"
               :prefix "http://localhost:3000/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "http://localhost3000/images/2/lisplogo_alien_256.png"

:store-type :s3

(setup-clipper :store-type :s3
               :aws-access-key (asdf::getenv "AWS_ACCESS_KEY")
               :aws-secret-key (asdf::getenv "AWS_SECRET_KEY")
               :s3-endpoint "s3-ap-northeast-1.amazonaws.com"
               :s3-bucket-name "clipper-sample"
               :clipper-class (find-class 'picture)
               :format "images:ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao 'picture)))
  (save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
  (image-url object))

=> "https://s3-ap-northeast-1.amazonaws.com/clipper-sample/images/1/lisplogo_alien_256.png"

:clipper-class

:clipper-class can take any class or struct which have slots for id, image-file-name, image-content-type, image-file-size and url, and each slot can be specified by setup-clipper.

(defclass picture ()
  ((id :col-type (:integer 11)
       :primary-key t
       :auto-increment t
       :not-null t
       :initarg :id)
   (image-file-name :col-type (:varchar 255)
                    :initarg :image-file-name)
   (image-content-type :col-type (:varchar 255)
                       :initarg :image-content-type)
   (image-file-size :col-type (:integer 11)
                    :initarg :image-file-size)
   (url :type string
        :initarg :url))
  (:metaclass <dao-table-class>)
  (:table-name "pictures"))

(setup-clipper :clipper-class (find-class 'picture)
               :id-slot 'id
               :url-slot 'url
               :image-file-name-slot 'image-file-name
               :image-content-type-slot 'image-content-type
               :image-file-size-slot 'image-file-size)

:format

(defvar *format-keys*
  (list :ID #'clip-id
        :URL #'clip-url
        :FILE-NAME #'clip-image-file-name-without-extension
        :EXTENSION #'clip-extension))

(store-format (setup-clipper :format ":ID/:URL/:FILE-NAME.:EXTENSION"))

(make-instance 'picture :id 1 :url "sample-url" :image-file-name "smaple.png")

=> format will be "1/sample-url/sample.png"

attach-image

(let ((object (make-instance 'picture)))
  (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png")
  (attach-image object :path-name "/home/lisp-user/image/lisplogo_alien_256.png")
  (attach-image object :image (drakma:http-request "http://www.lisperati.com/lisplogo_alien_256.png")
                       :file-name "lisplogo_alien_256.nng")

  ;; or
  (setf (picture-url object) "http://www.lisperati.com/lisplogo_alien_256.png")
  (attach-image object))

attach-image with resize

If you add :width and :height, attach-image resize image with opticl:fit-image-into.

(setup-clipper :store-type :local
               :image-directory #P"/home/cl-user/common-lisp/clipper/images/"
               :relative #P"/home/cl-user/common-lisp/clipper/"
               :prefix "http://localhost:3000/"
               :clipper-class (find-class 'picture)
               :format ":ID/:FILE-NAME.:EXTENSION"
               :width 200
               :height 200)

See Also

Author

Copyright

Copyright (c) 2015 Rudolph-Miller (chopsticks.tk.ppfm@gmail.com)


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 clipper

Author

Rudolph-Miller

License

MIT

Description

File attachment library.

Long Description

# Clipper
[![Build Status](https://circleci.com/gh/Rudolph-Miller/clipper.svg?style=shield)](https://circleci.com/gh/Rudolph-Miller/clipper)
[![Quicklisp dist](http://quickdocs.org/badge/clipper.svg)](http://quickdocs.org/clipper/)

Clipper is a file attachment library.

[Introduction to Clipper(Japanese)](http://blog.rudolph-miller.com/2015/08/10/introduction-to-clipper/)

## Usage

“‘Lisp
(in-package :cl-user)
(defpackage clipper.sample
(:use :cl
:integral
:clipper))
(in-package :clipper.sample)

(connect-toplevel :mysql :database-name "clipper_sample" :username "root")

(defclass picture ()
((id :col-type (:integer 11)
:primary-key t
:auto-increment t
:not-null t
:initarg :id)
(image-file-name :col-type (:varchar 255)
:initarg :image-file-name)
(image-content-type :col-type (:varchar 255)
:initarg :image-content-type)
(image-file-size :col-type (:integer 11)
:initarg :image-file-size)
(url :type string
:initarg :url))
(:metaclass <dao-table-class>)
(:table-name "pictures"))

(setup-clipper :store-type :s3
:aws-access-key (asdf::getenv "AWS_ACCESS_KEY")
:aws-secret-key (asdf::getenv "AWS_SECRET_KEY")
:s3-endpoint "s3-ap-northeast-1.amazonaws.com"
:s3-bucket-name "clipper-sample"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "https://s3-ap-northeast-1.amazonaws.com/clipper-sample/1/lisplogo_alien_256.png"

(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:relative #P"/home/cl-user/common-lisp/clipper/"
:prefix "http://localhost:3000/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "http://localhsot:3000/images/2/lisplogo_alien_256.png"
“‘

## setup-clipper

“‘Lisp
(setup-clipper :store-type :local)
“‘

or

“‘Lisp
(setup-clipper :store-type :s3)
“‘

or you can create ‘:store-type‘ other than ‘:local‘ or ‘:s3‘.

### :store-type :local

“‘Lisp
(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:relative #P"/home/cl-user/common-lisp/clipper/"
:prefix "http://localhost:3000/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "http://localhsot:3000/images/2/lisplogo_alien_256.png"
“‘

- ‘:image-directory‘

“‘Lisp
(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "/home/cl-user/common-lisp/clipper/images/2/lisplogo_alien_256.png"
“‘

- ‘:relative‘

“‘Lisp
(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:relative #P"/home/cl-user/common-lisp/clipper/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "images/2/lisplogo_alien_256.png"
“‘

- ‘:prefix‘

“‘Lisp
(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:relative #P"/home/cl-user/common-lisp/clipper/"
:prefix "http://localhost:3000/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "http://localhost3000/images/2/lisplogo_alien_256.png"
“‘

### :store-type :s3

“‘Lisp
(setup-clipper :store-type :s3
:aws-access-key (asdf::getenv "AWS_ACCESS_KEY")
:aws-secret-key (asdf::getenv "AWS_SECRET_KEY")
:s3-endpoint "s3-ap-northeast-1.amazonaws.com"
:s3-bucket-name "clipper-sample"
:clipper-class (find-class ’picture)
:format "images:ID/:FILE-NAME.:EXTENSION")

(let ((object (create-dao ’picture)))
(save-dao (attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png"))
(image-url object))

=> "https://s3-ap-northeast-1.amazonaws.com/clipper-sample/images/1/lisplogo_alien_256.png"
“‘

### :clipper-class

‘:clipper-class‘ can take any class or struct which have slots for ‘id‘, ‘image-file-name‘, ‘image-content-type‘, ‘image-file-size‘ and ‘url‘, and each slot can be specified by ‘setup-clipper‘.

“‘Lisp
(defclass picture ()
((id :col-type (:integer 11)
:primary-key t
:auto-increment t
:not-null t
:initarg :id)
(image-file-name :col-type (:varchar 255)
:initarg :image-file-name)
(image-content-type :col-type (:varchar 255)
:initarg :image-content-type)
(image-file-size :col-type (:integer 11)
:initarg :image-file-size)
(url :type string
:initarg :url))
(:metaclass <dao-table-class>)
(:table-name "pictures"))

(setup-clipper :clipper-class (find-class ’picture)
:id-slot ’id
:url-slot ’url
:image-file-name-slot ’image-file-name
:image-content-type-slot ’image-content-type
:image-file-size-slot ’image-file-size)
“‘

### :format

- ‘:format‘ can take string with ‘:KEYWORD‘ and ‘:KEYWORD‘ is declared in ‘*format-keys*‘.
- Default declared ‘:KEYWORD‘ is ‘:ID‘, ‘:URL‘, ‘:FILE-NAME‘ and ‘:EXTENSION‘.
- ‘*format-keys*‘ is a plist of ‘:KEYWORD‘ and ‘function‘ which will be called with ‘object‘.
- ‘:FILE-NAME‘ will return ‘:image-file-name‘ without extension.

“‘Lisp
(defvar *format-keys*
(list :ID #’clip-id
:URL #’clip-url
:FILE-NAME #’clip-image-file-name-without-extension
:EXTENSION #’clip-extension))

(store-format (setup-clipper :format ":ID/:URL/:FILE-NAME.:EXTENSION"))

(make-instance ’picture :id 1 :url "sample-url" :image-file-name "smaple.png")

=> format will be "1/sample-url/sample.png"
“‘

## attach-image
- ‘attach-image‘ take ‘object‘ and keyword arguments(‘:url‘, ‘:image‘, ‘:path-name‘ and ‘:file-name‘).
- ‘attach-image‘ return ‘object‘ with ‘image-file-name‘, ‘image-content-type‘, ‘image-file-size‘ and ‘url‘.
- You have to save returned ‘object‘ on yourself.

“‘Lisp
(let ((object (make-instance ’picture)))
(attach-image object :url "http://www.lisperati.com/lisplogo_alien_256.png")
(attach-image object :path-name "/home/lisp-user/image/lisplogo_alien_256.png")
(attach-image object :image (drakma:http-request "http://www.lisperati.com/lisplogo_alien_256.png")
:file-name "lisplogo_alien_256.nng")

;; or
(setf (picture-url object) "http://www.lisperati.com/lisplogo_alien_256.png")
(attach-image object))
“‘

## attach-image with resize

If you add ‘:width‘ and ‘:height‘, ‘attach-image‘ resize image with ‘opticl:fit-image-into‘.

“‘Lisp
(setup-clipper :store-type :local
:image-directory #P"/home/cl-user/common-lisp/clipper/images/"
:relative #P"/home/cl-user/common-lisp/clipper/"
:prefix "http://localhost:3000/"
:clipper-class (find-class ’picture)
:format ":ID/:FILE-NAME.:EXTENSION"
:width 200
:height 200)
“‘

## See Also

- [Integral](https://github.com/fukamachi/integral) - Object relational mapper for Common Lisp
- [opticl](https://github.com/slyrus/opticl) - A library for representing and processing images in Common Lisp

## Author

* Rudolph-Miller (chopsticks.tk.ppfm@gmail.com)

## Copyright

Copyright (c) 2015 Rudolph-Miller (chopsticks.tk.ppfm@gmail.com)

Version

0.1

Dependencies
Source

clipper.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 clipper/src

Parent

clipper (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 clipper.asd

Location

clipper.asd

Systems

clipper (system)

Packages

clipper-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 clipper/src/clipper.lisp

Dependencies
Parent

src (module)

Location

src/clipper.lisp

Packages

clipper

Exported Definitions

image-url (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 clipper/src/database.lisp

Dependencies
Parent

src (module)

Location

src/database.lisp

Packages

clipper.database

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 clipper/src/image.lisp

Dependency

database.lisp (file)

Parent

src (module)

Location

src/image.lisp

Packages

clipper.image

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 clipper/src/s3.lisp

Dependencies
Parent

src (module)

Location

src/s3.lisp

Packages

clipper.s3

Exported Definitions
Internal Definitions

environment-credentials (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 clipper/src/local.lisp

Dependencies
Parent

src (module)

Location

src/local.lisp

Packages

clipper.local

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 clipper/src/config.lisp

Dependency

error.lisp (file)

Parent

src (module)

Location

src/config.lisp

Packages

clipper.config

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 clipper/src/format.lisp

Dependency

database.lisp (file)

Parent

src (module)

Location

src/format.lisp

Packages

clipper.format

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.9 clipper/src/error.lisp

Parent

src (module)

Location

src/error.lisp

Packages

clipper.error

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 clipper-asd

Source

clipper.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 clipper

Source

clipper.lisp (file)

Use List
Exported Definitions

image-url (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.3 clipper.database

Source

database.lisp (file)

Use List
Used By List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.4 clipper.image

Source

image.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.5 clipper.s3

Source

s3.lisp (file)

Use List
Exported Definitions

upload (function)

Internal Definitions

environment-credentials (class)


Next: , Previous: , Up: Packages   [Contents][Index]

5.6 clipper.local

Source

local.lisp (file)

Use List
Exported Definitions

image-pathname (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.7 clipper.config

Source

config.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.8 clipper.format

Source

format.lisp (file)

Use List
Used By List
Exported Definitions

Previous: , Up: Packages   [Contents][Index]

5.9 clipper.error

Source

error.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *clipper-config*

Global variable for config object.

Package

clipper.config

Source

config.lisp (file)

Special Variable: *format-keys*

List of functions used for #’store-format.

Package

clipper.format

Source

format.lisp (file)

Special Variable: *supported-content-types*
Package

clipper.image

Source

image.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: clip-extension CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-id CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-image-content-type CLIP
Function: (setf clip-image-content-type) IMAGE-CONTENT-TYPE CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-image-file-name CLIP
Function: (setf clip-image-file-name) IMAGE-FILE-NAME CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-image-file-name-without-extension CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-image-file-size CLIP
Function: (setf clip-image-file-size) IMAGE-FILE-SIZE CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clip-url CLIP
Function: (setf clip-url) URL CLIP
Package

clipper.database

Source

database.lisp (file)

Function: clipper-config-aws-access-key INSTANCE
Function: (setf clipper-config-aws-access-key) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-aws-secret-key INSTANCE
Function: (setf clipper-config-aws-secret-key) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-clipper-class INSTANCE
Function: (setf clipper-config-clipper-class) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-format INSTANCE
Function: (setf clipper-config-format) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-height INSTANCE
Function: (setf clipper-config-height) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-id-slot INSTANCE
Function: (setf clipper-config-id-slot) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-image-content-type-slot INSTANCE
Function: (setf clipper-config-image-content-type-slot) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-image-directory INSTANCE
Function: (setf clipper-config-image-directory) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-image-file-name-slot INSTANCE
Function: (setf clipper-config-image-file-name-slot) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-image-file-size-slot INSTANCE
Function: (setf clipper-config-image-file-size-slot) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-prefix INSTANCE
Function: (setf clipper-config-prefix) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-relative INSTANCE
Function: (setf clipper-config-relative) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-s3-bucket-name INSTANCE
Function: (setf clipper-config-s3-bucket-name) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-s3-endpoint INSTANCE
Function: (setf clipper-config-s3-endpoint) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-store-type INSTANCE
Function: (setf clipper-config-store-type) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-url-slot INSTANCE
Function: (setf clipper-config-url-slot) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: clipper-config-width INSTANCE
Function: (setf clipper-config-width) VALUE INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: convert-image IMAGE-VEC TYPE
Package

clipper.image

Source

image.lisp (file)

Function: get-extension FILE-NAME
Package

clipper.database

Source

database.lisp (file)

Function: image-pathname OBJECT
Package

clipper.local

Source

local.lisp (file)

Function: image-url OBJECT

Return URL for object.

Package

clipper

Source

clipper.lisp (file)

Function: read-image-to-vector INPUT
Package

clipper.image

Source

image.lisp (file)

Function: setup-clipper &rest INITARGS &key STORE-TYPE IMAGE-DIRECTORY RELATIVE PREFIX AWS-ACCESS-KEY AWS-SECRET-KEY S3-ENDPOINT S3-BUCKET-NAME CLIPPER-CLASS ID-SLOT URL-SLOT IMAGE-FILE-NAME-SLOT IMAGE-CONTENT-TYPE-SLOT IMAGE-FILE-SIZE-SLOT FORMAT WIDTH HEIGHT

Setup clipper. You must call this before use clipper.

Package

clipper.config

Source

config.lisp (file)

Function: store-format OBJECT

Return formatted id of object.

Package

clipper.format

Source

format.lisp (file)

Function: upload OBJECT KEY
Package

clipper.s3

Source

s3.lisp (file)

Function: write-image-to-out IMAGE OUT
Package

clipper.image

Source

image.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: attach-image OBJECT &key URL IMAGE PATH-NAME FILE-NAME

Attach the image to the object.

Package

clipper.image

Source

image.lisp (file)

Methods
Method: attach-image OBJECT &key URL IMAGE PATH-NAME FILE-NAME around
Method: attach-image OBJECT &key URL IMAGE PATH-NAME FILE-NAME
Generic Function: retrieve-url OBJECT TYPE
Package

clipper.format

Source

format.lisp (file)

Methods
Method: retrieve-url OBJECT (TYPE (eql local))
Source

local.lisp (file)

Method: retrieve-url OBJECT (TYPE (eql s3))
Source

s3.lisp (file)

Generic Function: store-image OBJECT IMAGE TYPE
Package

clipper.image

Source

image.lisp (file)

Methods
Method: store-image OBJECT IMAGE (TYPE (eql local))
Source

local.lisp (file)

Method: store-image OBJECT IMAGE (TYPE (eql s3))
Source

s3.lisp (file)

Method: store-image OBJECT IMAGE TYPE around
Method: store-image OBJECT IMAGE TYPE

Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Conditions

Condition: <clipper-error> ()

Base error condition.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

simple-error (condition)

Direct subclasses
Condition: <clipper-image-type-error> ()

Image type error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct slots
Slot: type

Type slot.

Initargs

:type

Condition: <clipper-incomplete-config> ()

Incomplete config error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct subclasses
Direct slots
Slot: slot-list

Invalid slot list slot.

Initargs

:slot-list

Condition: <clipper-incomplete-for-attach-image> ()

Incomplete for attach-image.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct slots
Slot: type

Type slot.

Initargs

:type

Slot: args

Args slot.

Initargs

:args

Condition: <clipper-incomplete-local-config> ()

Incomplete local config error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-incomplete-config> (condition)

Condition: <clipper-incomplete-s3-config> ()

Incomplete S3 config error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-incomplete-config> (condition)

Condition: <clipper-invalid-store-type> ()

Invalid stare type error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct slots
Slot: type

Type slot.

Initargs

:type

Condition: <clipper-no-source-specified> ()

No source specified error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct slots
Slot: object

Object slot.

Initargs

:object

Condition: <clipper-unsupported-content-type> ()

Unsupported content type error.

Package

clipper.error

Source

error.lisp (file)

Direct superclasses

<clipper-error> (condition)

Direct slots
Slot: content-type

Content type slot.

Initargs

:content-type


Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Structures

Structure: clipper-config ()
Package

clipper.config

Source

config.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: store-type
Readers

clipper-config-store-type (function)

Writers

(setf clipper-config-store-type) (function)

Slot: image-directory
Readers

clipper-config-image-directory (function)

Writers

(setf clipper-config-image-directory) (function)

Slot: relative
Initform

""

Readers

clipper-config-relative (function)

Writers

(setf clipper-config-relative) (function)

Slot: prefix
Initform

""

Readers

clipper-config-prefix (function)

Writers

(setf clipper-config-prefix) (function)

Slot: aws-access-key
Readers

clipper-config-aws-access-key (function)

Writers

(setf clipper-config-aws-access-key) (function)

Slot: aws-secret-key
Readers

clipper-config-aws-secret-key (function)

Writers

(setf clipper-config-aws-secret-key) (function)

Slot: s3-bucket-name
Readers

clipper-config-s3-bucket-name (function)

Writers

(setf clipper-config-s3-bucket-name) (function)

Slot: s3-endpoint
Readers

clipper-config-s3-endpoint (function)

Writers

(setf clipper-config-s3-endpoint) (function)

Slot: clipper-class
Readers

clipper-config-clipper-class (function)

Writers

(setf clipper-config-clipper-class) (function)

Slot: id-slot
Readers

clipper-config-id-slot (function)

Writers

(setf clipper-config-id-slot) (function)

Slot: url-slot
Readers

clipper-config-url-slot (function)

Writers

(setf clipper-config-url-slot) (function)

Slot: image-file-name-slot
Readers

clipper-config-image-file-name-slot (function)

Writers

(setf clipper-config-image-file-name-slot) (function)

Slot: image-content-type-slot
Readers

clipper-config-image-content-type-slot (function)

Writers

(setf clipper-config-image-content-type-slot) (function)

Slot: image-file-size-slot
Readers

clipper-config-image-file-size-slot (function)

Writers

(setf clipper-config-image-file-size-slot) (function)

Slot: format
Initform

"/:id/:file-name.:extension"

Readers

clipper-config-format (function)

Writers

(setf clipper-config-format) (function)

Slot: width
Readers

clipper-config-width (function)

Writers

(setf clipper-config-width) (function)

Slot: height
Readers

clipper-config-height (function)

Writers

(setf clipper-config-height) (function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *local-requrie-list*
Package

clipper.config

Source

config.lisp (file)

Special Variable: *s3-require-list*
Package

clipper.config

Source

config.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: %attach-image OBJECT IMAGE FILE-NAME CONTENT-TYPE
Package

clipper.image

Source

image.lisp (file)

Function: clipper-config-p OBJECT
Package

clipper.config

Source

config.lisp (file)

Function: complete-slot-of-class INITARGS
Package

clipper.config

Source

config.lisp (file)

Function: copy-clipper-config INSTANCE
Package

clipper.config

Source

config.lisp (file)

Function: extension->type EXTENSION
Package

clipper.image

Source

image.lisp (file)

Function: find-slot-by-the-name CLASS NAME
Package

clipper.config

Source

config.lisp (file)

Function: make-clipper-config &key (STORE-TYPE STORE-TYPE) (IMAGE-DIRECTORY IMAGE-DIRECTORY) (RELATIVE RELATIVE) (PREFIX PREFIX) (AWS-ACCESS-KEY AWS-ACCESS-KEY) (AWS-SECRET-KEY AWS-SECRET-KEY) (S3-BUCKET-NAME S3-BUCKET-NAME) (S3-ENDPOINT S3-ENDPOINT) (CLIPPER-CLASS CLIPPER-CLASS) (ID-SLOT ID-SLOT) (URL-SLOT URL-SLOT) (IMAGE-FILE-NAME-SLOT IMAGE-FILE-NAME-SLOT) (IMAGE-CONTENT-TYPE-SLOT IMAGE-CONTENT-TYPE-SLOT) (IMAGE-FILE-SIZE-SLOT IMAGE-FILE-SIZE-SLOT) (FORMAT FORMAT) (WIDTH WIDTH) (HEIGHT HEIGHT)
Package

clipper.config

Source

config.lisp (file)

Function: temporary-file-template TYPE
Package

clipper.image

Source

image.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Classes

Class: environment-credentials ()
Package

clipper.s3

Source

s3.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • secret-key (method)
  • access-key (method)

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clipper.asd: The clipper<dot>asd file
clipper/src: The clipper/src module
clipper/src/clipper.lisp: The clipper/src/clipper<dot>lisp file
clipper/src/config.lisp: The clipper/src/config<dot>lisp file
clipper/src/database.lisp: The clipper/src/database<dot>lisp file
clipper/src/error.lisp: The clipper/src/error<dot>lisp file
clipper/src/format.lisp: The clipper/src/format<dot>lisp file
clipper/src/image.lisp: The clipper/src/image<dot>lisp file
clipper/src/local.lisp: The clipper/src/local<dot>lisp file
clipper/src/s3.lisp: The clipper/src/s3<dot>lisp file

F
File, Lisp, clipper.asd: The clipper<dot>asd file
File, Lisp, clipper/src/clipper.lisp: The clipper/src/clipper<dot>lisp file
File, Lisp, clipper/src/config.lisp: The clipper/src/config<dot>lisp file
File, Lisp, clipper/src/database.lisp: The clipper/src/database<dot>lisp file
File, Lisp, clipper/src/error.lisp: The clipper/src/error<dot>lisp file
File, Lisp, clipper/src/format.lisp: The clipper/src/format<dot>lisp file
File, Lisp, clipper/src/image.lisp: The clipper/src/image<dot>lisp file
File, Lisp, clipper/src/local.lisp: The clipper/src/local<dot>lisp file
File, Lisp, clipper/src/s3.lisp: The clipper/src/s3<dot>lisp file

L
Lisp File, clipper.asd: The clipper<dot>asd file
Lisp File, clipper/src/clipper.lisp: The clipper/src/clipper<dot>lisp file
Lisp File, clipper/src/config.lisp: The clipper/src/config<dot>lisp file
Lisp File, clipper/src/database.lisp: The clipper/src/database<dot>lisp file
Lisp File, clipper/src/error.lisp: The clipper/src/error<dot>lisp file
Lisp File, clipper/src/format.lisp: The clipper/src/format<dot>lisp file
Lisp File, clipper/src/image.lisp: The clipper/src/image<dot>lisp file
Lisp File, clipper/src/local.lisp: The clipper/src/local<dot>lisp file
Lisp File, clipper/src/s3.lisp: The clipper/src/s3<dot>lisp file

M
Module, clipper/src: The clipper/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   C   E   F   G   I   M   R   S   T   U   W  
Index Entry  Section

%
%attach-image: Internal functions

(
(setf clip-image-content-type): Exported functions
(setf clip-image-file-name): Exported functions
(setf clip-image-file-size): Exported functions
(setf clip-url): Exported functions
(setf clipper-config-aws-access-key): Exported functions
(setf clipper-config-aws-secret-key): Exported functions
(setf clipper-config-clipper-class): Exported functions
(setf clipper-config-format): Exported functions
(setf clipper-config-height): Exported functions
(setf clipper-config-id-slot): Exported functions
(setf clipper-config-image-content-type-slot): Exported functions
(setf clipper-config-image-directory): Exported functions
(setf clipper-config-image-file-name-slot): Exported functions
(setf clipper-config-image-file-size-slot): Exported functions
(setf clipper-config-prefix): Exported functions
(setf clipper-config-relative): Exported functions
(setf clipper-config-s3-bucket-name): Exported functions
(setf clipper-config-s3-endpoint): Exported functions
(setf clipper-config-store-type): Exported functions
(setf clipper-config-url-slot): Exported functions
(setf clipper-config-width): Exported functions

A
attach-image: Exported generic functions
attach-image: Exported generic functions
attach-image: Exported generic functions

C
clip-extension: Exported functions
clip-id: Exported functions
clip-image-content-type: Exported functions
clip-image-file-name: Exported functions
clip-image-file-name-without-extension: Exported functions
clip-image-file-size: Exported functions
clip-url: Exported functions
clipper-config-aws-access-key: Exported functions
clipper-config-aws-secret-key: Exported functions
clipper-config-clipper-class: Exported functions
clipper-config-format: Exported functions
clipper-config-height: Exported functions
clipper-config-id-slot: Exported functions
clipper-config-image-content-type-slot: Exported functions
clipper-config-image-directory: Exported functions
clipper-config-image-file-name-slot: Exported functions
clipper-config-image-file-size-slot: Exported functions
clipper-config-p: Internal functions
clipper-config-prefix: Exported functions
clipper-config-relative: Exported functions
clipper-config-s3-bucket-name: Exported functions
clipper-config-s3-endpoint: Exported functions
clipper-config-store-type: Exported functions
clipper-config-url-slot: Exported functions
clipper-config-width: Exported functions
complete-slot-of-class: Internal functions
convert-image: Exported functions
copy-clipper-config: Internal functions

E
extension->type: Internal functions

F
find-slot-by-the-name: Internal functions
Function, %attach-image: Internal functions
Function, (setf clip-image-content-type): Exported functions
Function, (setf clip-image-file-name): Exported functions
Function, (setf clip-image-file-size): Exported functions
Function, (setf clip-url): Exported functions
Function, (setf clipper-config-aws-access-key): Exported functions
Function, (setf clipper-config-aws-secret-key): Exported functions
Function, (setf clipper-config-clipper-class): Exported functions
Function, (setf clipper-config-format): Exported functions
Function, (setf clipper-config-height): Exported functions
Function, (setf clipper-config-id-slot): Exported functions
Function, (setf clipper-config-image-content-type-slot): Exported functions
Function, (setf clipper-config-image-directory): Exported functions
Function, (setf clipper-config-image-file-name-slot): Exported functions
Function, (setf clipper-config-image-file-size-slot): Exported functions
Function, (setf clipper-config-prefix): Exported functions
Function, (setf clipper-config-relative): Exported functions
Function, (setf clipper-config-s3-bucket-name): Exported functions
Function, (setf clipper-config-s3-endpoint): Exported functions
Function, (setf clipper-config-store-type): Exported functions
Function, (setf clipper-config-url-slot): Exported functions
Function, (setf clipper-config-width): Exported functions
Function, clip-extension: Exported functions
Function, clip-id: Exported functions
Function, clip-image-content-type: Exported functions
Function, clip-image-file-name: Exported functions
Function, clip-image-file-name-without-extension: Exported functions
Function, clip-image-file-size: Exported functions
Function, clip-url: Exported functions
Function, clipper-config-aws-access-key: Exported functions
Function, clipper-config-aws-secret-key: Exported functions
Function, clipper-config-clipper-class: Exported functions
Function, clipper-config-format: Exported functions
Function, clipper-config-height: Exported functions
Function, clipper-config-id-slot: Exported functions
Function, clipper-config-image-content-type-slot: Exported functions
Function, clipper-config-image-directory: Exported functions
Function, clipper-config-image-file-name-slot: Exported functions
Function, clipper-config-image-file-size-slot: Exported functions
Function, clipper-config-p: Internal functions
Function, clipper-config-prefix: Exported functions
Function, clipper-config-relative: Exported functions
Function, clipper-config-s3-bucket-name: Exported functions
Function, clipper-config-s3-endpoint: Exported functions
Function, clipper-config-store-type: Exported functions
Function, clipper-config-url-slot: Exported functions
Function, clipper-config-width: Exported functions
Function, complete-slot-of-class: Internal functions
Function, convert-image: Exported functions
Function, copy-clipper-config: Internal functions
Function, extension->type: Internal functions
Function, find-slot-by-the-name: Internal functions
Function, get-extension: Exported functions
Function, image-pathname: Exported functions
Function, image-url: Exported functions
Function, make-clipper-config: Internal functions
Function, read-image-to-vector: Exported functions
Function, setup-clipper: Exported functions
Function, store-format: Exported functions
Function, temporary-file-template: Internal functions
Function, upload: Exported functions
Function, write-image-to-out: Exported functions

G
Generic Function, attach-image: Exported generic functions
Generic Function, retrieve-url: Exported generic functions
Generic Function, store-image: Exported generic functions
get-extension: Exported functions

I
image-pathname: Exported functions
image-url: Exported functions

M
make-clipper-config: Internal functions
Method, attach-image: Exported generic functions
Method, attach-image: Exported generic functions
Method, retrieve-url: Exported generic functions
Method, retrieve-url: Exported generic functions
Method, store-image: Exported generic functions
Method, store-image: Exported generic functions
Method, store-image: Exported generic functions
Method, store-image: Exported generic functions

R
read-image-to-vector: Exported functions
retrieve-url: Exported generic functions
retrieve-url: Exported generic functions
retrieve-url: Exported generic functions

S
setup-clipper: Exported functions
store-format: Exported functions
store-image: Exported generic functions
store-image: Exported generic functions
store-image: Exported generic functions
store-image: Exported generic functions
store-image: Exported generic functions

T
temporary-file-template: Internal functions

U
upload: Exported functions

W
write-image-to-out: Exported functions

Jump to:   %   (  
A   C   E   F   G   I   M   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   F   H   I   O   P   R   S   T   U   W  
Index Entry  Section

*
*clipper-config*: Exported special variables
*format-keys*: Exported special variables
*local-requrie-list*: Internal special variables
*s3-require-list*: Internal special variables
*supported-content-types*: Exported special variables

A
args: Exported conditions
aws-access-key: Exported structures
aws-secret-key: Exported structures

C
clipper-class: Exported structures
content-type: Exported conditions

F
format: Exported structures

H
height: Exported structures

I
id-slot: Exported structures
image-content-type-slot: Exported structures
image-directory: Exported structures
image-file-name-slot: Exported structures
image-file-size-slot: Exported structures

O
object: Exported conditions

P
prefix: Exported structures

R
relative: Exported structures

S
s3-bucket-name: Exported structures
s3-endpoint: Exported structures
Slot, args: Exported conditions
Slot, aws-access-key: Exported structures
Slot, aws-secret-key: Exported structures
Slot, clipper-class: Exported structures
Slot, content-type: Exported conditions
Slot, format: Exported structures
Slot, height: Exported structures
Slot, id-slot: Exported structures
Slot, image-content-type-slot: Exported structures
Slot, image-directory: Exported structures
Slot, image-file-name-slot: Exported structures
Slot, image-file-size-slot: Exported structures
Slot, object: Exported conditions
Slot, prefix: Exported structures
Slot, relative: Exported structures
Slot, s3-bucket-name: Exported structures
Slot, s3-endpoint: Exported structures
Slot, slot-list: Exported conditions
Slot, store-type: Exported structures
Slot, type: Exported conditions
Slot, type: Exported conditions
Slot, type: Exported conditions
Slot, url-slot: Exported structures
Slot, width: Exported structures
slot-list: Exported conditions
Special Variable, *clipper-config*: Exported special variables
Special Variable, *format-keys*: Exported special variables
Special Variable, *local-requrie-list*: Internal special variables
Special Variable, *s3-require-list*: Internal special variables
Special Variable, *supported-content-types*: Exported special variables
store-type: Exported structures

T
type: Exported conditions
type: Exported conditions
type: Exported conditions

U
url-slot: Exported structures

W
width: Exported structures

Jump to:   *  
A   C   F   H   I   O   P   R   S   T   U   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   <  
C   E   P   S  
Index Entry  Section

<
<clipper-error>: Exported conditions
<clipper-image-type-error>: Exported conditions
<clipper-incomplete-config>: Exported conditions
<clipper-incomplete-for-attach-image>: Exported conditions
<clipper-incomplete-local-config>: Exported conditions
<clipper-incomplete-s3-config>: Exported conditions
<clipper-invalid-store-type>: Exported conditions
<clipper-no-source-specified>: Exported conditions
<clipper-unsupported-content-type>: Exported conditions

C
Class, environment-credentials: Internal classes
clipper: The clipper system
clipper: The clipper package
clipper-asd: The clipper-asd package
clipper-config: Exported structures
clipper.config: The clipper<dot>config package
clipper.database: The clipper<dot>database package
clipper.error: The clipper<dot>error package
clipper.format: The clipper<dot>format package
clipper.image: The clipper<dot>image package
clipper.local: The clipper<dot>local package
clipper.s3: The clipper<dot>s3 package
Condition, <clipper-error>: Exported conditions
Condition, <clipper-image-type-error>: Exported conditions
Condition, <clipper-incomplete-config>: Exported conditions
Condition, <clipper-incomplete-for-attach-image>: Exported conditions
Condition, <clipper-incomplete-local-config>: Exported conditions
Condition, <clipper-incomplete-s3-config>: Exported conditions
Condition, <clipper-invalid-store-type>: Exported conditions
Condition, <clipper-no-source-specified>: Exported conditions
Condition, <clipper-unsupported-content-type>: Exported conditions

E
environment-credentials: Internal classes

P
Package, clipper: The clipper package
Package, clipper-asd: The clipper-asd package
Package, clipper.config: The clipper<dot>config package
Package, clipper.database: The clipper<dot>database package
Package, clipper.error: The clipper<dot>error package
Package, clipper.format: The clipper<dot>format package
Package, clipper.image: The clipper<dot>image package
Package, clipper.local: The clipper<dot>local package
Package, clipper.s3: The clipper<dot>s3 package

S
Structure, clipper-config: Exported structures
System, clipper: The clipper system

Jump to:   <  
C   E   P   S