#! /usr/bin/python def get_news_tuple(): items =(("New Web Page: 30/06/05","Finally a decent web page for GtkBook project",""), ("Widget a Day: 28/06/05","Muthu has started to write 1 widget-a-day, to complete, the GtkBook project, see $URL for more news"," http://advogato.org/person/gnumuthu/diary.html?start=6"), ("Wiki: June 2005","A community workspace at GNOME project: $URL", "http://live.gnome.org/GtkBook/") ); return items def get_header_string(): return """ GtkBook: Free documentation for GTK+ GTK Book Project banner
""" + get_title_link_string() def get_title_link_string(): title_links = ( ("Home","index.html"), ("Links","links.html"), ("Download","download.html"), ("License","license.html"), ("News","news.html"), ("Contribute","contribute.html"), ("Feedback","feedback.html"), ("Contact","contact.html"), ("About","about.html"), ("TodaysWidget","widgetaday.html") ) datastring="
" datastring=datastring+"" for link in title_links: datastring=datastring+"" datastring=datastring+ "
"+link[0]+"
" datastring=datastring+"
" return datastring def get_footer_string(): images=(("GNU project","gnome-emacs.png","www.gnu.org"), ("GTK+ project","gtk-logo-rgb.png","www.gtk.org"), ("GNOME project","gnome-logo-icon-transparent.png","www.gnome.org"), ("Linux","gnome-term-linux2.png","www.kernel.org"), ("Inkscape","inky.png","www.inkscape.org"), ("Creative Commons","./deed_002.gif","creativecommons.org")); imgdir = "./images/" imgstr="" nextrow="" for image in images: imgstr=imgstr+"\n" nextrow=nextrow+""+image[0]+"" imgstr=imgstr+"\""+image[0]+"\"" imgstr=imgstr+"\n" nextrow=nextrow+"\n" imgstr=imgstr+"\n" imgstr=imgstr+nextrow; footstr="""© GtkBook team, 2005. Please mirror the site as you wish. Graphics, content may also be freely used under Creative Commons License. License\n Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. """ return "
\n\n"+imgstr+"
"+footstr+"\n\n" def get_index_page(): news=get_news_tuple()[0]; nstr="

News Flash:

"+news[0]+":"+news[1].replace("$URL","[See NEWS section]") datastring=nstr + """


Start contributing to our Widget a Day section.
  1. Table of Contents Contents
  2. Widget Status Widget

The GtkBook is an ambitious project that aims to create new useable and world class documentation for the Gtk tool kit, in code as well as concepts.

Its is aimed to be useful to the hacker as well as the novice in their attempt to master the nuances of the Gtk toolkit to develop better free-software faster and easier.

The documents are to be written in simple english and are expected to be translated to many languages as soon as the project nears initial release stages.

Gtk is still the most under-documented toolkit thats patronized widely and rightly at that. Its the initial learning curve that we target in this book and we have to overcome for any serious programmer to contribute to the Gtk world.

""" return datastring def get_links_page(): links=(("License","creativecommons.org/licenses/by-sa/2.5/"), ("HomePage","gtkbook.sf.net"), ("GTK Project","www.gtk.org"), ("Mailing Lists Sign Up","www.freelists.org/list/gtk-book"), ("Mailing Lists Archive","www.freelists.org/archives/gtk-book"), ) datastring="" datastring=datastring+ "
    " for link in links: datastring=datastring+"
  1. "+link[0]+"
  2. " datastring=datastring+"
" return datastring def get_download_page(): downloads=(("GtkBook [old, Tarball]","./GtkBook.tar.gz"), ("Gtk TextView tutorial","./archives/gtktext-0.3.tar.gz"), ("Image processing Guide [HTML tarball]","./improc.tgz"), ("Image processing Guide [PDF]","./improc.pdf"), ("Image processing Guide [Browsable]","./improc/index.html"), ("Example Code for Image Processing","./colors.tgz"), ("Source code of website generation s/w","./generate.py"), ("Source code of GtkBook logo ","./images/banner.svg"), ) datastring="" datastring=datastring+ "
    " for link in downloads: datastring=datastring+"
  1. "+link[0]+"
  2. " datastring=datastring+"
" return datastring def get_license_page(): lstr="""

License


Creative Commons

Creative Commons Deed

Attribution-ShareAlike 2.5

You are free:

  • to copy, distribute, display, and perform the work
  • to make derivative works
  • to make commercial use of the work

Under the following conditions:

by
Attribution. You must attribute the work in the manner specified by the author or licensor.
sa
Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one.
  • For any reuse or distribution, you must make clear to others the license terms of this work.
  • Any of these conditions can be waived if you get permission from the copyright holder.

Your fair use and other rights are in no way affected by the above.

This is a human-readable summary of the Legal Code (the full license).

 

This page is available in the following languages:
Català Deutsch English English (CA) English (GB)

Learn how to distribute your work using this license

We are using the creative commons license, with share and share alike policy.
You can find the exact license here: License

Programs

Parts of the example code, which are taken from other free software programs, are being distributed under the same license, of the original program, we have taken the code from. eg: In GPL programs, used as examples, we make that code reuseable under GPL terms only. Such code and license will be explicitly indicated.

The rest of the code/examples in the GtkBook will be released in public domain. This will also be indicated explicitly.

Before using ambiguously licensed/license not mentioned, code/exmples in your programs, that you will/will-not publish, please ask before using/re-using the code.

Code, Images, Text

All these Code, Images, Text, with exceptions noted above, may be distributed under the Creative Commons License shown above. """ datastring=lstr return datastring def get_news_page(): #add news items to top. items=get_news_tuple() data="
    " for item in items: data=data+"
  1. "+item[0]+"
    " data=data+item[1].replace("$URL","URL")+"
  2. " data=data+"
" datastring="News Page"+data return datastring def get_contribute_page(): cstr="""
General Guidelines
You are mostly a programmer, artist or a technical writer thinking if you must join this project. This page exists to help you understand in what capacity you can best help the GtkBook project, and be a part of the winning team.

You can contribute to this project, in any of the following roles,

Once you have decided how to contribute, doing the actual stuff is rather easy.

Joining the Project