What's the point of a library or a librarian in the digital era? Who needs a physical space for books and archives, and librarians to police their use, when all that material will soon be available to anyone with a decent internet connection at the click of a mouse?
On a visit to the National Library of Wales in Aberystwyth last week, I got a few answers to those questions. This is one of the UK's copyright libraries, able to ask for a copy of every book, newspaper and magazine published in the UK. It is housed in an imposing 1930s building perched above the west-Wales seaside town, and is home to collections of paintings, films and television programmes as well as as ancient and modern Welsh texts.
Like other such institutions, it is struggling to find a role in the digital age. The numbers turning up to visit the library and use its facilities are falling, and while millions are coming to its website, there's a sense that these are casual passers-by, and the value they get from the site is hard to measure.
The National Library is not however just sitting back and waiting for a graceful demise. It's plunging with enthusiasm into a massive digital project which could give it a sustainable future. A third of the staff now have roles in this project, so there's now a range of perhaps unfamiliar job titles, from Imaging Officer to Metadata Manager.
What they are engaged on is extremely ambitious, as Andrew Green, the Welsh-speaking Yorkshireman who runs the place, explained to me as we toured the building. The idea is to give free online public access to as much as possible of what he describes as "the printed heritage of Wales" from the 16th Century to the present day. So every book, periodical or pamphlet could end up online.
In a large room at the top of the library, I got a glimpse of the extent and the cost of this task. An imaging officer - I think that was her title - was carefully scanning page after page of a bound edition of a 19th-Century Welsh newspaper. The scanner used for this task was imported from Germany at a cost of £80,000, but the process doesn't end there.
The next stage involves OCR - optical character recognition - to turn the scan into machine-readable text. Then the output needs to be proof-read, and here there's the possibility of repeating a crowd-sourcing experiment used by an Australian library, which got the public to proof-read scanned texts, and found many people competing to do the most edits.
The National Library of Wales is also involved in a project which helps community groups - schools, sports clubs, even families - scan their archives and make them available online as a kind of living history document. The end results of this massive digitisation project could be an invaluable resource for historians, and for anyone interested in the culture of their country. But this will not happen in a hurry, partly because the money has to come from increasingly scarce public funds, but also because much of the work involves cutting through the complex thickets of copyright.
There is an elephant in the room for this and other mass digitisation projects by libraries around the world, and it is called Google Books. The arguments about the search giant's plan to make millions of out-of-print books from around the world available online are too complex to go into in this post; suffice it to say the project is far more ambitious than anything that could be carried out by a individual public-sector institution.
So why does not Andrew Green just hand over his digital plans to Google, and let a commercial company bear the cost rather than the public purse? The librarian puts powerfully his case against the privatisation of our printed heritage. "The people of Wales own this collection, they have paid to build it up over the years, why should it just be handed to Google?"
He points out that commercial companies - even those as powerful as Google - can come and go, while the National Library of Wales is likely to be around in the 22nd Century.
The librarian believes he has found a new cause for his profession, to give a secure home to digitised texts produced with the highest quality standards and available freely to all. "These are huge benefits," he says, "and should be fought for by all of those who care about unimpeded public access to knowledge." Google beware - the librarians are getting cross, and they are quiet but patient people.