Re: Obelus and Metobelus characters?

From: Philippe Verdy <verdy_p_at_wanadoo.fr>
Date: Sat, 13 Aug 2011 02:57:48 +0200

2011/8/12 Petr Tomasek <tomasek_at_etf.cuni.cz>:
> See http://books.google.cz/books?id=SIMsY6b2n2gC&pg=PA193&lpg=PA193&dq=metobelos&source=bl&ots=X89ohmkgZV&sig=wXFr86dnxikILZfd7iF2TaC9RLc&hl=cs&ei=MnVFTpy5EMr5sgaOiP3FBw&sa=X&oi=book_result&ct=result&resnum=7&ved=0CEMQ6AEwBg#v=onepage&q=metobelos&f=false

Thanks for us, if you send URLs to Google Books, for removing the
optional parameter "&hl=cs" in the query part of the URL: it specifies
the code of the language (here cs for Czech) of the user interface
added by Google around the page, and it's difficult to navigate when
you can't read Czech, and changes that language from the default
language normally used by users. Note that the domain name does not
necessarily have to be changed (so "books.google.cz" will work
equivalently with "books.google.fr", the inly difference being the
defautl language used, if the user has no prior connection to his
Google account where he has set a language preference for the UI).

And generally, those long URLs contain extra parameters that are not
necessary for the reference. The needed meaningful parameters are
"?id=... which specifiies the ID of the scanned book edition,
"&pg=..." and "&lpg=..." that select the page to display (n fact only
"&pg=..." is sufficient here). You should not send the signature of
your personal request (unless you want to track how others will reuse
the URL you wanted, and you have some usage tracking options in your
Google account). The other parameters are just used to highlite the
two words "metobelos" and "obelos". some parameters contain only the
dummy string used to display the submit button of the search form from
which you got that URL.

In other words, this truncated URL would have been better to get the
same result (just without the highlighted words).

http://books.google.cz/books?id=SIMsY6b2n2gC&pg=PA193

Be careful when copying full URLs from address bars, as they may
sometime reveal some privacy info (this should be documented by Google
somewhere for its public API).

But note also that Google Books already shows a "link" button just
above the scanned page, that allows you to display such reference URL
without privacy issue: use it !

The only difference with the previous short URL is that it is also
appended with an anchor "v=onepage&q&f=false" after the hash (#)
separator, but I doubt it really positions you somewhere in the
displayed HTML page to an anchor with this syntax:

The hash sign and anchor is normally not transmitted to the server (at
least not during the first HTTP request) but only used by the browser
once the page is loaded; it may eventually be read and used later by
one of the embedded scripts loaded from the HTML page at that URL.
This is the case here where they are used to provide some additional
data to the loaded javascript, to set the one-page view mode
(v=onepage), and to not use the full-screen display mode (f=false) so
that it can display the left bar containing ads for buying the book
(any non-empty value of "f=..." other than "f=false" seems to give the
full-screen mode, without the bookshop ads on the left side of the
page).

The "q" parameter in the anchor part of the URL is used for searching
and highlighting some words in the OCR plain-text of the scanned page
(it may be any word, apparently it interestingly seems to use some
case folding for searching these items, with the help of an additional
dynamic query to GoogleBooks, after the page is loaded). For example
you can use "q=0" and it will look for anything that looks like a zero
in the scanned pages of the book, including on several pages (you get
a list of pages fragments with the highlighted search results). But if
you use the "q=..." search parameter in the anchor, the "pg" and "lpg"
parameter in the query string may become superfluous, because the
javascript will retrieve and display a new set of page fragments
containing search matches (including on any other pages of the scanned
book).
Received on Fri Aug 12 2011 - 20:01:05 CDT

This archive was generated by hypermail 2.2.0 : Fri Aug 12 2011 - 20:01:06 CDT