The L&L Blog

Iron, Lion, Zion

Scrivener

Iron, Lion, Zion

KB / 21 OCT 2010

(The title of this post literally has no relevance except that it has "Lion" in the title.)

READ MORE
PlainText for the iPad and Scrivener 2.0...

Scrivener

PlainText for the iPad and Scrivener 2.0...

KB / 28 SEP 2010

Jesse from Hog Bay Software (who created WriteRoom and TaskPaper) informs me that PlainText for the iPad and iPhone is now available (for free) from the app store:

READ MORE
Scrivener 2.0 and iPad Syncing with Simplenote

Scrivener

Scrivener 2.0 and iPad Syncing with Simplenote

KB / 26 SEP 2010

David has posted a sneak-peek preview of Scrivener 2.0's syncing with Simplenote for the iPad:

READ MORE
Scrivener 2.0 - Coming Soon (No, Really)

Scrivener

Scrivener 2.0 - Coming Soon (No, Really)

KB / 13 SEP 2010

In my last blog post, I talked about all the things that weren’t coming in Scrivener 2.0. Now it’s time to talk about some of the goodies that are coming. Right upfront I ought to say that the focus has been very much on improving Scrivener’s existing feature-set by better integrating various aspects of the interface and making Scrivener easier and more pleasurable to use in general. I always think very carefully before adding new features - it’s impossible to please everybody because every user has something different on his or her wish list, and if you try you just end up with software that is bloated and difficult to use. So, I make no apology for concentrating on the core features rather than trying to shoehorn in features I don’t think belong. And yes, that’s my way of saying that you won’t find anything particularly whizz-bang in this list - but you should see a solid set of features that you will find useful in the endeavour for which Scrivener was designed: writing.

READ MORE
What You Won’t Find in Scrivener 2.0

Scrivener

What You Won’t Find in Scrivener 2.0

KB / 12 AUG 2010

Earlier this week I completed the last major block of code for Scrivener 2.0 - at last. Now all that remains is a number of small issues and tweaks and then two months of beta-testing and bug-fixing before the release in October (barring any major catastrophes or problems that crop up during beta-testing).

READ MORE
How Big is Your Code Base?

Scrivener

How Big is Your Code Base?

KB / 20 MAR 2010

This morning someone asked me how big Scrivener’s code base is, and I didn’t know how to answer - yet it’s something I’ve been wondering myself. It comes up occasionally, usually in two situations: 1) Someone writes to me wanting to know how much code it took to create Scrivener, because they have an idea for a program and wonder what’s involved; 2) Someone is insisting that I could port Scrivener to platform X or “just add” Y “easily enough” and is getting uppity that I’ve said no, so I want to puff out my chest and huff, “Look, I have written six billion lines of code mostly unique to the Mac platform and I’ve already got grey in my hair - coding Scrivener ain’t like dusting crops, kid!” (These exchanges usually end with me apologising for something.)

READ MORE
Coding XML Formats in Cocoa

Scrivener

Coding XML Formats in Cocoa

KB / 5 FEB 2010

I’ve long been intending to add some technical, coding-related content to this blog. I’ve always admired the blogs of other developers who share some of the coding problems they have faced and solutions they have reached, and in developing Scrivener there are a number of issues that I’ve come across and found solutions for that I’m sure could be useful to other developers. So, this is the first more techie, coding-orientated post to make it to the blog. Those with no interest in Cocoa development, look away now. I have recently been rewriting Scrivener’s file format. As you may or may not know, .scriv files are packages – essentially folders that on OS X just look like, and are treated the same as, files. Were you to move a .scriv file to a different platform, it would appear as a regular folder. On OS X, you can ctrl-click on a .scriv file in the Finder and select “Show Package Contents”. File packages are great for programs such as Scrivener. Regular files usually have to be loaded into the program’s memory in their entirety when loaded; with a file package, the program can just look inside it and open whatever it needs as and when it needs it. Given that Scrivener can import movie, sound, PDF and image files, you can imagine how much memory might get eaten up if it had to load everything into memory right from the get-go. Instead, with its package format, it can just load the binder structure file and then load up each document as you select it in the binder, and flush from memory any large files that aren’t currently being used. For Scrivener 2.0, .scriv files will still be file packages, but I’ve been doing some work on the format of the files inside the .scriv file. Currently all text files are saved internally as RTFD files (RTFD stands for “rich text format directory”). RTF files are a standard rich text format that can be opened on all major platforms (they are essentially plain text files with formatting mark-up), and were designed by Microsoft; RTF files support pretty much everything that Word documents do. RTFD is Apple’s extension of this format. An RTFD file is a file package in itself (as with .scriv files, you can ctrl-click on them in the Finder and select “Show Package Contents” – you will find a TXT.rtf file inside there, for instance, which holds the actual text). Apple designed the format so that such files could also hold QuickTime files and any other file type; but the trouble is that RTFD files can only be opened on Macs. Most of the other files inside .scriv packages use the Apple .plist format – I may have given some of them the .xml extension (.plist files are technically XML files), but internally they are just Apple .plists. (.plist stands for “property list”). This format for Scrivener files was generally a great and solid 1.x file format. It works, and it doesn’t take too much code to maintain on my part – the Cocoa frameworks make it very easy to write to RTFD and PLIST formats. However, for 2.0 I wanted to make Scrivener’s format less platform-specific. The current format has two main flaws: 1) Its use of .plist and .rtfd files means it’s a format that can only be read on the Mac. Although I personally have no plans to switch to or code for other platforms, this would be a significant hurdle for anyone we wanted to work with to port Scrivener to, say, Windows. 2) The .plist format is not human-readable – at least, not when used with the sort of data that Scrivener has to write out. This makes it difficult for anyone on any platform, including the Mac, to write utilities that might work with the Scrivener format. For these reasons, I am in the process of making the following changes to the .scriv package format: 1) The .scriv package will no longer contain all files in the root folder. Instead, subdirectories will be used to make it easier to navigate. That way, should it be ported to a different platform that doesn’t support packages, it will be easy for the user to find the file required to open the project. And in general it’s just neater, of course. 2) I will no longer use the RTFD format and will switch to using RTF instead. The only reason I didn’t use RTF to begin with was that Apple’s standard RTF reader and writer – the one provided in the Cocoa frameworks – ignores images. That is, it fails to load or save images in the text. Over the years this is something I’ve fixed myself, though, so I use a modified version of the RTF reader/writer to save and load RTF files that retain images with no problems. This not only means that all the text files stored inside a .scriv file are now platform-independent, but also that they are using a file format that has been around for over twenty years. It’s also a format that can be opened in a plain-text reader. 3) Instead of using .plist files, I am creating my own XML file formats where applicable. (There are other changes too – for instance I am now using a checksum file that can tell which files have been changed since the last session; this means that should Scrivener crash, you will no longer be faced with the time-consuming “Synchronising…” panel, as Scrivener will be able to update only the search indexes for the files that have changed rather than going through every single file in the project.) Needless to say, writing my own XML file formats is the most time-intensive part of this process. Fortunately, Cocoa has some excellent and easy-to-use classes for generating and reading XML – the NSXML… classes. For instance, suppose I wanted to create the following XML:

READ MORE
The iPad and Mac Development

Scrivener

The iPad and Mac Development

KB / 1 FEB 2010

So. The iPad. (You may have heard of it. It’s a neat little gadget Apple released last week without much fanfare.) There are commentators out there declaring it the world’s most expensive Etch-a-Sketch (unfair; it has no stylus), and others praising it as being as “magical” and “revolutionary” as Steve Jobs and Jonathan Ive would have us believe. My own opinion on the device is somewhat schizophrenic (in the colloquial sense, obviously). I’m split between my thoughts as a user and my thoughts as a Mac developer.

READ MORE
Final Draft 8

Scrivener

Final Draft 8

KB / 30 JUN 2009

For all those scriptwriters out there, and for all those who don’t already know, Final Draft 8 was finally released not long ago. Final Draft is, of course, the industry standard of scriptwriting programs, and version 8 brings with it a raft of new features and an overhaul to the interface that makes it feel much more like a native Mac app than previous versions. I won’t go into the various new features - navigator, improved index card navigation, new interface, and so on - here; instead, I just thought I’d say a few words about Final Draft’s relationship with Scrivener.

READ MORE

Keep up to date