Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

April 15 2012

What’s all in my bookshelf?

Today, we get all the useful information from the internet in just a few minutes of clicking, typing and surfing. However, what interesting/useful books are in my very own bookshelf(ves)? Very very very very few people has a catalogue of books in your home like in the library so that you easily find anything you’ve bought years ago. No, books (as well as other stuffs, but just concentrate on them for now) are just continuing to accumulate in the shelf becoming continuously forgotten by their owner.

Now, the idea is to take use of the internet to fix this problem! You don’t need to go through every book in your shelf like a librarian and collect information like author, publishing date, whatever, whatever, but there’s a good tool that delivers them all: Worldcat. The nice people at OCLC have provided us good APIs we can use, described here: http://xisbn.worldcat.org/xisbnadmin/doc/api.htm

Let’s try:

import urllib
kickthehabitbook=urllib.urlopen('http://xisbn.worldcat.org/webservices/xid/isbn/9789280729269?method=getMetadata&fl=*&format=json')
print kickthehabitbook.read()

Year! Do you see the meta info of the book now? Change the ISBN by playing a bit with your old (forgotten) books! With the built-in json library, converting the string to a simple dictionary is equally easy:

import json
#do this again because we can only read once (seek(0) doesn'twork)
kickthehabitbook=urllib.urlopen('http://xisbn.worldcat.org/webservices/xid/isbn/9789280729269?method=getMetadata&fl=*&format=json')
#fetch the first entry (usually there's just one anyway)
metainfo=json.load(kickthehabitbook)['list'][0]
kickthehabitbook.close() #we don't need it anymore

This is now the simple class “book”, inherited from built-in dict:

class book(dict):
  def __init__(self,isbn,meta={},upgrade=True):
    self.isbn=isbn
    self.update(meta)
    if upgrade:
      self.upgradebookmeta()

  def upgradebookmeta(self):
    bomejsur=urllib.urlopen("http://xisbn.worldcat.org/webservices/xid/isbn/"+self.isbn+"?method=getMetadata&fl=*&format=json")
    self.update(json.load(bomejsur)['list'][0])
    bomejsur.close()

The complete working script for managing your books is here: https://github.com/yuwash/Blaetter


February 29 2012

yuwash

calmatk (Beispiel „Sonn- und Feiertage im Mai 2012“)

calmatk ist nun auf die neue Adresse calmatk.yws.be umgezogen! Dabei ist eine weitere Funktion hinzugekommen: Man kann nun eine Beschreibung zu den markierten Tagen hinzufügen, sodass diese mit dem Mauszeiger auf dem entsprechenden Datum als Tooltip angezeigt wird.

January 29 2012

Play fullscreen
Easy python beginning

January 07 2012

yuwash

Meine erste öffentliche Designvorlage für GetSimple: „Humarkise“

GetSimple benutze ich schon seit rund einem Jahr und mit der Benutzerfreundlichkeit dieses CMS bin ich immer noch sehr zufrieden! Da das CMS trotz seines weiten Funktionsumfangs eine recht übersichtliche Struktur behält, war die Entwicklung der Vorlage relativ unkompliziert mithilfe der Template-Tags auf http://get-simple.info/wiki/themes:template_tags

July 09 2011

How to read Russian?

Of course, there’s the useful tool Google translate, which you can let transliterate Russian, Arabic and any other exotically written language. However, if you want to know exactly how each letter should be pronounced, it’s not so easy. Your pre-installed character map is quite useful: it tells you the name of each letter and some more
information. This is based on Unicode’s names list
http://www.unicode.org/Public/UNIDATA/NamesList.txt In python, you can access it with “unicodedata.name(chr)”, where “chr” is the character you want to look up (don’t forget to precede “u” to make it a unicode string!). Now that we’ve got the Russian word “Здравствуй” (hello), look up every character:

Let’s see how’s the output:

>>> unicodedata.name(u'З')
'CYRILLIC CAPITAL LETTER ZE'

We only need to know that this letter is called “ZE”, so extract the substring following “LETTER ” (length is 7):

>>> uname=unicodedata.name(u'З')
>>> uname[uname.find('LETTER')+7:]
'ZE'

That’s it:

>>> for chr in u'Здравствуй':
...   uname=unicodedata.name(chr)
...   print(uname[uname.find('LETTER')+7:]),
...
ZE DE ER A VE ES TE VE U SHORT I

Tags: language

March 04 2011

yuwash

Calendarmatk (Beispiel "Sonn- und Feiertage im März")

Als neue Funktion des Projektes ratiomatk steht nun Calendarmatk für alle Webmaster, Blogger u. Ä. zur Verfügung. Dies erzeugt reine HTML-CSS-Kalendar mit einfachen Markierungen (Mehrfarbigkeit geplant), die man einfach auf beliebige Webseiten einbetten kann (Breite wird per CSS angepasst). Damit wird die eigene Website übersichtlicher und kleiner und man braucht nicht mehr jeden Monat an Quelltext zu arbeiten, auch wenn man keinen PHP-Zugriff hat.

January 04 2011

December 29 2010

yuwash

Neuigkeit - liberpad (Beispiel)

Nun habe ich liberpad, den nichtsspeichernden Textanzeigedienst, insofern erweitert, dass er nun aus dem Text samt Titel eine Textdatei erzeugt (die man platzsparend lokal speichern könnte) und für den direkten Druck über den Webbrowser eine gesonderte CSS besitzt, die für eine maximale Papier- und Tintenersparnis sorgt. Dabei blendet diese CSS selbst den Titel aus, da er meistens vom Webbrowser in die Kopfzeile eingefügt wird.

November 09 2010

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


July 21 2010

July 10 2010

yuwash

Treematk PHP-Baumvisualisierer

Mit dem Opensourceprojekt, das ich neuerdings bei tuxfamily angelegt habe, kann man aus einfachen "Baum-Zeichenkette", deren Syntax ausschließlich aus den Satzzeichen "." und "," besteht: ein einfaches Beispiel

May 25 2010

May 15 2010

yuwash
That's a quite useful list! The official Vim documentation is detailed and helpful, but this is a lot handier to just "check" a command.
yuwash
Da ich mich zur Zeit damit beschäftige, ein Web-Projekt in PHP zu entwickeln, brauche ich hin und wieder die URL-Kodierung deutscher Sonderzeichen. Daher habe ich sie in dieses übersichtliche Bild zusammengetragen.

April 17 2010

yuwash

Instructables:Make a high powered solar panel from broken solar cells

Es ist auch für einen Anfänger wie mich recht vorstellbar, Solarzellenbrüche zusammenzuschalten. Dafür finde ich auch bei mehreren Versandhäusern Solarzellenbrüche für ca. €4,-/100 cm, womit man tatsächlich deutlich viel sparen könnte. Allerdings bräuchte man zusätzlich einen Spannungsstabilisator, wenn man nicht nur Akkus aufladen, sondern auch manche empfindlichere Geräte mit Strom versorgen will.
yuwash
Good that your CPU hasn't been damaged by that!
yuwash
What happened to your computer and what did you repair?
yuwash
Vermutlich durch die Aschewolke von Eyjafjallajökull wurde es auch in Deutschland nebelig.

April 16 2010

16:50 CEST in Krefeld (looking northward): clowds cover the sky
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.