summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-03-10Add support for specifying custom dateTomas Bzatek5-35/+135
This essentially means faking the datetime, e.g. when you want to mask original picture date. This commit also changes little bit of datetime conversion, hopefully fixing DST issues. Needs more testing.
2013-03-10Add support for datetime/timezone shiftTomas Bzatek5-36/+215
Simple datetime shift, including EXIF data modification.
2013-02-10Show note for password protected albums on index pagesTomas Bzatek1-0/+1
Also adds IS_PROTECTED define in local item scope.
2013-02-10generators: Process image blocks through local block parsersTomas Bzatek3-44/+42
This change allows using local defines related to each item in the album or index page.
2013-02-10block-parser: Don't process conditionals when retrieving block dataTomas Bzatek1-4/+20
This allows us to retrieve unmodified block data that could be used for conditional processing later.
2013-02-10Support theme-defined thumbnail for protected albumsTomas Bzatek5-35/+102
2012-12-31atom-writer: Check fclose() resultTomas Bzatek1-1/+2
Errors may very well appear on file closing. TODO: Go through all other file writes and add more checks.
2012-12-31Add support for password protected albumsTomas Bzatek5-0/+140
This adds support for simple password protected areas (albums and all subalbums) through webserver HTTP authentication. CGG simply generates .htaccess and password files and it's up to the user to set up the rest on server side. No UI changes at this point. Limited to one user per album for the moment.
2012-12-30setup: Introduce location section and reorganizeTomas Bzatek4-7/+14
More and more we need to know local and public locations for various features. Let's introduce general keys once and for all.
2012-12-27jpeg-utils: Tidy up get_exif_data_fixed() a bitTomas Bzatek1-26/+17
And change g_str_has_prefix() for key name comparison to g_str_equal() to prevent potential prefix clashes.
2012-12-27jpeg-utils: Use Exiv2::Exifdatum.count() for key presence testTomas Bzatek1-6/+2
2012-12-27Add support for EXIF Canon Camera temperatureTomas Bzatek2-0/+41
For the moment we're using Exif.CanonSi.0x000c key from Exiv2 namespace since it's an unknown tag to it. This may need little tweaking in the future when proper naming becomes upstream.
2012-12-27Support external EXIF metadataTomas Bzatek4-3/+31
This brings an ability to specify external file to read EXIF/IPTC data from. The motivation was to work around RAW editors randomly stripping some EXIF blocks.
2012-12-25cgg-dirgen: Fix some bashismsTomas Bzatek1-3/+3
2012-12-24Add has_exif_key() block functionTomas Bzatek1-0/+13
Simple check whether the EXIF/IPTC key is available for the current image. Precisely one argument is required, similar to the get_exif_value() custom function, an Exiv2 metadata attribute string is expected. This allows templates to change behaviour when certain metadata key is not present (e.g. don't print the particular table line at all).
2012-12-24block-parser: Relaxed endif()/else() syntax for custom block functionsTomas Bzatek1-4/+30
Specifying all arguments in endif() or else() for custom block functions reduces code readability and debugging comfort. Let's be less strict and don't require them. A simple test for function name should be enough, moreover nesting is not limited by this change at all.
2012-12-24block-parser: Add support for custom block functionsTomas Bzatek4-30/+128
Similar to replace-table custom functions, this brings an ability to register custom block functions that can be called from templates with variable arguments. The syntax is as follows: <!-- $(if (function_name(arg1, "arg2", 'arg3'))) --> ... <!-- $(endif (function_name(arg1, "arg2", 'arg3'))) --> An optional exclamation mark before the function name reverts the result (negates) the predicate. This allows template flexibility with respect to the currently processed image.
2012-12-01Use single glib.h includeTomas Bzatek1-1/+0
Please shout if it breaks compilation against older glib versions
2012-04-16block-parser: Allow indented token argumentsTomas Bzatek3-6/+30
Some of us like to have indented arguments from a function name.
2012-04-15Add HAS_EXIF defineTomas Bzatek3-0/+45
This brings a new HAS_EXIF define which is present when EXIF information are available. Templates have been modified to inform user when not available. The test for EXIF metadata presence is fairly basic, we only look for aperture, focal length and exposure time attributes. This might be a subject to change in the future.
2012-04-15Change EXIF metadata handling into a registered functionTomas Bzatek3-233/+216
This allows much greater flexibility from templates regarding EXIF metadata handling, no more hardcoded symbols. It's possible to display essentially any attribute known to Exiv2. Please see http://exiv2.org/metadata.html This brings two new functions that can be called from templates: * get_exif_value (exiv2_attribute) * get_exif_value_fixed (exiv2_attribute) Both functions take a string argument of metadata attribute name from Exiv2 namespace. The difference is that get_exif_value_fixed() does some extra formatting for several basic attributes (e.g. datetime format).
2012-04-15replace-table: Add support for custom functionsTomas Bzatek2-0/+159
This adds a support for custom (registered) functions that can be called from templates with specified arguments. The syntax is as follows: <!-- $(function_name(arg1, "arg2", 'arg3')) --> Arguments are separated by a comma and can be quoted (recommended). Quoted arguments are allowed to contain a comma as well as another quote when escaped with a backslash. To call a function with no arguments just do "function_name()". Functions are supposed to be registered before actual data are parsed and are called back from within the parser cycle.
2011-06-05generators: Actually use preview size when nofullsize is specifiedTomas Bzatek1-23/+30
2011-06-05jpeg-utils: Get rid of static variablesTomas Bzatek1-2/+5
2011-06-04Autorotate images according to EXIF Orientation infoTomas Bzatek5-10/+88
This comes with a cost of decoding full image when only getting image size.
2011-06-04Port fullsize image link to the new defines systemTomas Bzatek1-15/+3
2011-06-04Port Go Up link to the new defines systemTomas Bzatek3-13/+2
2011-06-04Port EXIF table visibility switch to the new defines systemTomas Bzatek3-11/+0
2011-06-04Port border style to the new defines systemTomas Bzatek3-8/+2
This change allows greater flexibility for separate themes.
2011-06-04replace-table: Add forgotten fileTomas Bzatek2-7/+15
And also bring back glib/gprintf.h include for g_vasprintf().
2011-06-04replace-table: Link to defines table instead of copying on creationTomas Bzatek3-51/+76
This allows actual defines to be used without explicit update. Also brings the benefit of placing empty string when define is not defined.
2011-06-04Introduce conditional systemTomas Bzatek9-31/+218
This is very basic scripting support - simple value retrieval and block conditionals. Defines could be either static from theme setup or programatically added during page generation.
2011-05-29setup: Fix wrong access() testTomas Bzatek1-1/+1
2011-05-29Introduce new theming systemTomas Bzatek9-494/+795
This extends current templating system to another dimension, bringing the possibility to have multiple themes generated at once. The purpose is to be able to switch between multiple designs, from PC to mobile, classic vs. flat view, slideshow, etc. For the moment, only the classic theme is available. Rules: * for switching between themes, place a link inside your template manually - it's not a cgg concern, only your theming infrastructure * don't forget to define different file names for index and album pages across different themes * it's recommended to keep default theme named as "index.*" to avoid showing directory listing on webserver Notes: * some TODOs will be fixed when we have new theme using these advanced features (e.g. pictures in album pages) * TODO: introduce tag/block conditional system, allow custom user defines for each theme/page * TODO: deprecate <show_go_up>, <show_exif_table> and <border style> in favor of conditionals (these tags belong to theming)
2011-03-31block-parser: Add function to mark block as usedTomas Bzatek2-0/+24
Some blocks such as "IMG_LIST" are containers themselves and no data are retrieved from them. That way they don't ever get marked as used, resulting in constant hit in the generator loop.
2011-03-26Don't generate thumbnails for hidden itemsTomas Bzatek1-13/+15
2011-03-03Fix atom feed pathsTomas Bzatek4-35/+11
And convert it to use global path info.
2011-01-23Get thumbnail orientation when really neededTomas Bzatek4-35/+24
No need to store generated data during thread work anymore.
2011-01-23Indentation fixesTomas Bzatek5-38/+29
2011-01-23Use g_build_{filename|path} when possibleTomas Bzatek4-38/+39
This has a nice side effect of not having double slashes in paths anymore.
2011-01-23Consolidate paths in a separate structTomas Bzatek7-59/+91
This will allow us to pass detailed path info to worker methods. Each path info instance is bound to a currently processed album and directory. Possibly move to struct TItems in the future.
2010-12-12setup: Code cleanupTomas Bzatek3-22/+26
2010-12-12xml-parser: CleanupTomas Bzatek4-57/+50
2010-12-12Fix leaked structTomas Bzatek1-3/+1
2010-12-12jpeg-utils: Get rid of error handling macrosTomas Bzatek1-91/+79
2010-12-12Get rid of that global variables fearTomas Bzatek1-33/+16
2010-12-12Use g_malloc0()Tomas Bzatek1-3/+2
2010-12-12Fix indentationTomas Bzatek3-4/+4
2010-12-12Cleanup header definesTomas Bzatek11-31/+93
2010-12-12items: CleanupTomas Bzatek3-14/+14