summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-04-22Use new glib threading APITomas Bzatek2-1/+7
The gthread library has been merged in glib and the threading API has changed a little. Since changes are negligible, there's no point of losing support of older glib releases, thus make it conditional.
2013-04-09Modernize configure.acTomas Bzatek1-1/+1
https://live.gnome.org/GnomeGoals/ModernAutotools Big thanks to Pavel Raiskup for autoconf hints
2013-04-07Remove unnecessary bitshifting for enum membersTomas Bzatek1-6/+6
2013-04-07Add ability to specify thumbnail square crop hintTomas Bzatek5-17/+92
In simple crop square mode it's sometimes viable to specify position of the square. This is vastly useful for portrait pictures so that you don't crop the head off the body.
2013-04-07Set squared thumbnail crop amount to 0Tomas Bzatek1-1/+1
The 5 percent value (from each side) wasn't really doing any good... Let me know if you actually liked it.
2013-04-07Use rel="home" for links pointing to gallery rootTomas Bzatek1-2/+2
Hopefully some browsers would understand that. http://microformats.org/wiki/existing-rel-values
2013-04-07Tweak commandline arguments descriptionTomas Bzatek1-3/+3
Be more illustrative by highlighting the arguments.
2013-04-07Strip unused template tags by defaultTomas Bzatek5-1/+27
If there's a tag defined but not used on replace table processing, this option determines whether it should be written in the generated file or ignored completely. Turned on by default, this will save a few bytes. Use commandline option '--debug-dont-strip-unused-tags' to turn it off, e.g. when debugging template files.
2013-03-17Autodetect number of threadsTomas Bzatek1-2/+22
When number of jobs is not specified, use autodetection of number of processors available in the system. This requires glib-2.35.4, checked during configure. https://bugzilla.gnome.org/show_bug.cgi?id=614930 https://bugzilla.gnome.org/show_bug.cgi?id=687223
2013-03-17Dup exiv2 strings immediatelyTomas Bzatek1-8/+15
Weird things happened to me in the past while debugging, it's like the lifetime of returned const strings is unknown and we can't really rely on them, so let's duplicate them immediately. This will not however fully solve the issue but rather minimizes the risk. Need to investigate what's going on, don't really want to start using mutexes to ensure full thread safety. Moreover we have separate objects in each thread.
2013-03-17Support Iptc.Application2.Digitization{Date,Time} for time shifting and fakingTomas Bzatek1-17/+25
Turned out these two keys are commonly used as well.
2013-03-17Use reentrant versions of datetime functions for thread safetyTomas Bzatek1-27/+30
2013-03-16Strip XMP metadata by defaultTomas Bzatek5-3/+16
Some RAW editors like Adobe products like to include XMP data. Let's strip them all off (unless disabled).
2013-03-16Add support for writing external EXIF metadata back to imagesTomas Bzatek5-2/+26
Turned off by default, this will copy all data from supplied external EXIF metadata file back to all generated image files. All user overrides are still applied on top of it. Another reason for turning this off is file size concern, target image files would carry a lot more information that may not be always needed and would increase total amount of data transferred.
2013-03-16Support IPTC timestamps when shifting or fakingTomas Bzatek1-19/+99
There are more date-related IPTC tags in the specs but so far I haven't seen anything else than Iptc.Application2.{Date,Time}Created
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.