Bullet Biting #1: Recording book sales on the go

I am always and forever an advocate of spending a little time now to save myself a lot of time later. But often enough, it’s difficult because you just don’t have the time to do something that will only pay off later. Bullet Biting is about choosing to do it, choosing to spend that time, and hopefully getting a result that will help me.

The Goal

I need a way to capture details of books I sell when I’m out at talks. Sometimes it’s me selling them so that should be easy, you would think, but also often there’s a book table run by the organisers and I find out at the end of the day. Whichever way it’s done, it’s usually in a rush and I want a quick way to note down the number of copies sold.

I would like to record more: the venue or the event would be handy and the date is essential. Plus I do vary the price a little if necessary so recording the sale prices would help me know how I’m doing. This all seems part and parcel of the need to capture sales details on the run, so I’m intending to do that.

What I’m not going to do here is anything to do with my book database. I’d like to have a way to squirt the data into that database so that I have one single place to check but I think this is a bigger issue. If I can just get a way to tap “15 books sold at Stratford” and so not have to remember details, that’ll do me. for today.

The Tools

Launch Centre Pro just got an update that apparently may make this easier for me. Launch Centre Pro is an iPhone app for launching other iPhone apps. That doesn’t sound terrific, that sounds like a shortcut or something, but it’s useful because it will actually launch specific things within an app. I have a single Launch Centre Pro button that opens OmniFocus at the point where you enter a task. I have a button called Story Ideas which opens up a little text field, lets me type whatever is on my mind, then squirts that off to the writing application Drafts and gets that to append the new idea to the end of a Story Ideas note in Evernote. 

That’s handy because I have just one thing to tap when I’ve got an idea and it ends up saving itself to a long and growing collection of ideas in Evernote. I don’t have to open Evernote, find the notebook, find the note, scroll to the end, start typing. 

So Launch Centre Pro is useful. Applications have to allow it to do its thing, it can’t do this to just any app, so there are limits. But I once heard a Mac Power Users episode where a listener on the show said he used Drafts and some other tools to collect sales leads at shows. I know he uses Drafts, I’m thinking he either uses TextExpander or LaunchCentre Pro for the rest. I’m not sure what he does with the data in Drafts, whether he squirts that off anywhere.

It’s sounding like my first job should be to listen to that Mac Power Users episode, isn’t t?

The Me

Here’s the other thing to know. It’s a Sunday and I have a cold. Running a bit low, a bit slow, I am conscious that any proper work I do today won’t be any good. I think that this may mean it’s a good day to fiddle about like this. I’m not sure. I could be wrong and I fully expect to be embarrassed at how slow I am learning Launch Centre Pro and devising this thing.

In the spirit of that, let me tell you that I began writing this to you at noon and it’s now 12:15. I’m going to be cooking lunch in one hour’s time at 13:15, so, first, how far can I get in the next hour?

Hour One – 12:15-13:15

I’m going to read about the new Launch Centre Pro features that apparently make it easier to construct these things, I’m going to find that Mac Power Users episode and also any YouTube videos about programming Launch Centre Pro.

MacPowerUsers podcast

It’s episode 150 and this should be the link but there is something wrong. That takes you to the episode page yet unlike all the shows either side of it, this one does not have a Play button. Hang on. Now that I know it’s episode 150, I should be able to find that in my iPhone’s podcast app. 

Got it. The bit I want turns out to start at about 3’30”. It’s their listener Tom Siko and he’s saying he uses TextExpander and Drafts. 

This is making me pause. Launch Centre Pro is a fast ay of launching things, er, centrally and pro-ily, but whatever I do, I can presumably start it with a Launch Centre Pro button. Siko is saying he starts Drafts and then types into it a TextExpander snippet which kicks all this off.

I should say: if you don’t know, TextExpander is a great tool on the Mac and an okay tool on iOS for saving you some typing. I have lots of what are called TextExpander snippets on my Mac so that I can quickly type out things like my contact details, any URLs that I tell people about a lot, or things like my Amazon Associates links for various of my books. It’s terrific on the Mac because it works everywhere, it goes under the hood and works in anything you can use: if you can write text in it, you can use TextExpander. But on iOS, it’s not and never will be as integral to the system. Like Launch Centre Pro, TextExpander for iOS only works its magic in apps that allow it to. 

Ah, Siko is now explaining what he does with the data and the short answer is that it’s manual. All the notes stay in Drafts and he works through each one. Once he’s done whatever he’s going to do, he saves the finished Draft in Evernote. 

It’s 12:38 (told you I was slow today) and I’m pondering. Evernote is a good end destination for me. Not as good as squirting the data right into the database but I didn’t think that I was possible anyway. I need to think about collecting the data on my iPhone and then later processing it in Evernote in some way. I’m worrying that I’ll let the data pile up in Evernote and never look at it or that I do look but in some haphazard way that means I risk duplicating details. If I send to Evernote and then process it all out into my spreadsheets and databases, will I always remember to clear out Evernote? 

Nuts, 12:41: MacPowerUsers just mentioned IFTTT, If This Then That. Hmm. That could be something useful.

But I think the job today is to focus. I’m ruling out IFTTT as being a step too far to investigate today. So today I’m now thinking:

1) Use Launch Centre Pro to start Drafts

2) Drafts is the main engine here. But run a TextExpander snippet that prompts me through collecting the data (How many copies of which book sold at what price where and when).

3) Parcel that data up and send it to a note in Evernote a la my Story Ideas one: a single note that grows.

4) Periodically scrape all that detail out of Evernote, put it into my spreadsheets and databases and then delete everything in that note.

It would be good to do all this straight into my database and I’ve realised that there is a way but it’s complicated and expensive. My databases run on FileMaker Pro 11 on my Mac; if I upgrade to version 13, I could also get an iPhone and iPad app from them that would let me run the same databases on the go. If I wanted it to really be the same databases, literally the same and not just a local copy, then I’d have to upgrade to FileMaker Server and also configure a Mac here to be an always-on server. 

That would be a slicker way to do it all in the end and there’d be no or at least less of a chance of data loss or duplication along the way. But that’s buying professional-quality and professional-priced apps plus at least devoting a Mac to it if not buying a new one, just to record that I sold 15 books today.

It’s 12:47. Okay, I’m happy I’m on a useful route. The next step is to make sure I’ve got the latest versions of Launch Centre Pro, TextExpander and Drafts. I have all three apps and since I’m on iOS 7 they’ve probable updated themselves in the background. But I read that TextExpander had to change how it works recently and that apps have to be changed to accept the new order. I believe Launch Centre Pro and Drafts both do. But also it needs me to switch something on in both.

12:50 Okay. All software is updated and yes, I had to do something in both Drafts and Launch Centre Pro but that’s done now. While I was there in Drafts, I tried typing my most complicated TextExpander snippet so far and it’s interesting: Drafts sends me out of itself and in to the TextExpander app to fill out a form then comes back to Drafts to paste all the data in. It works but it’s not very pretty. And if I do launch this from Launch Centre Pro then it’ll be swapping apps even more than I thought.

12:52 Taking a moment to try using a TextExpander snippet within Launch Centre Pro. See if I can fill out a form there and then have that data squirted off somewhere.

12:54 No. All LaunchCentre Pro can do, it appears, is launch TextExpander. It can’t go deeper and call a snippet. I’m sure it must be able to. I must be wrong. Hang on… 12:55 I can’t see it. It’s down to how you compose an action; there must be a way to include a snippet and so launch the kind of thing I’m after but I can’t see it. One of the reasons I’m looking at this today is that the latest update to Launch Centre Pro is supposed to make composing actions easier but I’m not seeing it. Going to check out a review somewhere.

12:58 MacStories has a review/feature. Hmm. I think I’ll live with doing my doings in Drafts and putting up with the app swapping. It’ll be automatic, it’ll just mean watching the screens fly by. Just going to check now that I can or how I did create a Launch Centre Pro button to launch a specific Drafts type of note. 

13:03 Oh, that is so tantalising close to being good. I can very simply create a Launch Centre Pro button that will start a new Drafts document and I can even have it start one with text that I specify. I just tried creating a new Drafts document that was empty bar the text of a snippet I use. It didn’t work. There’s the Drafts note, there’s the text, nothing happens. If I then type the same snippet right there in the same note, wallop, it fires off a TextExpander action with fill-in forms akimbo.

If it had worked, I’d have ended up with a Drafts note that had text in it. It would’ve just sat there until I started another note whereas I need it to push off to somewhere else like Evernote and drop its data there.

Okay, this is really just a more complex version of my old Story Ideas button. I need the same action of it prompting me for information – it’d be great if they were specific prompts demanding specific answers rather than just a general text field – then I need to squirt that to Drafts and let Drafts squirt it to Evernote. I know I can’t go straight to Evernote because I don’t want to create a new note every time, I want to append everything to a single one.

This is the code for my Story Ideas button in Launch Centre Pro:

drafts://x-callback-url/create?text=[prompt]&action=Story%20Ideas&x-success=launchpro://

So that calls Drafts but first prompts me to enter text, then passes what I write to a specific Drafts note that includes the action that sends it to Evernote. Then pops me back to LaunchCentre Pro.

13:11 Need to make our lunches. Reading this other MacStories article for ideas.

14:20 Feeling very rough, thank you for asking. I’d have caved in and asked Angela to make the lunch if I’d appreciated how much I envy her being vertical. She’s working, though, and I only made us sausage sandwiches. (Want a sausage sandwich recipe? Only use thick sausages and when you lay them out on the bread, run your knife through them, almost but not quite slicing each sausage in two. Use the knife to flatten the sides out a little and if you like sauce, dab some in the middle. You’re welcome.)

We ate, watched a Strictly Come Dancing: It Takes Two episode we’d missed, now Angela is back to work and I am back to playing at this at a snail’s pace.

What I’ve thought in the interval was that I could lengthen my Story Ideas button and have several of those “text=[prompt]” bits. It’d be ugly and I’ve have to tap to get to the next question all the time. And I did that Story Ideas button a year ago, I find Launch Centre Pro’s schemes hard enough to use that I can’t remember how I got one working. I’ve just run it to see what happens and it opens up a text box with the title “Story Ideas”. That’s fine for this but I’ll need one that says “Number of books sold?” and then a further one saying “At what price?”, “Which book?” and so on.

14:29 Hang about, I have another Launch Centre Pro action that might be closer. Yes – oh! Where is my head? I have one called New Contact which is specifically exactly what that fella spoke of on MacPowerUsers. It prompts me through a couple of questions and then squirts the data off to Drafts which then bungs it off somewhere else. I don’t remember where because I haven’t used this button since the day I created it. Hmm.

Here’s the code for that:

drafts://x-callback-url/create?text=[prompt:Name]%0d%0d[prompt:Email Address]%0d%0d[prompt:Add note or press Launch to finish]&action=AddEvernote&x-success=launchpro://

So prompting me to enter some specific text is a question of writing: “[prompt:Name]”. That’s easy, I can have as many of those as I want.

And that last line tells me that I’ve previously set up an action in Drafts called “AddEvernote” which will be what appends the contact details to an Evernote note.

Yet it’s still too ugly for me. I’ll take it, I’ll use this and I’ll call the day a reasonable success when it works, but TextExpander’s Fill-in forms look better and they give me easy access to pop-up lists. I shouldn’t have to write the titles of my books in, I should be able to pick the right one from a list.

14:35 I’m googling TextExpander in Drafts in Launch Centre Pro. Wish me luck.

14:41 This might be useful. It’s MacStories again but way down the page there is a line of code that reads:

drafts://x-callback-url/create?text=<sddate>[prompt]&action=URL%20to%20Scratch&x-success=launchpro://

It’s sending a TextExpander snippet called “sddate” to Drafts along some prompted text. I’m going to try adapting that so it only sends a snippet, and I’ll have that snippet be one of mine that has a fill-in form.

14:43 Didn’t work. My snippet is called “;bal” (with the semi-colon but without the speech marks) and so the code read: drafts://x-callback-url/create?text=<;bal> and that’s what happened in Drafts. It opened a new Draft note with the line “<;bal>” written in it. 

Is that because my snippet begins with a semi-colon? 

Nope.

It’s not that I need to send the snippet plus some prompted text, either. Maybe it’s that &Action=URL part. I don’t think so because the button takes me to Drafts successfully. But trying it anyway… Nope.

14:54 Watching some videos about TextExpander… Not helping.

15:12 Bit of a break to show Angela how to do something. Yesterday I worked at a Writing Squad in Hereford where the kids had written a play and I was in the cast, playing the role of a spokeselephant. Angela took photographs for Writing West Midlands, the firm that runs these. She’s just taken some time out from her work today to produce a set of stills for them and I’m showing her how to email over a Dropbox link to her selection.

15:16 While dropbox uploads it all, I’m back watching videos. This current one has a pre-roll ad about Chromebooks that just seems so strange to me as a Mac user. It’s pushing all the brilliant features of Chromebooks and they are all empty points so far as I can see. Personal Logins. Doesn’t everything have that? Anti-virus software. Excuse me? I know that PCs are rife with viruses but for anti-virus to be the number 2 reason to buy a particular machine seems crap to me. “Buy this, it’s not as bad as it could be” doesn’t really sing for me. I do prefer Apple’s attitude of just showing people using their things and making stuff with them. 

Anyway.

15:19 watching videos… no use. This page on the Drafts site might be helpful. It’s making me wonder if I can have a Drafts action that calls a TextExpander fill-in-form snippet. So my Launch Centre Pro button need only create a new draft that has that action in it. Trying…

Need to create an action in Drafts first. Working on that… 15:23 App directed me through the company’s collection of actions, none for TextExpander. 15:24 Found a TextExpander section in Drafts with a setting called “Expand in action templates”. It has three options; I’m choosing the most wide-open one. If it works, I’ll step back the slightly more constrained version and try that. I don’t want to add complexity here, I want to get it working first. 

Didn’t work. Back to creating a Drafts action that I can call directly from Launch Centre Pro. 

15:29 I’ve created a Drafts action called BookSales. It just fires that same TextExpander snippet I’ve been trying; a fill-in-form that has nothing to do with book sales. So if this works, I’ll have to create a new snippet but that’s fine. Fingers crossed it works… 

15:31 No. Got an error, but too quickly to see. Trying to run it again. Still too fast. Have found a setting to confirm before launching an action so I can see that it is trying to launch BookSales. So Launch Centre Pro is correctly creating a new note in Drafts and launching the action, but then that’s failing. The fault is in my action, then.

15:33 Dropbox has finished uploading the photos. One second… Sent Angela the link. Right, 15:34, looking at my Drafts action. 

15:48 Still on it. Certain now that I’ve got Launch Centre Pro licked and that it’s Drafts I’m getting wrong. 

15:55 Realised I’ve created a loop in Drafts. The action is calling itself.  Confused now. Need to get clear what I’m trying to do at this point. I want a Drafts action that opens up a TextExpander snippet. That’s all. Get that right and I can choose which snippet and I can work on getting Launch Centre Pro to call the right Drafts option.

So we’re staying in Drafts for now. 

16:08 Not loving this. Sorry I’m taking so long. 

16:16 Trying to step away, look at all this from the start.

16:25 It’s particularly annoying that I can find many places that speak of automatically expanding TextExpander snippets in Launch Centre Pro but they all do so in one place: they are all quoting the Smile Software press release that says it’s so. None give any examples. 

16:28 Okay, around and around we go, I’m back to being sure Launch Centre Pro is working correctly – I mean, that I’ve understood it and got it right – but that it’s Drafts where I go wrong. Suddenly find that all my Drafts actions fail. Is it that they have to have text in them? Nope. Yes. A bit. Somewhere in the middle. 

16:33 Googling for how to get Launch Centre Pro to launch actions within Drafts. 

16:37 Google not helping. Videos not helping. I want to launch TextExpander and a fill-in-form within Drafts so that the data ends up in Drafts. Fine. I can’t get Drafts to automatically expand a snippet. Wait, it won’t expand a snippet that runs a form. Trying an easier one. 

16:42 Okay, I can successfully get Launch Centre Pro to open a new Draft and I can have it enter a TextExpander text. But Drafts won’t automatically expand those.

17:01. Not a great afternoon, then. But I’ve created a button in Launch Center Pro that opens a new Draft and includes a prompting text to “Type sb for form”. Then I have a TextExpander form that runs: 

New Book Sales:

%d %B %Y

Which book? %fillpopup:name=Which book?:default=The Blank Screen ppb:The Blank Screen kindle:The Blank Screen ibooks:The Beiderbecke Affair ppb:Self Distract ppb:Self Distract kindle%

How many? £%filltext:name=countl%

Event? £%filltext:name=event%

Price? £%filltext:name=price%

17:02 I did that snippet on TextExpander for Mac and it doesn’t seem to have wiggled across to the iOS version yet. Waiting. 
 
17:03 There it is. Testing…
 
17:04 And it works. A bit ugly. And it only saves the data to Drafts, not yet appends it to a note within Evernote, but. Fixing a couple of ugly bits… 
 
17:08 It’s annoying: I can just have it open Drafts and automatically fire a snippet, okay, but I also can’t just type. I have to hit return and space then my trigger. But here’s what the final result looks like. Pretty ugly, but does a job.
 
17:12 So that’s five hours. Thank you for being with me on this most unproductive of days, but at least I know my cold means I wouldn’t have got much else done, so.
 
 
Textexpandersample
  • Expanded Text Expander support — snippets can now be expanded automatically while launching an action

Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*