Adding redirects with a regex using redirection plugin

Our second book is called A Leaf in a Gale by Susan Capindale. The book printing has the URL http://www.lifesignpress.com/capindale/ though we haven’t got that site ready yet until she produces the next book. For the moment we’re redirecting that to the first book URL i.e.  http://www.lifesignpress.com/aleafinagale/

To do this we’ve used the Redirection plugin and enabled it on the main site i.e. lifesignpress.com (not network enabled). Get this plugin here – http://wordpress.org/extend/plugins/redirection/

Simply upload the redirection directory contents to your /wp-content/plugins subdirectory via FTP and then enable the plugin (just the main site) and then go into the Settings for the plugin.

We initially added redirects from URL such as  /capindale and /capindale/ and to the URL of /aleafinagale/ but then I realised that we need to look at CAPital URLs.

OK so we need a regex only the redirection plugin doesn’t allow you to add regex options to ignore case. It just takes the string you supply and then puts that inside the regex (in it code it uses preg_match() and similar and uses the ‘@’ symbol as the regex delimiter) thus you cannot provide options that are outside of that regex. Thus I was doomed to create the following regex string for it to wrap inside the regex delimiters,

^/+(C|c)(A|a)(P|p)(I|i)(N|n)(D|d)(A|a)(L|l)(E|e)/*.*

and redirect that to the URL of /aleafinagale/

What does that regex match ?

  • The ^ means start
  • the /+ means one or more slashes
  • the (C|c)(A|a) etc means upper or lower case letter at that position for my word which I have spelt out
  • the /* after your letter sequence at the end means followed by none or more /
  • the .* at the end means followed by anything

so this will match /CAPINDALE//// or //capindale and anything in between that.  URLs are case sensitive though you would not usually think this with the way people write them in advertising (sure domain names are not sensitive but the resource on the host is case sensitive) but with Permalinks enabled then WordPress ends up being case sensitive and you could end up with 404 page not found errors.

Remember to check the [*] Regex flag.

 

Posted in Wordpress | Comments Off on Adding redirects with a regex using redirection plugin

Using Grisbi for agreement accounting.

We have an agreement with each joint-venture project signatory and we need to “profit”-share according to the agreement terms e.g. a 70:30, 60:40 or 50:50 split of earnings after cost of production, shipping and other cost of sale expenses. Given this is for a Print-on-demand book with very little stock-in-hand then this Just-In-Time system is accounted for on a cash basis. The signatories may use either cash or accrual basis for their own accounting for what agreement revenues they receive as “profit” – that is independent of this agreement.

To track this for our Doctor Antonio book project we’ve decided to use Grisbi rather than spreadsheets or a more complex double-entry accounting such as GNU Cash or an online ERP system. Grisbi is a simple cross-platform single-entry accounting system that is Open Source. We are running version 0.8.6 built from source. It is file-based, single user (it locks the file) so this allows us to email this as a stand-alone file to the other party to the agreement.

We created 3 different cash accounts for the products, one for each of USD, EUR and GBP currencies that we are working (we do have both incomes (credits) and expenses (debits) in these three so it starts getting complex very fast).

We also created 6 other cash accounts for agreement payouts which we’ll explain later.

We created the “Categories” (what Grisbi calls the Chart of Accounts) according to what the agreement allows (which has no personal or routine office-like expenses).

Invoices or cash payments for items are debits from each product account according to the currency and have the Payee as “cash” or “createspace” or similar common destination.

Royalties or cash receipts are credits to each account according to the currency and have the Payee as “cash” or some specific common source e.g. “Amazon Royalty Payments”.

We do not put any customer data (i.e. personal data) in this file for data protection reasons.

At the end of the month  each product cash account balance is split according to the agreement percentages. We track this payout process by doing a “transfer” (in Grisbi) from each of these three product cash accounts to one of the 6 Payment accounts that we have setup i.e. one of each of the three currencies for each of the agreement parties.

The agreement parties can now decide how they want to transfer monies between each party (to help reduce bank or Foreign Exchange charges) e.g. one party may keep the USD in exchange for the other party keeping a matching value in GBP or EUR so that we avoid paying bank charges and money transfer commissions, and each party can either leave the money in that payment account or cash it out.

To cash it out a debit is made against one special payee per currency per signatory which is for each agreement party to logically take the money out of the account in that currency.

Thus an agreement party can elect to only receive USD but hold it in the account until it hits a suitable large value to make it worthwhile based on bank charges, so we shuffle around the payouts as value matched transfers between the payout accounts (e.g. swap their GBP for our USD at a spot rate) and then at a suitable date charge a debit against that payout account to the special agreement payee in effect making money leave this set of accounts and giving it to the agreement party. They then account for this payment as they see fit in their own accounting system as a credit though note that deferring the payment on our agreement accounting system does not alter that once it is in the agreement payment account then the signatory has in effect had constructive receipt of this money from the point of view of their own tax returns for a particular tax year. Grisbi has a good reporting system that will allow a payee annual report to be run between any two dates and so allowing a report to be run for the differing tax and accounting years for the agreement signatories.

Managing trust with this: no accounting system will ever have any meaning if it can’t be trusted. By using Grisbi we can e-mail the Grisbi file to the other party.  If either party desires they could compare the invoices for how much product with the sales returns for products to see that credits are being posted correctly. With no personal expenses allowed there is little opportunity for skimming into the agreement profit.

For simplicity sake one party agrees to manage the accounts for the agreement though potentially both parties could do this in isolation using the same input data and then compare the results per month. As the Publisher then Life Sign Press will be doing the accounts as per this documented process.

We have noticed a few minor bugs whilst testing Grisbi so we will be posting these onto the Grisbi bug tracker.  The code seems to be mostly C and as we’ve had experience with debugging C for the GNOME Project Planner application it should be reasonably easy to advise the developers of the fixes.

Posted in Comment, Life Sign Press | Comments Off on Using Grisbi for agreement accounting.

Customs charges (US to Italy for Books via DHL).

Our first small shipment of 10 books arrived from Createspace via DHL (2 day service US to Italy) and we had to pay some extra fees when we picked this up. We have no complaints about these as this did not delay the shipment and was not unexpected.

The breakdown of charges is,

4% of item value as a Customs charges (USD is converted to Euro at some spot rate).
7.75 DHL Administrative fee
1.55 for the 20% IVA on the DHL Admin fee of 7.75

The customs charges are made up of IVA/VAT of 4% of the Euro price of the article. This is a special rate that Italy uses for books. This varies dramatically over Europe with mostly low values but can go up to the full TVA/IVA/VAT rates e.g. 25% for Denmark.

There is no import duties anywhere in Europe for books. Import duty is set equally across Europe with different rates on a per item basis (I think there are around 14,000 different item classifications) and decided by the EU every year. I don’t imagine that books will ever have duty on them. Excise taxes are extra taxes unique to a country usually used for high-value luxury items, alcohol or tobacco and I don’t know of any country in Europe that has excise duties for books.

As an administrative fee DHL add 7.75 Euro (plus they add IVA of 20% of that charge). As far as we can see this the minimum charge based on 2.5% of the shipment value. We believe that this minimum administrative charge varies by country and will go up with inflation over time.

Note that the IVA/VAT is not paid on the price you paid Createspace but about 25%  smaller value. This suggests that the difference is what is “retained” in the United States and is “detached” from the item FOB. When we receive some more shipments then we’ll be able to build up a more detailed pattern.

So overall physical books are rather simple to ship. The scare stories you hear about shipment of items bought overseas into Europe or Italy is because of the shear volume of rates about the actual duties and taxes that are payable so you would be rather foolish to just assume what any item will be. The pan-European duty rates will also potentially vary from year to year, plus VAT/IVA/TVA rates slowly change and excise duties alter too.

 

Posted in Comment, Shipping | Comments Off on Customs charges (US to Italy for Books via DHL).

Createspace combined shipping

When you are after rapid turn-around of proofs then for us in Europe we must use the fastest business shipping offered. So far we have been ordering 2 books per proof. Createspace provide 2 day service for about 32 dollars (for two copies ) or 43 dollars for 4 books (2 copies from two different books).

You can combine book orders so ideally you would be pipe-lining drafts with a final proof of one book being ordered with the first proof of the next book.

This workflow is an added cost of working with Createspace in the US but it isn’t going to change until there are equivalent featured Print-On-demand (POD) providers in Europe.

 

Posted in Comment, Createspace, Shipping | Comments Off on Createspace combined shipping

Stopping Createspace reviews – no can do.

It seems you can’t do this. If you have submitted a PDF file for review (pending printing as a draft) then, if you locally discover a problem with the file contents e.g. you notice that you forgot to embed a font or a I-must-kick-myself-grammar error, then you must wait for the existing job to complete before being able to upload your new PDF file for review.

Get it right first then upload for review !

 

Posted in Createspace, Preflight | Comments Off on Stopping Createspace reviews – no can do.

Book Cover # 2

I’ve just finished our second book cover. Whilst the first took some time the second took me only 1 day of actual work (and about 1 day of investigation work). The picture has been smudged to obscure the work-in-progress.

We’ve sent the book to the printers so we can get a draft. When it comes back in a few days time  and if it looks fine then I’ll document the tasks. Personally I’m really pleased about the design when viewed as a PDF, though we haven’t shown this to the author but I’m confident they’ll like the ideas I’ve expressed.

Highlights for this cover are:

  • Guides in both GIMP and Scribus are the Createspace template file that is specific for our book size and page count.
  • Added 2 other photos from our stock and snapped one extra for the “leaf” that is on the cover (picked a leaf and left it to dry to curl up). Scaled and added using different types of effects to merge. I ended up with 10 layers.
  • Boxes added to spine with 80% Normal (i.e. 20% transparency) to make the spine text more readable. You can’t easily use transparency with PDF 1.3 unless you flatten the image so it is easier to flatten in GIMP.
  • Three layers added in Scribus. One layer is the background (from GIMP image), one top layer is guide page and one middle layer is text boxes.
  • Three new fonts: one from Eduardo Recife (http://www.misprintedtype.com/v4/) and two from Dieter Steffmann (http://www.steffmann.de/ ) : these reflect the period and the content. We’re still investigating the usage rights for these fonts but for Dark and/or Gothic then these look very good. Our interior text remains as GaramondNo8 for readability.

I hope the dark black and red colours come through without problems from the printer because this should look awesome in the flesh.

Posted in Books, Design, GIMP, Scribus | Comments Off on Book Cover # 2

Our Open Mutual company blog

We’ve just commissioned a new server to run as the Open Mutual Limited web site and have started a company blog here at www.openmutual.org. It will be more generic technical and company musings rather than specific Life Sign Press technology and development topics.

Posted in Open Mutual Limited | Comments Off on Our Open Mutual company blog

Overcoming major bottlenecks in graphic editing

When going from draft to final you jump from editing small documents and image files to building up huge press-ready files. With most text documents this is not a issue but with images then these can quickly leap in size and your old desktop or laptop, which seemed quite fast for regular web based work, becomes unusable.

The hardest page to edit is the cover of a book. If you have commissioned an art work and have got it scanned at a print-shop then you’ll be the proud owner of a huge TIFF or PNG or similar scanned image of 600 or 1200 dpi so say 6000×4000 pixels or bigger. Equally, images from professional cameras will be a minimum of 12 Megapixels (4000×3000 pixels).

The edits you are doing are simple – cropping to get correct aspect ratio, removing rough edges from the scan, aligning the scan, removing artefacts or layering in other images, but operating on such large files then forget trying to do these kind of edits on your old laptop or desktops and forget including these size of files in image frames in Scribus. Unless your laptop is new with at least a dual core and 2 Gigabytes of memory then it will grind to a halt. We’re using GIMP 2.6 so it may be that other programs are more memory efficient and it may be that you think your file is small but memory use also grows with the undo history. If you are trying out ideas then having the ability to undo changes fast allows you to work better. So all programs need to be in real memory, not swapped out to disk.

So you can buy new laptops or upgrade laptop memory for everyone for this one short time they work on this book or you can try something else that is cheaper. This is what we did – we got a new single desktop-scale PC which we put in a good amount of memory and then anyone who wanted to edit large files used remote desktop to get into this new PC.

Nothing fancy: we used a regular desktop style CPU. You could buy an off-the-shelf PC (which would probably run Windows), or even cheaper you could make this yourself from retail parts and run a Linux distribution. Whatever parts you get you need a reasonable amount of memory, reasonable processor speed and lots of disk space.

You don’t need a fancy graphics card as fast graphics cards are only really useful for 3D games – the onboard graphics from the major providers (ATI/Nvidia) on new motherboards are perfectly fine for this kind of “server” use.

How much is a “reasonable” ?. Well this is a desktop class of machine so 4 Gigabytes works out as a reasonably good number to use if you are looking at 1 or two editors. On either Windows 7 or Ubuntu (desktop 10.10) this leaves around 3 Gigabytes for applications if the onboard graphics uses a few hundred megabytes. If you want to go above 4 Gigabytes then you need to either run Windows 64 bit or a GNU/Linux based 64 bit distribution.

What is a reasonable processor ? You will get very good value for money with the retail desktop processors from both Intel and AMD but for the moment the AMD processors offer the best value for money if you want to build your own. As you are intending this to be a multi-user machine then ideally you need a dual core processor. This means an Athlon II 2X or better though if you really want to try for the really low budget then the Sempron 140 processors can be unlocked on a suitable motherboard to give you two cores.

The type of processor and motherboard will drive your memory selection. You’ll find that old memory can usually be much more expensive than new memory for the larger memory sizes. If you are looking at say a 4 Gigabyte memory kit (2x2Gigabytes) then you need to look at DDR3 memory on a matching motherboard.

It wasn’t that long ago I loved to find old machines (“Trashware”) and carefully recover the machines from parts. This meant working with 10-40 gigabyte and similar sized PATA hard drives and PC133 SDRAM on Pentium III and Duron sized machines. This will prove counter-productive for this job in that new parts have many orders of increase in capacity over older equipment so much so that it is much more cost effective to buy new memory or disk drives than to try and work out how to fit a new operating system on a 10 Gigabyte partition. New DDR3 memory is a penny a megabyte for Gigabyte scales and new hard disks are nickels per Gigabyte. Certainly if you find old DVDROM drives (that cannot burn disks) then these are still useful but CDROM/CDRW drives are more or less junk with the use of USB sticks. Old MicroATX cases are still useful if you don’t mind no front-panel audio or USB ports and buying a new power supply unit. Overall playing with trashware is fun but it is not the right equipment for this kind of job – you need new parts not old parts.

For the Operating system then this depends if it is pre-built from a major supplier or if you made this. If it is pre-built then you’ve probably been given Windows 7 of some kind. If you got this made then the best value for money you have is to go with a mainsteam GNU/Linux distribution such as Ubuntu or Fedora. The problem with staying with a retail non-server edition of Windows is that it is not a multi-user operating system in that it won’t allow two simultaneous users to run a desktop from the machine. You have to buy a Windows server edition (which is what the Windows Server 2008 Foundation edition is targeted at – competing with out-of-the-box GNU/Linux for small businesses).

For our server we used the Ubuntu 10.10 desktop 64-bit edition. We downloaded the ISO from the Internet via bittorrent. This is free to do and you are allowed to do this. You can install Ubuntu on as many PCs as you like for free.

To allow multiple Windows desktops to use this server then the easiest way to do this is to install the FreeNX software on the Ubuntu machine and then install the NX Nomachine client on each Windows PC that intends to remotely access the new PC. We’re using NX Client for Windows 3.4.0-10.

Assuming you’ve added accounts onto the new Linux machine then on your Windows PC run the NX Client. The main problems you will have is a clash of the cygwin1.dll. If you have existing Cygwin based applications running then the NX Client may fail with “Cannot initialize the display service.” You may have to use the sysinternals process explorer and search for which application has cygwin1.dll loaded if closing existing Cygwin based applications fails because some (e.g. DeltaCopy rsync.exe) application has Windows explorer.exe loading its copy of the cygwin1.dll. Note that the cygwin1.dll that NX Client loads is located at a path such as C:\Documents and Settings\\.nx\plugin\Windows\bin rather than the installed location.

Remember that Unix is case sensitive so check your logon name is exactly as it is in Unix i.e. lower case usually, if you keep getting Authentication failed messages even though you are confident you are typing in the correct password.

Other than those initial teething problems you will now have a regular Linux desktop. From this you can install new applications, such as GIMP or Scribus-NG and then run them on this new machine.

Sharing data and text files from your Windows PC to the Unix machine is easy via the NX program. Go into the configuration of the NX client and under the Services tab enable the print and file sharing.

Posted in Technology | Comments Off on Overcoming major bottlenecks in graphic editing

Using Scribus 1.3.9 for Books

We have settled on using Scribus 1.3.9 to build our first book. This is being used on both Windows and Linux. To speed up editing time we have installed a new Ubuntu (10.10 desktop) based server and our editor uses Remote Desktop from their laptop to access this new server.

To make a “book” we have created templates for a “chapter” which is preset to around 21 pages long with linked text frames and preset picture frames. The text was edited in OpenOffice/LibreOffice and then imported into each chapter file in Scribus using the Scribus importer. Thus spell checking and paragraphing was done in OO/LO. Do not do special font layouts e.g. drop caps or pagination or illustrations in OO/LO. Leave the layout work for Scribus.

In this template we have made 3 master pages, the chapter first page (which is a right page), the chapter right page (i.e. odds) and the chapter left page (i.e. evens).

The page sizes and guides are as per our desired printer recommendations for the book size we have chosen.

There are 4 styles added, Chapter Title (on right/odd pages), Book Title (on left/even pages), Page Number, Main body paragraph.

The scrapbook also includes two items – a left and a right page text frame.

You cannot make a “book” per se in Scribus as it is slow with page counts over 30-50 pages but you can create individual chapters. You then use pdftk to concatenate the chapters into the single PDF file that you send to your printer.

So the work flow is,
Firstly – type your book in OpenOffice/LibreOffice (OO/LO) as one chapter per file and choose your illustrations (if needed). You must have a book on its final draft else you are wasting your time starting to use Scribus. Get the book text right in OO/LO where it doesn’t matter about precise layout and then jump to Scribus.

1 – Create each Scribus chapter file from template importing the (final draft) text and illustrations,
2 – Identify final length of each chapter and update section page start number in Scribus trimming off unneeded pages from template (or adding extras).
3 – Record chapter number and update Index with chapter page start number.
4 – Update total page count in Title Page verso and your ISBN/CIP.
5 – Finalise Title pages with ISBN and create 1 x PDF.
6 – Finalise Colophon (if used) and create 1 x PDF.
7 – Save all chapters as many x PDF files.
8 – Concatenate with pdftk all PDF files into one large file.
9 – Print local draft and check for errors.
10 – Finalise Cover page with ISBN and create separate title page PDF.
11 – Send these two PDF files to the printer.

Posted in Books, Scribus | Tagged , , | Comments Off on Using Scribus 1.3.9 for Books

Using Ndizi Project Management

We’ve added the Ndizi Project Management to the Development site. You can find it here.

What you need is to be a client of ours and for us to issue an access key. You’ll never remember the key so just cut+paste the key from our email.

In this you can see the status of the current tasks related to your project as well as add new tasks (which we’ll then review and assign).

Life Sign Press – Development

Posted in Life Sign Press | Comments Off on Using Ndizi Project Management