Monday, February 25, 2008

PDF Viewer

Vindaloo is a PDF viewer. It is currently maintained by Étoilé Project. If you download the whole Étoilé project as in previous article, you can install the IconKit, PopplerKit and Vindaloo under subdirectory Etoile/Frameworks/IconKit, Etoile/Frameworks/PopplerKit and Etoile/Services/User/Vindaloo respectively. PopplerKit depends on poppler library for PDF rendering.

Vindaloo-1

Vindaloo comes with basical functionality for a PDF viewer. You can zoom in and zoom out, fit page, width or height, and jump pages. The performance of going through pages are reasonablly good. Although you cannot select text for copy-and-paste, you can search text and the found ones will be rendered with light yellow background. That's pretty much all it does for now.

Another application to preview PDF is Yap. It is more like a previewer before you print the documents. It uses a2ps to generate PostScript, therefore, you can use it on many formats as long as a2ps supports, including most source codes, html, even LaTeX. You can also view images, but the only way to scale is to use menu 'Resolution' to do limited scaling. An interesting function is that if you select an area of image, that part of image will be automatically copied into pasteboard. Then you can paste it into other applications. You can also use menu 'File > Save pasteboard as TIFF' to save it directly.

Yap-1

For formats other than images, it uses GhostScript for rendering. For the first time, you should use menu 'Info > Preferences' to set the external tools. Click button Defaults should work for most of people. Use Set to save the preferences. Once you open a PDF document, it shows a row of radio buttons on the top as pages. You can use menu 'Resolution' to adjust scale for viewing. If you have any problem with Yap, it is mostly caused by wrong parameters in a2ps. You can look at your terminal emulator and find the command like this

/usr/bin/a2ps ("--portrait", "--rows=2", "--columns=2", "-o", "-", "source_code.m")

These paramters, like portrait, rows, are the same as menu 'Options > Display'. You can either use menu 'Options > Reset' or go through each option to make sure none of them are enabled.



Previous articles in this series:

  • Gomoku and Localization in GNUstep
  • Font Manager and GNUstep Backend
  • System Preferences and Theme
  • Ink, a GNUstep text editor, and Services
  • Addresses, a contact manager
  • StepChat, TalkSoup, and Grouch
  • More on Services
  • Image Viewer and Editor

  • Thursday, February 21, 2008

    PRICE 0.8.2

    What are the news?
    - selectable method for greyscale conversion (rgb average and luminance of YCrCb)
    - image inversion for both color and greyscale images
    - in the GNUstep version an interface was corrected since it was corrupted and caused crashes

    Tuesday, February 19, 2008

    Image Viewer and Editor

    There are many image viewers for GNUstep. By default, GNUstep supports reading TIFF, GIF, PNG and JPEG formats and writing to TIFF. It also supports image scaling and transformation. So it is relatively easy to write a simple image viewer with GNUstep. Different backends may have slightly different results and performance.

    Preview supports these basic built-in functionalities from GNUstep. You can also drag image to move it around if the image is bigger than the window, though for me, it is quite slow if I do that. It is more usable just to drag the scrollbar. It is a document-based application. So you can view multiple images at the same time.

    PhotoClip is a single-image viewer and scales the image to fit the window by default. It supports image clipping and rotation by 90, 180 or 270 degree with jpegtran, which comes with libjpeg. You can easily view the previous and next image in the same directory. It is an idea application to go through your photo collection in the same directory, view them, do rotation and clipping, then save them.



    PRICE is an image editor with many features. It not only allows you to scale and crop images, but also adjust brightness and contrast, even apply filters, do convolution and Fourier transformation, and trace edge ! While it does not offer preview on some of these filters, it does support undo and redo as a temporary solution. It seems to have issues with image containing alpha layer, but works quite well with the rest. I also have troubles using the convolution, which is the basis of many filters. All these features can be found in manual. Some of these features may require knowledges of image processing, but it is definitely an application with quality and worth to look.

    Cenon is a professional application for vector graphics and desktop publishing (DTP). It can import many formats including PDF and Adobe Illustrator, then export to Cenon, EPS, or DXF (Drawing Interchange Format) format. You can have layers, draw shapes and Bezier paths, add text and paragraph, do text on paths, align objects and do transformation, fill objects with colours or gradients, vectorize pixel images, etc. There are so many features that I would suggest you to read the manual first.

    Cenon

    You need to download Cenon and CenonLibrary, then follow the INSTALL to install it. It is not updated to use GNUstep Makefiles Package 2.0 yet, so there are some warnings during compilation. I still have some random crashes from time to time, but in general, it is quite pleasant to use. Just remember to save frequently. It also supports multiple undo and redo.



    Previous articles in this series:

  • Gomoku and Localization in GNUstep
  • Font Manager and GNUstep Backend
  • System Preferences and Theme
  • Ink, a GNUstep text editor, and Services
  • Addresses, a contact manager
  • StepChat, TalkSoup, and Grouch
  • More on Services

  • Tuesday, February 12, 2008

    More on Services

    In previous article, we introduce Services. This time, we will show some more applications which supports services.

    Affiche-1

    Affiche is a sticky-note application.

    Affiche-2

    You can create notes in different colours, change fonts on text and set titles. Notes with titles will show up in menu Windows. These settings can be applied globally in preferences or individually. Text can be imported and exported.

    Affiche-3

    Once Affiche is installed, you can use service to create new note from any application with text view. In this case, select text in Ink, choose menu 'Services > Affiche > Make Note'. If Affiche is not running, it will launch automatically and make a new note based on selected text. It shows how convenient services are.

    DictionaryReader is another good example. If you downloaded Étoilé project before, it is under Etoile/Services/User/DictionaryReader/.

    DictionaryReader

    It looks up definition with DICT protocol. Although it supports local dictionaries, I had hard time to find a good one. So it may be wise to use the remote servers, which is the default setting. It also provides a service to look up definition of selected text in any application with text view.

    For advanced users, I wrote a small application to use Unix scripts as services. It is inspired by Terminal. Unfortunately, Terminal is not maintained for a long time and does not compile with latest GNUstep. For developers, it is quite easy to fix. You can get ScriptServices by

    svn co http://svn.gna.org/svn/etoile/branches/yjchen/ScriptServices ScriptServices

    After installation, you need to run `openapp ScriptServices --update` to update services. You have to do that every time you install new scripts as services. Once services are updated, you should be able to see a Calculate service in Services menu. It calculates your selection with Unix bc and return the result. There are some useful scripts in Examples subdirectory. You just need to copy them to ~/GNUstep/Library/ApplicationSupport/ScriptService/ and run `openapp ScriptServices --update`. For more dtails, see README of ScriptServices.

    ScriptServices is far from perfect. But it makes a point that you can reuse many Unix tools from GNUstep through services. It opens doors for countless applications.



    Previous articles in this series:

  • Gomoku and Localization in GNUstep
  • Font Manager and GNUstep Backend
  • System Preferences and Theme
  • Ink, a GNUstep text editor, and Services
  • Addresses, a contact manager
  • StepChat, TalkSoup, and Grouch

  • Friday, February 08, 2008

    SimpleWebKit Status

    This is the latest status of SimpleWebKit.

    HTML

  • Loading: 99% (NSURLConnection -> parser)
  • Parser: 99% (HTML 4.0 -> DOM Tree)
  • Evaluator: 90% (DOM Tree -> NSAttributedString)

    EcmaScript

  • Loading: 100% (handling <script> and <script src="">)
  • Parser: 90% (not well tested for completeness and robustness)
  • Evaluator: 50%
  • Objects: 0%

    CSS

  • Loading: 100% (handling <style> and <tag style="">)
  • Parser: 0%
  • Evaluator: 0%

    WebView, WebFrame, ...

  • Basics: 100% (interworking of all these classes)
  • Advanced: 70% (not completely working are Forms & Frames)
  • Editing: 0% (not intended)

    For people who know nothing about SimpleWebKit, you can find the official website, news and discussion here and there.
  • Thursday, February 07, 2008

    StepChat, TalkSoup, and Grouch

    StepChat is an instant messenger using Jabber Protocol (or called XMPP). Jabber Protocol is an open source project. Both Google Talk and Apple iChat support it. If you have a Google account, you have a Jabber ID already. StepChat is a part of Étoilé Project. It requires Addresses on GNUstep. It can also run on Mac OS X. To avoid any complication, I suggest you to download the whole Étoilé, which is easier to work with:

    svn co http://svn.gna.org/svn/etoile/trunk/Etoile Etoile

    We need a patched Addresses. Go to Etoile/Frameworks/AddressesKit and install it with `make; sudo make install`.

    Now, you should be able to install StepChat under Etoile/Services/User/Jabber.

    For the first time, it will ask your Jabber ID, server, then password.

    StepChat-1

    It automatically adds the Jabber ID into your contact in the address book. If you didn't set Me in the address book, it will create one for you. You can also check the saved server and password in user defaults:

    defaults read StepChat

    If you input wrong information the first time, StepChat won't let you change it. When that happens, you can fix it by

    1. Manually add your Jabber ID in address book. Cycle through the options of instant messenger for Jabber once ID is input. Remember to set Me with menu "Person > This is me" in AddressManager.

    2. Do `defaults delete StepChat XMPPPasswords` to remove saved password

    3. Manually set server by `defaults write StepChat Servers '{"user@gmail.com" = talk.google.com}'`

    4. Note that user@gmail.com should be your Jabber ID and talk.google.com should be your Jabber server.

    Since password is deleted, StepChat will ask you again the next you run it.

    StepChat-2

    StepChat is a standard Jabber client you can expect. You can add more buddies, change status and have chats with many people. There are also some new features like XHTML-IM and vCard support. The text field on the top allows you to input something to be seen by your buddies.

    StepChat has a XMPP framework underneath. It might be useful for other applications to take an advantage of it.

    TalkSoup is an IRC client. During the installation, it may put bundles under root directory as /Library/ApplicationSupport. You need to move the content of it into your GNUstep/Local/Library/ApplicationSupport. Once you can start TalkSoup, choose menu 'Connection > Open Server List...'.

    TalkSoup-1

    You can select FreeNode > irc.freenode.net, click Connect button, then you will be connected to the server. To join GNUstep channel on FreeNode, type `/join GNUstep`:

    TalkSoup-2

    Then the GNUstep channel will show on a new tab. Now, you can talk to people and get your questions answered. For more about IRC, you can read this tutorial. TalkSoup uses plugins to expand its functionality. You can include more functions with its preferences (menu Info > Preferences):

    TalkSoup-3

    Just drag-and-drop plugins between Loaded and Availabe. Each plugin has detailed description and explanation on how to use it.

    For AIM and ICQ users, there is a Grouch. I don't have an AIM account. So I will just show you a screenshot:





    Previous articles in this series:

  • Gomoku and Localization in GNUstep
  • Font Manager and GNUstep Backend
  • System Preferences and Theme
  • Ink, a GNUstep text editor, and Services
  • Addresses, a contact manager

  • Tuesday, February 05, 2008

    Étoilé Spring Hackathon

    David Chisnall announce:


    Hi Everyone,

    The Computer Science Department here in Swansea has agreed to allow us the use of a room for a hackathon over Easter.

    The date is provisionally the 31st of March to the 3rd of April (let me know if this is a major problem for anyone, and we can try to reschedule).

    The Swansea University campus is situated a short distance from the city centre, between a park and the sea. There are a few nice pubs (including one with real ale and free WiFi) within walking distance, and some nice scenery to explore when people are bored with staring at screens.

    There are direct busses and trains from London airports (trains around £25 in advance or very expensive close to the time, bus around £40) and a number of cheap B&Bs within ten-fifteen minutes walk of the campus.

    Étoilé and GNUstep developers of all levels of experience are welcome. If anyone would be interested in giving a public talk during the hackathon, let me know and I'll organise some publicity.

    David

    Sunday, February 03, 2008

    Addresses, a contact manager

    Addresses is inspired by Apple's Address Book. For regular users, you can use it to organize your contacts locally. Addresses is also used by GNUMail and StepChat, which we will talk about some time later.

    Addresses-1

    Everything is self-explained. Choose menu "Person > New" to add new person. The plus (+) button on the bottom is a faster way to add group and person. Use button "Edit" to switch between viewing and editing. You can put name, address, phone number, etc. To change a field, say Main Phone to Work Phone, you have to input the phone number first and hit Enter key, then choose the small icon next to the field to cycle through the options. You can also use the small plus and minus icon to add or remove fields. Click on the question mark to add a photo for that person. Contacts can be grouped by drag-and-drop. You can import and export contacts in vCard format, which are used by most of contact managers for data exchange. In the preferences (use menu 'Info > Preferences'), you can decide how to display people's name and address according to the custom of each country.

    Addresses has many potentials to be a great application. It is written to be extendable with plugins. The search functionality is in the Addresses framework already. Developers just need to add the user interface in AddressManager. There is a LDAPAddressBook in subdirectory Goodies to access information on LDAP server. It can potentially allow users to exchange information, even with ZeroConf support in GNUstep.



    Previous articles in this series:

  • Gomoku and Localization in GNUstep
  • Font Manager and GNUstep Backend
  • System Preferences and Theme
  • Ink, a GNUstep text editor, and Services