Index: bin/stamps
===================================================================
--- bin/stamps	(revision 32)
+++ bin/stamps	(revision 37)
@@ -23,4 +23,6 @@
     parser.add_argument('-d', '--delete', action="store", type=int,
                         help='Delete up to n recorded stamps')
+    parser.add_argument('-i', '--import', action="store", dest="import_file",
+                        help='Import stamps from the given file')
 
     args = parser.parse_args()
@@ -42,4 +44,6 @@
     elif args.graph:
         s.graph_stamps(args.customer, args.filter)
+    elif args.import_file:
+        s.import_stamps(args.import_file)
     else:
         s.show_stamps(args.customer, args.filter, args.verbose, args.sum)
Index: stamper/stamper.py
===================================================================
--- stamper/stamper.py	(revision 36)
+++ stamper/stamper.py	(revision 37)
@@ -4,7 +4,8 @@
 import pygal
 from datetime import datetime, date, timedelta
-from os.path import expanduser, exists, islink
+from os.path import expanduser, exists, islink, isdir
 from os import symlink, remove
 from collections import OrderedDict
+from operator import itemgetter
 
 
@@ -24,4 +25,24 @@
         self.stamps = []
 
+    def __json_load(self, filename):
+        """
+        Load the stamps from a file in json format, returning
+        the parsed list.
+        """
+        with open(filename, 'r') as stamps_file:
+            try:
+                stamps = json.load(stamps_file)
+            except ValueError:
+                stamps = []
+        return stamps
+
+    def remove_duplicates(self):
+        """
+        Remove duplicated stamps from the stamps list
+        """
+        stamps = [dict(t) for t in set(
+            [tuple(d.items()) for d in self.stamps])]
+        self.stamps = stamps
+
     def ensure_stamps_file(self):
         if not exists(self.stamps_file):
@@ -30,9 +51,11 @@
 
     def load_stamps(self):
-        with open(self.stamps_file, 'r') as stamps_file:
-            try:
-                self.stamps = json.load(stamps_file)
-            except ValueError:
-                self.stamps = []
+        self.stamps = self.__json_load(self.stamps_file)
+
+    def sort_stamps(self):
+        """
+        Sort all the stamps by start and end dates
+        """
+        self.stamps = sorted(self.stamps, key=itemgetter('start', 'end'))
 
     def save_stamps(self):
@@ -346,2 +369,24 @@
                 break
         self.save_stamps()
+
+    def import_stamps(self, filename):
+        """
+        Import the stamps from the given file into the main stamps list,
+        merging them into the list (removing duplicated entries)
+        """
+        if not exists(filename):
+            print('[error] ' + filename + 'does not exist')
+            return
+        if isdir(filename):
+            print('[error] ' + filename + 'is a directory')
+            return
+        stamps = self.__json_load(filename)
+        if not stamps:
+            print('[warning] no stamps can be imported from ' + filename)
+            return
+        self.stamps.extend(stamps)
+        self.remove_duplicates()
+        self.sort_stamps()
+        self.save_stamps()
+        print('[warning] ' + str(len(stamps)) + ' stamps merged')
+        print('[warning] remember to review the resulting stamps file')
