ANTLR grammar for XKB, and Relax NG schema (draft)
I completed the ANTLRv3 grammar for symbols/ configuration files of XKB. The grammar can parse and create the abstract syntax tree (AST) for all keyboard layouts in xkeyboard-config.
ANTLRv3 helps you create parsers for domain specific languages (DSL), an example of which is the configuration files in XKB.
Having the ANTLRv3 grammar for a configuration file allows to generate code in any of the supported target lagnuages (C, C++, Java, Python, C#, etc), so that you easily include a parser that reads those files. Essentially you avoid using custom parsers which can be difficult to maintain, or parsers that were generated with flex/bison.
On a similar note, here is the grammar to parse Compose files (such as en_US.UTF-8/Compose.pre). I am not going to be using in the project for now, but it was fun writing it. The Python target takes 18s to create the AST for the >5500 lines of the en_US.UTF-8 compose file, on a typical modern laptop.
I am also working on creating a RelaxNG schema for the XKB configuration files (those under symbols/). There is a draft available, which needs much more work.The Relax NG book by Eric van de Vlist is very useful here.
The immediate goal is to use the code generated by ANTLR to parse the XKB files and create XML files based on the Relax NG schema. I am using Python, and there are a few options; the libxml2 bindings for Python, and PyXML. The latter has more visible documentation, but I think that I should better be using the former.
Update: lxml appears to be the nice way to use libxml2 (instead of using directly libxml2).
Looking into the symbol files
In the previous post, we talked about the ANTLR grammar that parses the XKB layout files.
The grammar is available at http://code.google.com/p/keyboardlayouteditor/source/browse. I’ll rather push to the freedesktop repository once the project is completed. Now it’s too easy for me, just doing svn commit -m something.
Below you can see the relevant layout files for each country (and in some cases, language), and how the grammar deals with them. First column is filenames from the CVS XKB symbols subdirectory (to be moved eminently to GIT). Last’s week discussion with Sergey helped me figure out issues with the symbol files, simplify what information is needed, and what can be eliminated. Second column has Not OK if something is wrong. Third column tries to explain what was wrong.
| ad | ||
| af | ||
| al | ||
| altwin | ||
| am | ||
| ara | ||
| az | ||
| ba | ||
| bd | ||
| be | ||
| bg | ||
| br | ||
| braille | ||
| bt | ||
| by | ||
| ca | ||
| capslock | ||
| cd | ||
| ch | ||
| cn | ||
| compose | ||
| ctrl | ||
| cz | ||
| de | ||
| dk | ||
| ee | ||
| epo | ||
| es | ||
| et | ||
| eurosign | ||
| fi | ||
| fo | ||
| fr | ||
| gb | NOK | Non-UTF8 |
| ge | ||
| gh | ||
| gn | ||
| gr | ||
| group | NOK | virtualMods= AltGr |
| hr | ||
| hu | NOK | Non-UTF8 |
| ie | ||
| il | NOK | key.type=”FOUR_LEVEL” (typically: key.type[something]=….) |
| in | NOK | key.type=”FOUR_LEVEL” (typically: key.type[something]=….) |
| inet | ||
| iq | ||
| ir | ||
| is | ||
| it | ||
| jp | NOK | key <BKSP> { type=”", // empty? symbols[Group1]= [ bracketright, braceright ] }; |
| keypad | NOK | overlay1=<KO7> }; // what’s “overlay”? |
| kg | ||
| kh | ||
| kpdl | ||
| kr | ||
| kz | ||
| la | ||
| latam | ||
| latin | ||
| level3 | NOK | virtual_modifiers LAlt, AlGr; virtualMods= Lalt |
| level5 | ||
| lk | ||
| lt | ||
| lv | ||
| ma | ||
| mao | ||
| me | ||
| mk | ||
| mm | ||
| mn | ||
| mt | ||
| mv | ||
| nbsp | NOK | Non-UTF8 |
| ng | ||
| nl | ||
| no | ||
| np | ||
| olpc | ||
| pc | NOK | key <AA00> { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” } |
| pk | ||
| pl | ||
| pt | ||
| ro | ||
| rs | ||
| ru | ||
| se | ||
| shift | NOK | actions [Group1] = [ |
| si | ||
| sk | ||
| srvr_ctrl | NOK | key <AA00> { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” } |
| sy | ||
| th | ||
| tj | ||
| tr | ||
| ua |
Non-UTF-8 are the files that have characters that are not UTF-8 (are iso-8859-1).
Some layouts have key.type = “something” and others key.type[SomeGroup] = “something”. Apparently, the format allows to infer which is the group that the type acts upon? That’s weird. Would it be better to put the group information? Is it required that the group is not set?
Some files have virtualMods, which I do not know what it is. Is it used?
Parsing XKB files with antlr
antlr (well, antlr3) is an amazing tool that replaces lex/flex, yacc/bison.
One would use antlr3 if they want to deal with Domain-Specific Languages (DSL), an example of which are the text configuration files.
In our case, we use antlr3 to parse some of the XKB configuration files, those found in /etc/X11/xkb/symbols/??.
Our aim is to be able to easily read and write those configuration files. Of course, once we have them read, we do all sorts of processing.
The stable version of antlr3 is 3.0.1, which happened to give lots of internal errors. It has not been very useful, so I tried a few times the latest beta version 3.1b, and eventually managed to get it to work. If I am not mistaken, 3.1 stable should be announced in a few days.
When using antlr, you have the choice of several target languages, such as Java, C, C++ and Python. I am using the Python target, and the latest version that is available from the antlr3 repository.
Here is the tree of the gb layout file,
tree = (SECTION (MAPTYPE (MAPOPTIONS partial default alphanumeric_keys xkb_symbols) (MAPNAME “basic”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior oneeighth)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior sterling)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS apostrophe at dead_circumflex dead_caron)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde dead_grave dead_breve)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar brokenbar)) (TOKEN_INCLUDE “level3(ralt_switch_multikey)”))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “intl”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom – International (with dead keys)”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 dead_diaeresis twosuperior onehalf)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior onethird)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AE06) (KEYSYMS 6 dead_circumflex NoSymbol onesixth)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS dead_acute at apostrophe bar)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS dead_grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign dead_tilde bar bar)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar bar)) (TOKEN_INCLUDE “level3(ralt_switch)”))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “dvorak”)) (MAPMATERIAL (TOKEN_INCLUDE “us(dvorak)”) (TOKEN_NAME Group1 (VALUE “United Kingdom – Dvorak”)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign NoSymbol)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar)) (TOKEN_KEY (KEYCODEX AD01) (KEYSYMS apostrophe at)))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “mac”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom – Macintosh”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 at EuroSign)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling numbersign)) (TOKEN_INCLUDE “level3(ralt_switch)”)))
When traversing the tree, we can then pretty-print the layout at wish:
partial default alphanumeric_keys xkb_symbols “basic” {
name[Group1] = “United Kingdom”;
include “latin”
include “level3(ralt_switch_multikey)”
key <AE02> = { [ 2 , quotedbl , twosuperior , oneeighth ] };
key <AE03> = { [ 3 , sterling , threesuperior , sterling ] };
key <AE04> = { [ 4 , dollar , EuroSign , onequarter ] };
key <AC11> = { [ apostrophe , at , dead_circumflex , dead_caron ] };
key <TLDE> = { [ grave , notsign , bar , bar ] };
key <BKSL> = { [ numbersign , asciitilde , dead_grave , dead_breve ] };
key <LSGT> = { [ backslash , bar , bar , brokenbar ] };
};
… snip …
The code is currently hosted at code.google.com (keyboardlayouteditor) and I intend to move it shortly to FDO.
Ένδοξη ιστορία και MS-OOXML
Ο ελληνισμός έχει μεγάλη ιστορία με αποτέλεσμα να υπάρχουν μεγάλες προσδοκίες στις σύγχρονες εξελίξεις.
Ας αντιπαραβάλουμε μια σύγχρονη ιστορία από κάπου από την Ασία με τα τεκταινόμενα σε Ελλάδα και Κύπρο, σχετικά με την διαδικασία ψήφισης υπέρ ή κατά του λεγόμενου MS-OOXML ως διεθνές πρότυπο ISO για έγγραφα γραφείου. Η διαδικασία αυτή θα ολοκληρωθεί στις επόμενες μέρες, και αν δεν κάνουν κάτι Ελλάδα και Κύπρος, τότε θα καταλογιστεί ψήφος υπέρ, κάτι που θα είναι επιζήμιο στα εθνικά μας συμφέροντα (PDF). Το MS-OOXML, στην παρούσα μορφή, δεν είναι χρησιμοποιήσιμο από τρίτους κατασκευαστές για να φτιάξουν εφάμιλλα προϊόντα.
Δείτε την πορεία του MS-OOXML προς το ISO.
Γυρίζοντας στην αρχική αντιπαραβολή, στη Μαλαισία λοιπόν, έγινε πριν από μια εβδομάδα μια συνάντηση του τοπικού συνδέσμου επιχειρήσεων και βιομηχανιών (σχεδόν αντίστοιχο του ελληνικού ΣΕΒ) για συζήτηση περί του MS-OOXML, για να βοηθηθεί ο αντίστοιχος ΕΛΟΤ στη τελική του συνάντηση που θα γινόταν λίγες μέρες αργότερα. Στη συνάντηση αυτή (του συνδέσμου) δεν κάλεσαν για κάποιο παράξενο λόγο το βασικό άτομο που έκανε αρκετή δουλειά για τον τοπικό ΕΛΟΤ της χώρας, αν και ήταν το άτομο που πήγε στη Γενεύη για να εκπροσωπίσει τη χώρα. Η αφορμή ήταν ότι το συγκεκρινένο άτομο δεν ήταν μέλος του συνδέσμου επιχειρήσεων. Για κάποιο παράξενο λόγο, στη συνάντηση αυτή προσκλήθηκαν υψηλόβαθμα άτομα από τη Microsoft (ΗΠΑ).
Μετά από αυτό το συμβάν, υπήρξε ένας ιστολογικός διαπληκτισμός, με ένα, δύο, τρία άρθρα.
Μετά από δυο μέρες (από αυτό που έγινε στο αντίστοιχο ΣΕΒ) ,έγινε η συνάντηση του τοπικού αντίστοιχού ΕΛΟΤ, με παράγοντες από τοπικούς οργανισμούς και αυστηρή απαγόρευση σε εμπορικούς παράγοντες (όπως εταιρίες πληροφορικής). Το αποτέλεσμα της συνάντησης ήταν για την αποφάσιση για την τελική θέση της χώρας ως προς την ψήφιση.
Στην συνάντηση αυτή εμφανίστηκε και ο υψηλόβαθμος παράγοντας από την Μάικροσοφτ (ΗΠΑ). Για να δικαιολογηθεί η παρουσία του (δεν είναι ντόπιος), ορίστηκε (σε μια νύχτα;) ως εκπρόσωπος της Μαλαισίας για ένα μη-κερδοσκοπικό οργανισμό που ονομάζεται IASA. Εδώ υπάρχει το ερώτημα αν ο οργανισμός αυτός είναι όπως και άλλοι τέτοιοι φαινομενικά ουδέτεροι μη-κερδοσκοπικοί οργανισμοί που στόχο έχουν να προάγουν τα συμφέροντα συγκεκριμένων εταιριών δίχως να γίνονται αντιληπτοί. Παραπάνω φαίνεται η κάρτα που έφτιαξαν για την περίσταση (το άτομο αυτό δεν έχει σχέση με τη χώρα).
Η επιτροπή της χώρας αυτής δεν ενέδωσε, και ολοκλήρωσε το έργο της όπως έπρεπε, για το συμφέρον της χώρας (τους).
Όμως, το υψηλόβαθμο στέλεχος της Μάικροσοφτ (ΗΠΑ) δεν το έβαλε κάτω, και έκανε απεγνωσμένες εγγραφές ιστολογίου για να δικαιολογήσει τα αδικαιολόγητα. Μπορείτε να δείτε όλη την συζήτηση από ένα, δύο, τρία, τέσσερα. Γενικά, καλό είναι να διαβάζετε openmalaysiablog.com.
Η πορεία του MS-OOXML προς το ISO
Συνοπτικά, η διαδικασία για να κάνει κάποιος ένα πρότυπο ISO είναι: Αποφασίζεις αν θέλεις τη γρήγορη διαδικασία (fast-track process) ή την κανονική διαδικασία. Κάποιος επιλέγει τη γρήγορη διαδικασία αν γνωρίζει ότι το υποψήφιο πρότυπο είναι έτοιμο και δεν χρειάζεται σημαντικές διορθώσεις. Για το MS-OOXML (Μάικροσοφτ Office Open XML), έγινε επιλογή της γρήγορης διαδικασίας, που από την αρχή ήταν παράξενο διότι ως υποψήφιο πρότυπο περιλάμβανε περισσότερες από 6.000 σελίδες, κάτι που δεν είναι τυπικό σε πρότυπα ISΟ και τη γρήγορη διαδικασία. Ακόμα, ως κείμενο προτύπου, παράχθηκε πολύ γρήγορα (<ένα χρόνο;) που είναι ακόμα πιο παράξενο. Αντίθετα από άλλα υποψήφια πρότυπα, η δημιουργία του έγινε από την ίδια την Microsoft δίχως εξωτερική επίβλεψη/συμμετοχή.
Σύμφωνα με τη γρήγορη διασικασία, αφήνεις 6 μήνες για τις χώρες μέλη της σχετικής επιτροπής του ISO για να μελετήσουν το υποψήφιο πρότυπο και να κάνουν σχόλια. Στο τέλος των 6 μηνών, θα γίνει μια πρώτη ψήφιση, για το αν θα γίνει έγκριση όπως είναι, ή θα χρειαστούν διορθώσεις. Σε αυτό το σημείο οι χώρες στέλνουν σχόλια για βελτιώσεις, αν υπάρχουν. Η ψήφιση αυτή έγινε το περασμένο Σεπτέμβριο (2007) και για μικρή διαφορά ψήφων, το MS-OOXML δεν πήρε την απαιτούμενη πλειοψηφία κατά τους κανονισμούς του ISO.
Μικρή διαφορά; Δηλαδή το MS-OOXML δεν τα πήγε τόσο άσχημα; Στα τέλη Αυγούστου 2007 συνέβει κάτι πρωτόγνωρο στην επιτροπή εκείνη που έχει να κάνει με το MS-OOXML. Πολλές χώρες έκαναν αίτηση και εγκρίθηκαν να γίνουν μέλη, για να ψηφίσουν για το υποψήφιο πρότυπο. Εξωτικές χώρες όπως η Ακτή Ελεφαντοστού, Τζαμάικα, Τρινιντάδ και Τομπάγκο έγιναν μέλη μια βδομάδα πριν την ψήφιση. Μία από τις χώρες αυτές, που έγιναν μέλη την τελευταία στιγμή λίγο πριν την ψήφιση, ήταν και η Κύπρος. Και αυτές οι χώρες ψήφισαν Ναι στο MS-OOXML, χωρίς να μπουν στο κόπο να στείλουν σχόλια.
Αυτό που συνέβει είναι ότι υπάρχουν χώρες που δεν έχουν τη δυνατότητα ή τους πόρους να αναθέσουν σε τοπικούς φορείς να μελετήσουν το υποψήφιο πρότυπο, κάτι που έχει να κάνει με το εθνικό τους συμφέρον. Οπότε, τοπικοί αντιπρόσωποι της Microsoft στις μικρές αυτές χώρες είναι πιθανό να παίρνουν γραμμή από ψηλά να πάνε και να ψηφίσουν για το συμφέρον της εταιρίας. Το να συμβεί κάτι τέτοιο σε μια φτωχή αναπτυσσόμενη χώρα δεν αποτελεί έκπληξη. Αλλά και στην Κύπρο;
Από το Σεπτέβριο 2007 οδηγούμαστε στο Φεβρουάριο 2008 όπου στο διάστημα αυτό έπρεπε να απαντηθούν τα σχόλια και παρατηρήσεις που έγιναν στην πρώτη ψήφιση. Το Φεβρουάριο λοιπόν, αντιπρόσωποι από τις χώρες της τεχνική επιτροπής συγκεντρώθηκαν στη Γενεύη για μια βδομάδα, για να συζητήσουν τις διορθώσεις (περισσότερες από 1.000 παρατηρήσεις σε 5 εργάσιμες μέρες). Ο στόχος της συνάντησης αυτής (Ballot Resolution Meeting, BRM) ήταν να συμφωνηθούν οι διορθώσεις ώστε ένα μήνα αργότερα να είναι σε θέση οι χώρες να ψηφίσουν για την τελική τους θέση.
Η πληθώρα των παρατηρήσεων και προβλημάτων στο υποψήφιο πρότυπο είχε ως αποτέλεσμα να μην λυθούν τα προβλήματα. Η συνάντηση στη Γενεύη ήταν πολύ προβληματική, ελληνική άποψη, τρίτη χώρα.
Τώρα λοιπόν οδηγούμαστε στην κρίσιμη εβδομάδα που οι χώρες μέλη της ομάδας αυτής του ISO έρχονται να ψηφίσουν υπέρ ή κατά του υποψήφιου MS-OOXML.
Η Ελλάδα ψήφισε το Σεπτέμβριο Yes, with comments και η Κύπρος ψήφισε Yes. Αν δεν κάνουν νέα ενέργεια, θα καταλογιστεί η παλαιότερη ψήφος.
Για την αλλαγή της θέσης, υπάρχουν πληροφορίες στο groklaw.
Γιατί άραγε να θέλει η Μάικροσοφτ να περάσει ντε και καλά το MS-OOXML;
OOXML voting process and controversy
By the end of this month, the ITC 1/SC 34 Technical Committee (ISO) will be voting on whether to accept or not OOXML as an ISO standard.
The voting countries (Participating countries) are
In addition, the following countries have observer status (Observer countries),
The observer countries, though the cannot vote, they can submit comments.
The current stage that OOXML is at, is 40.20, which means is the period that leads to the voting whether to accept or not as an ISO standard.
This proposed document format is controversial because an existing document format exists, the OpenDocument document format, ISO/IEC 26300, Open Document Format for Office Applications (OpenDocument) v1.0, since 2006.
OOXML is a controversial document format. Read more on this regarding OOXML.
In addition, see the Technical White Paper on OpenDocument and OOXML by the ODF Alliance UK Action Group. Another whitepaper, ODF/OOXML technical white paper by Edward Macnaghten.
Open Malaysia is also valuable resource (includes blog contributions relating to open standards). For example, in spreadsheets in OOXML one cannot write dates before the 1st March 1900!
Finally, Achieving Openness: A Closer Look at ODF and OOXML by Sam Hiser.
Update #1: Microsoft is Outmuscling OOXML Opposition in Spain
Update #2: It is important to vote NO rather than abstain. It is sad that Spain decided to abstain rather than voting NO. UPDATE: Spain is an observer, thus cannot cast a vote. Somewhat lost en la traduccion.
Update #3: Czech comments on OOXML.
Say No to OOXML
Click on the image above to visit the petition page.
I copy here the terms of the petition to say no on the standardisation of MSOOXML at ISO.
I ask the national members of ISO to vote “NO” in the ballot of ISO DIS 29500 (Office OpenXML or OOXML format) for the following reasons:
- There is already a standard ISO26300 named Open Document Format (ODF): a dual standard adds costs, uncertainty and confusion to industry, government and citizens;
- There is no provable implementation of the OOXML specification: Microsoft Office 2007 produces a special version of OOXML, not a file format which complies with the OOXML specification;
- There is missing information from the specification document, for example how to do a autoSpaceLikeWord95 or useWord97LineBreakRules;
- More than 10% of the examples mentioned in the proposed standard do not validate as XML;
- There is no guarantee that anybody can write a software that fully or partially implements the OOXML specification without being liable to patent damages or patent license fees by Microsoft;
- This standard proposal conflicts with other ISO standards, such as ISO 8601 (Representation of dates and times), ISO 639 (Codes for the Representation of Names and Languages) or ISO/IEC 10118-3 (cryptographic hash);
- There is a bug in the spreadsheet file format which forbids to enter any date before the year 1900: such bugs affects the OOXML specification as well as software versions such as Microsoft Excel 2000, XP, 2003 or 2007.
- This standard proposal has not been created by bringing together the experience and expertise of all interested parties (such as the producers, sellers, buyers, users and regulators), but by Microsoft alone.
This project is an initiative by the Foundation for a Free Information Infrastructure (FFII), the non-profit that helped achieve the rejection of the EU software patent directive in July 2005.
Update #1: Currently (26Jun07 – noon) there are 8805 signatures.
Update #2: Currently (26Jun07 – evening) there are 9481 signatures.
Update #3:
IT IS URGENT THAT YOU CONTACT YOUR STANDARDISATION BODY IN YOUR COUNTRY AND EXPLAIN THEM WHY OOXML IS BROKEN; SENDING A NICE LETTER TO YOUR STANDARDISATION BODY IN YOUR COUNTRY IS MORE IMPORTANT THEN SIGNING THE PETITION
Διαθέσιμη η νέα διανομή Fedora 7
Διαβάζοντας την ανακοίνωση του Δημήτρη, βλέπουμε τα νέα χαρακτηριστικά που περιλαμβάνει η νέα έκδοση της διανομής Fedora.
Η ελληνική ομάδα που είναι πίσω από τη διανομή Fedora μετάφρασε τις σημειώσεις κυκλοφορίας της Fedora 7 για την προσωπική σας ευχαρίστηση.
Ολοκλήρωσα χτες τη λήψη του DVD ISO της Fedora 7 και το γράφω τώρα σε οπτικό δίσκο.
Ubuntu 7.04 DVD edition 4.3GB: done
Have been trying to download Ubuntu 7.04 DVD edition for the last few days. I use the amazing wget program with the command line looking like
wget -c http://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/releases/7.04/release/ubuntu-7.04-dvd-i386.iso
I started off the download in Windows, and over the course of the days I would interrupt and restart the download depending on what I was doing (the -c parameter lets you do that). To make it easier, I wrote a batch file with the command. I named the batch file CMD.BAT and I placed it in my home folder. All nice and well.
While the download was running, I wanted to open a new command prompt window, so I clicked on Start/Run…
Instead of getting a blank command prompt window, I get another instance of a wget download, for the same file. What does that mean? Well, YOU CAN BYPASS Start/Run… BY SIMPLY ADDING CMD.BAT IN YOUR HOME FOLFER.
Sadly, wget does not do any file locking, so I was expecting the worse. I let the download continue anyway and then I would check the checksum.
Download finishes, the checksum is wrong
.
What to do now?
I kept a note on the file size when both wget commands where running on the same file. So, I should simply cut off the bad part and continue the download from there. Booted in Linux and I did a
split -b 3750000000 ubuntu-7.04-dvd-i386.iso
Two file were created, xaa and xab. I throw away xab and I rename xaa into ubuntu-7.04-dvd-i386.iso.
Now, ubuntu-7.04-dvd-i386.iso contains the correct content but is not the full size. So, I continue with
wget -c http://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/releases/7.04/release/ubuntu-7.04-dvd-i386.iso
Once completed,
$ md5sum ubuntu-7.04-dvd-i386.iso
ca609edf086eea0c821ba34a5c0a709d ubuntu-7.04-dvd-i386.iso
$
which is the same checksum reported at
http://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/releases/7.04/release/MD5SUMS
Success!
Διαθέσιμο Ubuntu 7.04 DVD ISO, εντός Ελλάδας (FTP)
Είναι διαθέσιμο το Ubuntu 7.04 DVD ISO εντός της Ελλάδας (NTUA). Αν έχετε πρόσβαση σε ελληνικό εκπαιδευτικό ίδρυμα, μπορείτε να ολοκληρώσετε την εγγραφή στο DVD πολύ σύντομα!
Ένα από τα πλεονεκτήματα της χρήσης της έκδοσης DVD είναι η παρουσία όλων των απαραίτητων πακέτων με αποτέλεσμα να μην υπάρχει σημαντική απαίτηση σε ταχύτερο διαδίκτυο. Για παράδειγμα, η πλήρης ελληνική υποστήριξη είναι διαθέσιμη στο DVD.
Αναφερθήκαμε στην έκδοση DVD του Ubuntu 7.04 και νωρίτερα.

