Graphicslab's blog http://graphicslab.org/blog This is the Graphicslab's blog en-us Wed, 22 May 2013 05:38:32 GMT Wed, 22 May 2013 05:38:32 GMT ale@graphicslab.org ale@graphicslab.org a.l.e http://graphicslab.org/blog/Grafiklabor-Scribus-New-Scripter-Script Grafiklabor: The first Script ![CDATA[Grafiklabor]]![CDATA[ Scribus]]![CDATA[ Script]] Sun, 06 Jan 2013 20:00:00 GMT Four brave scripters in Zurich, one in Rennes and one chatting from home have spent their Sunday afternoon by trying to write the first script with the Scribus new Scripter.

The goals was to port the Calendar script to the new API.

The results are mixed: while we still don't have a new Calendar script, we have learned a lot of things:

  • We could create a script that launches a dialog created with Qt Designer.
  • We have created a github repository where we can continue to work on the script
  • Short after the end of the workshop I've found a big error we made and could get the Scripter to create a new document, which was our first step.
  • But, the error messages the Scripter is returning are not easy to understand, the output is way too verbose and the window where they're shown cannot be resized!
  • Also, there is no shortcut to re-launch the last script
  • The warning about the includes being "unsafe" is disturbing. If there should be such a warning, then it should only be shown once per script (and user) not on each launch.

And there are also a few smaller issues we faced: - We could only load an .ui file by entering it's full path, not it's path relative to the running script - We could not find a way to query Python or the Scripter for the path of the current script. - It's not possible to copy paste the errors from the Python console in Scribus - The "Dialogs" API is not documented - Scripter.dialogs.newDocument is not callable as a function. - There seems to be no way to create a new paragraph style - There seems to be no way to query the current unit (cm, mm, ...) and set a specific one - There are no constants for expressing the units (Scripter.UNIT_POINTS)

Voilà, the work on the scripter is not over! I've created a "scripter" repository on the Scribus git server and I'm working to program all the commands needed for the calendar script.

]]>
a.l.e http://graphicslab.org/blog/ Grafiklabor on January 6th 2013: Scribus Scripting with Python ![CDATA[Scribus]] Sat, 01 Jan 2011 23:00:00 GMT Scribus Scripting with Python

Sunday, January 6th 2013
14:00 - 18:00

Grafiklabor, Zurich
Creativ Design, Rennes
+ Online participation

One of the nice features of Scribus, is that you can write simple Python scripts and create new features or automate repetitive tasks.

During this workshop we will discover the new Scripter engine Henning and Jain have been working on, over the last few years. It is now part of Scribus 1.5.0svn and it will be the default Scripter engine shipped with Scribus 1.6.

We will first have a look at the concepts behind the Scripter and find the main differences with the current Engine.

In a second step we will take the existing Calendar script - which is distributed with Scribus -, rewrite it to use the new Scripter and publish it in the Scribus Wiki. Depending on the number of participants we will work all together by using a collaborative text editor or split the script in tasks and define small groups working on each tasks.

If there is some time left, we will learn how to add new commands to the new Scripter.

We will keep a log of the workshop and publish our notes on the new Scripter as a blog article.

The Workshop will be both a real life event at Grafiklabor, Dock 18 in Zurich, Switzerland and at Creativ Design in Rennes, France. You will also be able to attend as an online participant.

All you need is:

  • a computer with Linux installed
  • Scribus 1.5.0svn with the new Scripter
    • compiled with the following cmake parameters: cmake -DCMAKEINSTALLPREFIX:PATH=/home/yourname/bin/scribus -DWANTDEBUG=1 -DWANTSCRIPTER2=1 -DWANTGUILANG="en_GB;de;fr;it;en" ..
    • if it can help, we can provide a PPA that you can install in Ubuntu and Linux Mint.

At both venues, we will provide laptops with the needed software installed.

To help us with organizing, you're invited to register at

http://doodle.com/ei6xc5euy3un5p8g

]]>
a.l.e http://graphicslab.org/blog/Grafiklabor-Programm-Winter-2012-2013 Grafiklabor: Programm im Winter 2012/13 ![CDATA[Grafiklabor]] Sat, 06 Oct 2012 22:00:00 GMT Sonntag treffen wir uns wieder im Dock 18 und beschäftigen uns mit Scribus und der Gestaltung von Zeitschriften, Newslettern und Vereinsblättern.

Wir werden unsere Erfahrung austauschen und dann fassen wir unsere Gedanken einerseits in einem "prägnanten" How-To und anderseits in einer Feature-(Wunsch)Liste zusammen.

Bis am Sonntag ab 14 Uhr im Dock 18!

Hier noch das Programm für's Winter 2012/13:

7.10.2012 Mini booksprint: Zeitschriftgestalten mit Scribus

4.11.2012 Übersetzungssprint: Einführung in Gimp aus dem Französischen übersetzen

2.12.2012 Freiegrafiksoftware: Überblick und Installparty

6.1.2012 Public Domain Jam

3.02.2012 Einsatz freier Grafiksoftware im Unterricht

]]>
a.l.e http://graphicslab.org/blog/ Compiling a Scribus Git branch ![CDATA[Scribus]] Wed, 05 Sep 2012 13:00:00 GMT A few weeks ago, Anil announced on the mailing list that he has worked on Pierre's code and got indic scripts to work with the current code. Since then, lot of people have been asking how to get the code and test it. This is a good chance to write a short article explaining how to compile Scribus, for people that only want to test it and not contribute code!

If you want to follow the steps described in this article you will need: - a recent Ubuntu or Debian testing, - at least 1 GB of RAM - 3 GB of free hard disk space - a multicore processor - basic knowledge about the terminal (cd, mkdir, rm, ls, pwd, ...)

In the future, I plan other articles for other distributions and even on compiling Scribus without having to touch the terminal... but let's start with this one!

Finally, if you need help, just drop in our IRC channel and yuo will find somebody to hold your hand: irc://irc.freenode.net or http://wiki.scribus.net/canvas/Special:WebChat .

The steps you will go through

Let's first summarize what you will need to do: - getting all the software and libraries needed to compile Scribus, - getting the Scribus source code, - compiling Scribus, - running the development version of Scribus.

Getting all you need

The Linux distributions provide everything you need to compile new software, but often it is not installed by default. You will need: - a compiler (gcc) and the make tools, - the Qt development tools, - the header files that describe how Scribus can use the external libraries it needs, - git to check out the Scribus code.

Linux knows what software can be installed by looking at the content of repositories. In Debian and Ubuntu this list is located in the file /etc/apt/sources.list. The first step is to make sure that you the source packages are included: - On Debian make sure that you have a line like deb-src http://ftp.ch.debian.org/debian/ wheezy main non-free contrib in your /etc/apt/sources.list . In order to make sure that all the repositories are up to date you should update the list of avalaible software by

$ sudo apt-get update
- On Ubuntu start the "Software sources" application and make sure that in the "Ubuntu Software" tab has the check box for "Source Code" checked. You can find more help on adding repositories in the Ubuntu help pages: https://help.ubuntu.com/community/Repositories/Ubuntu . When closing the window, don't forget to click on the "Reload" button and update the list of avalaible software.

It's now time to add all the software needed to compile Scribus. Open a terminal and run:

$ sudo apt-get build-dep scribus
This will ask you for your password and then install everything Scribus 1.4 (the Scribus version that Ubuntu and Debian are providing) needs to be compiled.

Since you will be compiling Scribus 1.5.x There are a few libraries that are new and that you will have to install, too:

$ sudo apt-get install libqtwebkit4 libqtwebkit-dev
$ sudo apt-get install libicu48 libicu-dev
$ sudo apt-get install libcairo2-dev
$ sudo apt-get install libpoppler-private-dev
$ sudo apt-get install git

Prepare your directories

You will need a directory where you will put the Scribus source code and, on the other side, one where the binaries will be installed.

In your home, create the two directories: - "Source" where the source code will reside, - "Bin" where Scribus 1.5.x will be installed.

Getting the code

The Scribus contributors are using a git server to share their work. Each new feature is located in its own branch and can be tested separately. While only people having already provided patches can write to it, everybody can download, read and compile the code.

In order to get the code: - open a terminal and make sure that your in your home - go into the "Source" directory - get the Scribus code and put it into the "scribus" directory:

$ cd Source/
$ git clone git://git.scribus.net/scribus.git scribus
$ cd scribus/

If you want to activate the "indic" branch you will have to check it out:

$ git checkout indic

Compiling Scribus

First, you will have to make sure that you are in the ~/Source/scribus/Scribus/ directory in a terminal.

Your second step is to create a build/ directory where all the temporary files generated during the compilation will be written and cd into it

$ mkdir build/
$ cd build/

Now that you're in the build/ directory you can launch the program that will make sure that everything needed for the compilation is there and will prepare all the settings for the compilation:

$ # Warning: in the line below some some of the underline signs are missing.
  #Please have a look at the same line at the bottom of this article to see the real parameters.
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/Bin/scribus -DWANTDEBUG=1 -DWANTNOOSG=1 -DWANTPRIVATECAIRO=0 ..

If you get any error, please come and ask us in our IRC channel! And don't forget the two dots at the end of the cmake command!

Now that everything is ready, compiling Scribus is just a very simple step:

$ make -j4
Where "-j4" will try to use up to 4 processors or threads in parallel and massively speed up the compilation.

After some time, between 10 minutes and one and a half hour depending on the CPUs available, Scribus will be compiled!

Once make is done, you can install Scribus in ~/Bin/scribus/:

$ make install

If everything worked well, you can now launch Scribus with the command:

$ ~/Bin/scribus/bin/scribus

You can create a link to it on your desktop or in your programs bar.

And if something didn't workout correctly, we are all there in the IRC channel (irc://irc.freenode.net or http://wiki.scribus.net/canvas/Special:WebChat) to give you hints on how to sort everything out!

TL;DR

If all this is too long to read, here is just the list of commands you need:

$ # make sure that the source repositories are in your sources.list
$ cat /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get build-dep scribus
$ sudo apt-get install libqtwebkit4 libqtwebkit-dev
$ sudo apt-get install libicu48 libicu-dev
$ sudo apt-get install libcairo2-dev
$ sudo apt-get install git
$ cd
$ mkdir Bin
$ mkdir Source
$ cd Source/
$ git clone git://git.scribus.net/scribus.git scribus
$ cd scribus/
$ git checkout indic
$ cd Scribus/
$ mkdir build/
$ cd build/
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/Bin/scribus -DWANT_DEBUG=1 -DWANT_NOOSG=1 -DWANT_PRIVATE_CAIRO=0 ..
$ make -j4
$ make install
$ ~/Bin/scribus/bin/scribus

That's all folks!

]]>
a.l.e http://graphicslab.org/blog/ My personal roadmap for Scribus 1.6 ![CDATA[Scribus]] Mon, 06 Aug 2012 14:00:00 GMT Scribus 1.5svn: a we're working hard...

Recently, I've been asked several times, what the plans are for the release of Scribus 1.6. While I'm not aware of a detailed roadmap, I feel that there is a tacit consensus on two goals:

  • start the stabilization phase around the beginnings of automn 2012 and release Scribus 1.6 at some time in spring 2013.
  • get some more usability and productivity improvements into Scribus 1.6

This been said, here is a features list that I -- from a UI and productivity point of view -- wish, that could make it into Scribus 1.5svn before it gets into the stabilization phase:

  • one single status bar (I'm working on it)
  • split of the Properties palette in Content and Frame palette (Jean is working on it)
  • get the Content and Frame palette to be context sensitive (Jean is working on it)
  • work on the UI/UX aspects of the new palettes (can partially be done during the stabilization phase)
  • create guides based on the selected element (a script?)
  • make the search dialog non modal
  • replacing text in the whole document (Cezary is working on it)
  • footnotes (Cezary has almost finished the work)
  • style based table of contents (Cezary is working on it)
  • complete the undo (Pierrick has been working hard on it)
  • complete the new Scripter (Jain is working on it)
  • variable text markers (date, document title, ...; Cezary is working on it)
  • keyboard shortcuts for styles (Cezary is working on it)
  • a smart hyphen at the beginning of the word should avoid its hyphenation (Cezary is working on it)
  • support character styles when importing text
  • keep basic formatting (italics, subscripts and superscript...) for text imorted from .odt and .html files
  • recognize italic and bold as such
  • export to epub (I'm working on it)
  • a better handling of click through the layers (I'm working on it)
  • partially clean up the toolbars (Claudia is working on a proposal)
  • a more consistent (and pleasant?) icons set (Vladimir is working on it)
  • import PDFs into the current file and avoid opening them as a file
  • protect the guides from the master page from being edited on the page
  • right clicking on the overflow box should show a context menu
  • option to "remove the overflowing text"
  • (items below added, or promoted from 1.8, on September 26)
  • a solution for simple imposition (Jos is working on it)
  • support for indic languages (Anil is working on it)
  • bullet lists (Cezary is working on it)
  • shortcuts for styles (Cezary has made a patch)

Lot of thinkgs to be done in the next two months! But most of the features described above are already quite advanced, so I still hope that my dreams come true!

While compiling the list above I had lot of ideas floating in my head, and -- for sure -- not all could fit in. So here some ideas about I would like to see in Scribus 1.8, if they don't magically make it into 1.6:

  • clean up the toolbars
  • unified ressource manager (styles, colors, fonts ...)
  • unified transform tool (size, rotation ...)
  • unified content loader (Pierrick is working on it)
  • new UI and interaction for editing the shape
  • improvements to the Preflight verifier
  • a more logical palette of colors (choosing among RGB and CMYK as a default for the document)
  • more work on the concept of master pages
  • frame styles and other types of styles
  • better support for the typographic grid (allow the descender to extend outside of the frame; calculation based on the margins and the baseline grid)
  • finish the work on the new text layout (ScribusOIF branch...)
  • an interface for managing the typographic color
  • create an info panel
  • allow layers to be local to a (master) page
  • links as text and frame properties
  • apply formatting on several selected items
  • adding a path for fonts in the preferences should load the fonts without needing a scribus restart
  • attach font directories to documents (optionally relative paths)
  • allow relative paths for external ressources (images, fonts; probably with a contraint that they must be in or under the directory containing the .sla)
  • check if the (improved) fancy gimp input/slider box can and/or should be ported to scribus
  • headless scribus
  • more granular display refreshing and multithreading
  • better, on canvas, editing of path's nodes
  • align and distribute for nodes

After having compiled this list, I've also been asked what bothers me most when working with Scribus and I would see being fixed in 1.6. Here is my personal "egoistic" list:

  • guides on master pages should not be editable on the page
  • a style palette with non modal "editors" (but i'm not sure we should do it for 1.6)
  • finishing the pdf import
  • getting the experimental tag away from the PDF embedding
  • complete the new scripter
  • and fixing the importing of italics, sup and sub.

Finally, since I've started compiling this list, slightly more than a month ago, several things have improved in Scribus and not all of my requests still match the reality... But this will be discussed in future articles!

]]>
a.l.e http://graphicslab.org/blog/Grafiklabor-am-5-August-2012-Grillieren-im-Garten Grafiklabor am 5. August 2012 > Grillieren im Garten ![CDATA[Grafiklabor]] Thu, 26 Jul 2012 10:30:00 GMT Wenn das Wetter stimmt: Dieses Mal wird's wirklich einen Outdoor-Labor sein!

Wir treffen uns

am Sonntag 5. August
ab 14 Uhr
bei Ale im Garten
an der Spatenstrasse 23
in Zürich

und grillieren zusammen.

Mit dem Grafiklabor im Garten grillieren

  • Freiwillige Anmeldung auf Doodle
  • Anfahrt
    • Velo: Klar, kein Problem!
    • ÖV: Zum Bahnhof Oerlikon mit dem Zug, Bus 61/62 Richtung Schwammendingerplatz bis Friedackerstrasse (oder mit den Trams 10 oder 14 bis Salersteig)
    • Meistens hat's viele freie Parkplätze vor der Türe
  • Mitbringen: Etwas zum Essen und/oder zum Teilen (bei Gelegenheit in den Notes auf Doodle angeben, damit am Ende nicht alle das Gleiche teilen möchten...)
  • Ein paar Dinge zum Besprechen: Wie sollen wir mit dem Grafiklabor im Herbst weitermachen?
    • Einerseits: Möchte jemand ein Thema im Grafiklabor präsentieren?
    • Anderseits: Mir ist aufgefallen, dass im (sehr)Grossraum Zürich fast mehr Entwickler wie Benutzer wohnen:
    • Sollen wir Workshops organisieren, die direkt die Entwickler ansprechen?
    • Welche Themen würden euch interessieren? (Programmierung? Grafik? Projektmanagement? ... ?)

Ich wünsche euch noch ein paar heisse Tage!

a.l.e

P.S.: Falls es regnet, hat es genug Platz in unserer Stube.

]]>