photo(macro)



  1. NAME
    1. SYNOPSIS
      1. DESCRIPTION
        1. How to use
          1. Architecture
            1. Setup
              1. Maintenance
                1. Security
                  1. File permission
                    1. Example
                      1. Juli document case

                    Recent Updates
                    tips
                    2013/10/19
                    juli formatting
                    2012/10/20
                    template(macro)
                    2012/10/20
                    template
                    2012/10/20
                    takahashi_method
                    2012/10/20
                    index
                    2012/10/20
                    i18n
                    2012/10/20
                    wikipedia(macro)
                    2012/06/05
                    jmap(macro)
                    2012/05/23
                    photo(macro)
                    2012/05/15
                    tag(macro)
                    2012/05/15
                    tutorial
                    2012/05/15
                    juli(1)
                    2012/05/15
                    je(1)
                    2012/05/15
                    juli_tb.rb(1)
                    2012/04/12
                    slidy
                    2012/03/23
                    tutorial/minutes_20110117
                    2011/12/08
                    release-note
                    2011/12/08
                    computing
                    2011/12/08


                    index > juli formatting > photo(macro)

                    1. NAME

                    photo - embed photo in juli-wiki-text with minimum maintenance cost

                    2. SYNOPSIS

                    \{photo path}

                    3. DESCRIPTION

                    Juli photo macro is designed to minimize maintenance cost to embed photo in Juli wiki textfile under Unix/Linux environment.

                    This has the following features:

                    1. small photo embed in juli wiki.
                    2. show large photo by clicking the small photo.
                    3. eliminate Exif information
                    4. protect private photo from internet access; only photos called by this macro are allowed public access.
                    5. (TBD) link to Google map by photo's GPS info.

                    3.1. How to use

                    Example:

                    \{photo 2012-04-22/DCIM/101_PANA/P1010441.JPG}
                    
                    When I visited the ruins of Hachioji-Castle in Japan,
                    I saw many beautiful statues of Buddha.
                    Here is one of them.

                    will be:

                    When I visited the ruins of Hachioji-Castle in Japan, I saw many beautiful statue of Buddha. Here is one of them.

                    In general, in Juli wiki text, write as follows:

                    \{photo a/b/c.jpg}

                    Where, a/b/c.jpg is a relative-path of the photo file from 'mount' directory (see 'setup' section below).

                    As you see this example, by clicking this small photo, you can see large photo.

                    These features are done by this macro.


                    3.2. Architecture

                    Following figure shows the architecture of photo macro and the step how it is interpreted by juli.

                    Where,

                    3.3. Setup

                    1. Decide one location of directory of all of your photos on the same file system. We call it 'mount' directory in this macro. Maintenace of the mount directory is up to you. If you have several directories, create one directory, and move the directories under it or symlink to each.
                    2. In .juli/config, setup photo related entries like the followings:
                      photo:
                        mount:        /home/wells/photo
                        small:
                          width:      512
                          style:      '...'
                        large:
                          width:      1024

                    Where, each key means as follows:

                    mount
                    Top directory of photos. It is usually photo master file directory, photo uploade directory, or SD-card back-up directory on your PC. It SHOULD be NON-PUBLIC directory to protect annonymous access from web. It SHOULD NOT be under JULI_REPO because any files except wikipage under JULI_REPO are copied to output_top ( = public). Relative path can be used, which is relative from JULI_REPO, not from .juli/config. Example: /home/wells/photo
                    small
                    small photo related configurations. See below for the detail.
                    small.width
                    Small photo's width you like. Default is 512 pixel.
                    small.style
                    Small photo's style sheet. 'img.juli_photo_small' entry in the doc/.juli/sourceforge.html file (in this package) is one of the example.
                    large
                    large photo related configurations. See below for the detail.
                    large.width
                    Large photo's width you like. Default is 1024 pixel.

                    (Note: there is no large.style configuration now)

                    Please see doc/.juli/config and test/repo/.juli/config in this package for the example.

                    This setup is one-shot task.

                    3.4. Maintenance

                    When you add photo, just sync (by e.g. rsync) your photo SD card and 'mount' directory.

                    3.5. Security

                    1. When you set 'mount', it SHOULD be out-of-url so that any photo under the 'mount' cannot be accessed via internet.
                    2. Only photo referring by this macro can be accessed via internet.

                    3.6. File permission

                    The following permission is required on juli(1):

                    3.7. Example

                    3.7.1. Juli document case

                    This document's \{photo} macro setup is as follows:

                    photo:
                      mount:    ../sample/protected_photo/
                      small:
                        width:  200
                        style:  'float: right'


                    index > juli formatting > photo(macro)


                    Get jj_juli at SourceForge.net. Fast, secure and Free Open Source software downloads | Generated by juli 1.17.01