add support for OpenID, prepare 0.2.0 v0.2.0
authorChristian Weiske <cweiske@cweiske.de>
Mon, 27 Aug 2012 05:48:01 +0000 (07:48 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 27 Aug 2012 05:48:01 +0000 (07:48 +0200)
ChangeLog
README.rst
build.xml
surrogator.php

index cffcc6f31151b8120c39d26769f4945849f68ca4..ec4443d72d7e8c9f8f77e4e6f513833c8ca38249 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-27  Christian Weiske  <cweiske@bogo>
+
+       * Add support for OpenIDs
+       * Version 0.2.0
+
 2012-08-17  Christian Weiske  <cweiske@cweiske.de>
 
        * Version 0.1.0
index 64677b03f198728db89dacf3feee55567f85fdb2..1e6f73c5fedf890a8431f087372369d98ba6486d 100644 (file)
@@ -6,7 +6,7 @@ Simple open source Libravatar__ compatible avatar image server written in PHP.
 
 Features:
 
-- Delivers images for email addresses
+- Delivers images for email addresses and OpenIDs
 - Very easy to setup.
 - No graphics processing is done on the server, keeping the CPU load low.
   All avatar images get pre-generated for a set of sizes
@@ -55,6 +55,12 @@ Usage
    Name has to be email address + image file extension, for example
    ``foo@example.org.png``.
    Surrogator supports ``.png`` and ``.jpg``.
+
+   For OpenIDs, use the url-encoded URL + extension as filename, for example
+   replace ``/`` with ``%2F``.
+   The filename for ``http://example.org/~foo`` would be
+   ``http:%2F%2Fexample.org%2F~foo.jpg``.
+
 2. Run ``php surrogator.php``.
    The small files get generated.
 3. You will get more information with ``-v``
index 6bcd68ae6e597cf5c680ea47d6102e91efe5ad02..5b1d7361f1a8d490593c7ce8d5737361c17a3ddf 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -8,8 +8,8 @@
   -->
   <property file="build.properties" />
 
-  <property name="version-m"  value="0.1" />
-  <property name="version"    value="0.1.0" />
+  <property name="version-m"  value="0.2" />
+  <property name="version"    value="0.2.0" />
   <property name="stability"  value="alpha" />
   <property name="zipfile"     value="${phing.project.name}-${version}.tar.bz2" />
   <property name="distfile"    value="dist/${zipfile}" />
index fdbd38412aa983e06eb9aee4453793b438a18808..f418750c28de5027cf571d3b53ae0172da11791c 100755 (executable)
@@ -202,6 +202,9 @@ foreach ($fileInfos as $fileInfo) {
  */
 function getHashes($fileName)
 {
+    //OpenIDs have their slashes "/" url-encoded
+    $fileName = rawurldecode($fileName);
+
     $fileNameNoExt = substr($fileName, 0, -strlen(strrpos($fileName, '.')) - 2);
     $emailAddress  = trim(strtolower($fileNameNoExt));