Communities across the region have been fighting to retain library services in towns and villages where buildings are at risk of closure.