Wash, trim and dice the aubergines. Put in cold salted water for at least 1 hour. Rinse, pat dry and fry in hot oil, then drain on kitchen paper. Heat some olive oil in a pan and fry the celery and onion until soft. Add the tomato sauce, the basil, the olives, the capers the pine nuts and sultanas. Season with salt and pepper and cook for 10 minutes on a low flame. Pour in the vinegar and sugar, mix, and let the vinegar evaporate, Add the aubergines and chopped octopus. Stir for a couple of minutes and remove from heat.
Serve cold with a sprinkling of chopped almonds.