Monday, October 31, 2011

DEiXTo & Athos Memory

In the context of our collaboration with the awarded Veria Central Public Library, a really remarkable Greek, online digital collection, Athos Memory, has been scraped through DEiXTo in order to be added to the European Library. Athos Memory has been a giant effort of the monastic community of the Holy Mountain to preserve and disseminate the unique religious tradition of the Eastern Orthodox Church on this peninsula of Chalcidice. Numerous people have worked tirelessly for years to make this endeavour possible. We would really like to congratulate and thank them for their great efforts and for providing open access to this magnificent collection.

The metadata of 27.223 photographs, documents and digitalized manuscripts from Athos, the Sacred Mountain of Christianity, have been transformed into Europeana Semantic Elements (ESE) format so that they could then be inserted into the Hellenic Aggregator's database.

To give you a better idea of the transformation process, check out the picture below. It's a screenshot of a typical item of Athos Memory archives.

Now, this record, after extracting and repurposing its metadata based on Dublin Core, gets the following form, suitable for exporting it:
Finally, it should be noted that this was the fourth digital library that was included in the Europeana with the help of DEiXTo. And we are eager to add more online resources and help Europeana enrich further its huge cultural and scientific collection!

Saturday, October 8, 2011

DEiXTo & Veria Central Public Library

One of DEiXTo's most important success stories is our collaboration with Veria Central Public Library in the context of the EuropeanaLocal project. Veria Central Public Library is a really remarkable library that embraces technology and constitutes a successful model for libraries in Greece and around the world. That's why it received a 1$ Million international award from Bill & Melinda Gates Foundation in 2010.

DEiXTo powers the Hellenic Aggregator for Europeana, created by Veria Central Public Library. DEiXToBot based Perl scripts have enabled the metadata extraction of the Music Library of Greece “Lilian Voudouri”, the Greek Educational TV and Corgialenios Digital Library in a format suitable for further processing. Once extracted, their rich content was repurposed through customized Perl code and transformed into Europeana Semantic Elements (ESE) format so that it could then be inserted into the aggregator's database.

This is the reason why DEiXTo was cited at the Symposium "Europeana in Greece" that took place on 19 October 2010 in Athens, Greece, as well as at the 19th Hellenic Academic Libraries Conference (3-5 November 2010, Athens).

Hopefully, more digital libraries/archives will use DEiXTo in the next few months in order to be able to export their metadata to the great Europeana collection (more than 15 million items from 1.500 institutions!). And we are more than glad to help Europeana enrich its content even more!

Saturday, September 17, 2011

DEiXToBot & Lack of JavaScript Support


Perhaps the major drawback of DEiXToBot (the Perl browser emulator object capable of executing GUI DEiXTo generated patterns) is the lack of JavaScript support, which derives from the fact that WWW::Mechanize doesn't operate on JavaScript. In many cases though, a solution is possible by figuring out what the JavaScript code is doing and simulating it via Perl programming. But in certain, more difficult cases that depend heavily on Javascript, this is very hard, if not impossible, because essentially you cannot reach the actual html source code of interest.

However, a workaround that sometimes works is to download the target pages of interest locally (after executing their Javascript segments of code) and then pass them to DEiXToBot for offline scraping.
Two remarkable tools for getting complex Javascript-enabled pages for this purpose are:
- Selenium, an amazing web browser automation tool and
- spynner, a powerful web browsing module with Ajax support for Python

Please note that these two great tools also work fine on GNU/Linux, which is really important, especially for server use and scheduled, periodic execution of wrappers.

So, once a target page is stored locally to your disk, the DEiXToBot agent can easily get the page through the file:// scheme and extract bits of interest in the usual manner.

Sunday, June 26, 2011

Μεταφόρτωση PDF αρχείων από τον Δικτυακό τόπο της Διαύγειας

Εδώ και σχεδόν 9 μήνες, στο πλαίσιο της λειτουργίας του προγράμματος «Διαύγεια», όλα τα κυβερνητικά όργανα, οι φορείς του στενού και ευρύτερου δημόσιου τομέα και οι Ανεξάρτητες αρχές υποχρεούνται πλέον να αναρτούν το σύνολο των αποφάσεων και των δαπανών τους στο Διαδίκτυο και συγκεκριμένα στο δικτυακό τόπο της Διαύγειας (http://et.diavgeia.gov.gr).

Σε καθημερινή βάση λοιπόν, πολλοί εργαζόμενοι στο Δημόσιο έχουν επιφορτιστεί με την ευθύνη να ανεβάζουν στη Διαύγεια μεγάλο όγκο από εντάλματα πληρωμής και αποφάσεις σε pdf μορφή. Και μάλιστα συνήθως μετά την ανάρτησή τους και αφού έχουν πάρει ΑΔΑ (Αριθμός Διαδικτυακής Ανάρτησης), ο εκάστοτε αρμόδιος υπάλληλος πρέπει να τα "κατεβάσει" χειροκίνητα κάνοντας απανωτά κλικ στους αντίστοιχους συνδέσμους "Λήψη Αρχείου" και να τα τυπώσει, κατά βάση για γραφειοκρατικούς λόγους. Η διαδικασία αυτή ωστόσο είναι χρονοβόρα, ιδιαίτερα όταν το πλήθος των αρχείων είναι μεγάλο. Τυγχάνει να το γνωρίζω αυτό από πρώτο χέρι όντας εργαζόμενος στο Διεθνές Πανεπιστήμιο Ελλάδος.

Στην εικόνα που ακολουθεί φαίνονται μερικές τυπικές εγγραφές στο site της Διαύγειας για κάποιο φορέα. Βλέπετε δεξιά τους υπερσυνδέσμους (links) για μεταφόρτωση των ενταλμάτων πληρωμής.

Σκεφτήκαμε λοιπόν να φτιάξουμε μία μικρή εφαρμογή η οποία θα εντοπίζει τις διευθύνσεις (URLs) των pdf αρχείων πάνω σε μία σελίδα αποτελεσμάτων της Διαύγειας, π.χ. των Χ τελευταίων που ανέβασε κάποιος την προηγούμενη μέρα, και στη συνέχεια θα τα κατεβάζει μαζικά. Ένα τέτοιο πρόγραμμα πιθανότατα θα μπορούσε να βοηθήσει αρκετούς δημόσιους υπαλλήλους να εξοικονομήσουν κόπο και χρόνο.

Η εφαρμογή είναι διαθέσιμη τόσο σε εκδοχή για χρήση σε γραμμή εντολών (σε Windows και Linux) όσο και για χρήση μέσω γραφικής διεπαφής (GUI) σε περιβάλλον Windows (για το δεύτερο, δείτε στο τέλος του post).

Σε γραμμή εντολών των Windows (DOS prompt) τρέξτε το diavgeia-downloader.exe (ή το diavgeia-downloader-linux αντίστοιχα σε ένα terminal εάν έχετε Linux) περνώντας ως παράμετρο τη διεύθυνση/URL στόχο και βάζοντας στην παράμετρο limit της διεύθυνσης της σελίδας τον επιθυμητό αριθμό pdf αρχείων. Για παράδειγμα, έστω η σελίδα:
που περιέχει τις τελευταίες 50 δαπάνες-αποφάσεις του ΕΛΚΕ του Πανεπιστημίου Μακεδονίας. Για λήψη αυτών των αρχείων τοπικά (στο φάκελο στον οποίο βρίσκεται και το εκτελέσιμο) αρκεί να δoθεί η ακόλουθη εντολή:
Η εφαρμογή υποστηρίζει δύο επιπλέον προαιρετικές παραμέτρους: [-dir folder] [-sleep N]
  • όπου folder το όνομα του φακέλου στον οποίο θα αποθηκευθούν τα αρχεία και
  • N o αριθμός των δευτερολέπτων των χρονικών παύσεων μεταξύ των εντολών μεταφόρτωσης ώστε να μην επιβαρύνεται ιδιαίτερα ο server της Διαύγειας.
Μπορείτε να κατεβάσετε τόσο τον πηγαίο κώδικα (σε Perl) όσο και τα εκτελέσιμα αρχεία (για Windows & Linux αντίστοιχα)! Η άδεια χρήσης του προγράμματος είναι η GNU General Public License version 3. Για περιβάλλον Windows μάλιστα υπάρχει και η γραφική διεπαφή (GUI) που κάνει προφανή όλα τα, μάλλον, πολύπλοκα για πολλούς παραπάνω. Πιο κάτω βλέπετε ένα  screenshot από το GUI εργαλείο. Η χρήση του είναι πολύ απλή, αρκεί ο χρήστης να δώσει με copy paste τη διεύθυνση της επιθυμητής σελίδας από το site της Διαύγειας και να πατήσει Go!

Ελπίζουμε η εφαρμογή αυτή να φανεί χρήσιμη. Σχόλια και προτάσεις ευπρόσδεκτα!

Wednesday, June 22, 2011

deixto.com/blog

Are you looking for a web content extraction tool to scrape data from websites of interest? DEiXTo can probably help you!

DEiXTo is an ongoing effort that started back in 2007. It is freely available to download and to our knowledge it is being used by many users as well as some organisations and companies all over the world. Indicatively, DEiXTo's site received more than 5.700 visits from 103 different countries during the last 12 months.

Today, we launch the blog of DEiXTo aiming a) to keep you apprised you about the wealth of applications and the utility of this exciting tool and b) to bring forward interesting topics around web scraping.

We really hope that DEiXTo can be useful for you and this blog helps you towards this direction.