Commits

Yuri Bochkarev  committed c520b87

* switched to A.B.C.D versioning policy
* updated README.md

  • Participants
  • Parent commits 071a348

Comments (0)

Files changed (5)

-2011-09-07 (v. 0.2.0) Yuri Bochkarev  <baltazar.bz@gmail.com>
+2011-09-07 (v. 0.1.0.0) Yuri Bochkarev  <baltazar.bz@gmail.com>
     + added config files
     + radikal, rghost auth info is read from config file
+    + added imm.io support
+
-## Overview
+### Overview
 
 imagepaste is a command-line utility on Haskell for sending images to image-hosting sites.
 
-## Features
+### Features
 
 imagepaste supports image pasting sites as follows:
 
 * ompldr.org
 * imp.flashtux.org
 * imagebin.com
+* imm.io
 
-## Building
+### Building
 
 Building is quite simple. You will need ghc and cabal to build imagepaste.
 Also, make sure you already have cabal database:
     $ cd imagepaste
     $ cabal install
 
-## About
+### Using
+
+The only required argument is file name:
+
+    $ imp path/to/image.jpg
+
+The program will print image link upon successful paste. You can
+also explicitly specify engine name:
+
+    $ imp rg path/to/image.jpg
+
+Engine name can be incomplete but must not be ambiguous:
+
+    $ imp im image.jpg 
+    error: ambiguous engine name. can be: imagebin, imm
+
+### Configuration
+
+`engine_auth` - authentication info for engines. Specify your
+name and password for the account here.
+
+`try_next_engine_on_error` - tells the program to try all engines if
+paste fails. Note that this option does not work if you specify
+engine name explicitly: only required engine will be tried.
+
+`engine_priority` - change default internal engine priority.
+You can write here you favourite engine first so it will always
+be tried before others.
+
+`file_type_mapping` - map file type to engine. Some engines allow
+to paste not only image files but archives, mp3s and other files too.
+With this option you can assign specific engine to file type.
+
+Sample configuration:
+
+    {
+      "engine_auth": [{"engine": "rghost",
+                       "username": "Peter",
+                       "password": "D83FJ9z"},
+
+                      {"engine": "ipicture",
+                       "username": "Peter",
+                       "password": "D9$ffoo"},
+
+                      {"engine": "radikal",
+                       "username": "PeterP",
+                       "password": "f$90A_V38$"}
+                     ],
+
+      "try_next_engine_on_error": true,
+
+      "engine_priority": ["imagebin", "flashtux", "rghost"],
+
+      "file_type_mapping": [{"engine": "rghost",
+                             "types": [".mp3", ".ogg"]},
+
+                            {"engine": "ompldr",
+                             "types": [".rar", ".zip", ".tar.gz"]},
+
+                            {"engine": "fastpic",
+                             "types": [".jpg", ".png"]}
+                           ]
+    }
+
+### About
 
 (c) 2010, 2011 Yuri Bochkarev
 

File imagepaste.cabal

 -- The package version. See the Haskell package versioning policy
 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
 -- standards guiding when and how versions should be incremented.
-Version:             0.1.0
+Version:             0.2.0.0
 
 -- A short (one-line) description of the package.
 Synopsis:            Command-line image paste utility
   Main-is:             Main.hs
   
   -- Packages needed in order to build this package.
-  Build-depends:       base, containers, network,
-                       mtl, transformers, haskell98,
-                       regex-posix, tagsoup, HTTP, json
+  Build-depends:       base,
+                       containers,
+                       network,
+                       mtl,
+                       transformers,
+                       haskell98,
+
+                       regex-posix,
+                       tagsoup,
+                       HTTP,
+                       json
   
   hs-source-dirs:      src
 

File notes/features.txt

 [+] small fixes
     [+] convert filename to short name if necessary
         file name is always converted to short
+    [_] fix engine name detection: it should filter all engines
+        which *start* with given name. it filters all which
+        *contain* the name now
 
 [+] testing
     [+] add automated engine tests (use HUnit to test impure code)
     [_] insert changeset to Version.hs automatically on project build
         consider: $ hg id -i
 
+[_] versioning policy: http://www.haskell.org/haskellwiki/Package_versioning_policy
+    the project uses four digit versioing policy: A.B.C.D
+    A - branch number, increase upon huge architectural changes or
+        next stable release with lots of features
+    B - major number, increase upon API change (see PvP)
+    C - minor number, increase upon class, type, binding, module addition (see PvP)
+    D - bugfix number. increase upon fixing a bug. each bugfix may contain
+        fixes for several bugs, not just one
+ 

File src/Version.hs

 
 -- | Version
 
-version = "0.2.0-alpha"
+version = "0.2.0.0-alpha"
 changeset = "76a1f42e28a4+"