What's the latest on "Quick Entry" solutions for TaskPaper 3?

Oh yah. I tried this script and failed a dozen of times because that little misunderstanding.
Thank you
(would be great if you put “Start typing” into the ReadMe file for other people)

Wow Raguay; the TODO is really amazing workflow. I am surprised how it finds the projects I am saving in some other place (TaskPaper). I an then add Tasks to these projects. That is impressive.

I totally love the workflow for the fact that I can add task to my existing Projects. (I normally save these files inside the project folders. )

Thank you man!

2 Likes

It doesn’t work for me. I defined my todo folder, then test command t:add and alfred show me only the first project name of my file which named “Todo”. I added one task like “test task” after the command and nothing happened… :frowning:

have you investigated the folder created by t:settodo? you might understand what is happening with the script by looking at the subfolders. For me also, when I write t:add what I get is the list of projects open in the TaskPaper app. These projects are not inside the folders created by the t:settodo command. I also don’t understand how that happens. but, you can test it by manually creating some projects and tasks inside the Taskpaper first; then, try to add on that.

First time you run it, you should have TaskPaper open with your projects file loaded. The workflow gets the file from TaskPaper and stores it when you add a task. After that, you can add tasks without TaskPaper running.

The todo folder is for creating a todo list from scheduled todos. It is a little complicated, but not too hard. I really need to write a tutorial on using it, but I haven’t had time for that yet. Here is an example picture:

I have TP3 open with my project file in the background. You can see the four projects are shown in the Alfred browser. I type a task and select one project. It is then added to that project.

Hey, @raguay thanks for your work on this stuff. I’m having the following problem:

I have both tp2 and tp3 installed. I had set up the workflow before installing 3, and now if I do t:add with my todo file open in tp3, I get “sorry, no task file specified!”. If I run it with tp2 open, it finds the subprojects, but does not actually seem to modify the file. Any thoughts?

I realize this is maybe not the best place for this conversation, and if others find it distractingly specific I’ll remove this post, but I figured someone else might have a similar issue.

Hi @mediapathic,

The problem is the workflow uses an AppleScript that is hard wired to look for “TaskPaper”, which is the name for TP2 and TP3. If you have TP2 on the system and the system has previously gone to it in response to a request for “TaskPaper” in an AppleScript, then it will only look for that one. If you remove TP2, then the AppleScript will ask you which program is “TaskPaper” and you can set it to TP3. From then on, it will always reference TP3 as the “TaskPaper” program. Since Taskpaper 2 and Taskpaper 3 both have the same program name of “TaskPaper”, the system can’t tell which one you mean and will only reference the TaskPaper 2 program until you remove it.

@raguay

Ah! I see. That makes sense. I experimented with changing the value in the scpt to “TaskPaper3”, and that successfully got the project list with TP3 open, but it still doesn’t actually write to the file.

Thanks for the quick reply anyway though.

Hi All, @raguay,

I’m running TP 3.5, Preview 265 - and your previously fine working taskpaper Launchbar actions stopped working for me.

have I missed a necessary update? Or did the taskpaper upgrades make the Launchbar actions defunct?
THANKS

Actually, the action for LaunchBar doesn’t have to interact with TP3 to work. It mostly works with the plain file. I just tried to use the action, and LaunchBar would not run it anymore.

I just recreated the action and re-exported it. I suggest removing the old action, download the new one from my GitHub account, and re- install it.

I just used it to add ten items to my project using TP 3.5 preview 267. It is working okay for me now.

If it still doesn’t work for you, let me know exactly what you see happening.

I’ve put another Alfred 2 workflow for TaskPaper 3 up at TaskPaper | Packal . There is a thread on this forum for it here:

–Rob

2 Likes

Hi @raguay-- I’m running Task Paper 3 (276) and Launchbar 6.7.2 and I can’t seem to get this to work.

I’ve downloaded the the Launchbar action via your GitHub, double-clicked it and installed it. Should I be able to then trigger it in LaunchBar typing something like Add to Taskpaper etc.?

Maybe worth noting-- TaskPaperAddToProject.lbaction shows up in my Application Support folder but not in Launchbar’s UI under Actions.

I’m probably doing something silly… thanks a bunch for making this for Launchbar!

2 Likes

The action has an abbreviation set to ‘ap’. For the first time, have TaskPaper 3 open to the file with your projects. Open the Launchbar window (cmd-space for me), type ap, hit enter on the selection that says ‘TaskPaper - Add to Project’, type in the task description with any tags you want, press enter. It will then show a list of projects to add it to. Select one and it will be added to it. After it has saved the file location with the first activation, you do not have to have TaskPaper open for subsequent additions.

If it doesn’t show up on Launchbar’s Actions list, it most likely needs to rebuild it’s indexes. Right click on LaunchBar and select the menu Index → Update Index → All Rules. It should be accessible after that. Make sure the file is located here: ~/Library/Application Support/LaunchBar/Actions/TaskPaper - Add Project.lbaction.

2 Likes

It seems to work now. I believe it needed to be indexed. Thanks!

it does not show on LB’s Action list. rebuild index, reinstall LB… it doesn’t work.

is it LB’s Problem?

Sorry, I didn’t see this question. Yes, it would be LB problem. For some reason it isn’t indexing the action. You’ll have to ask on their forum. Good luck. Very slow help there.

One of the reasons I’m considering moving back to Alfred…

Hi all,

Here is a very simple scripting solution written in JavaScript for Automation (JXA) without any external dependencies.

Screenshot 2020-05-06 at 16.45.44

Here the JXA script:


// Description: Quick entry script for TaskPaper app

var filePath = "~/gtd.taskpaper"; // Path to TaskPaper file
var appendItems = true; // If true, items will be added to the end rather than top of Inbox

function TaskPaperContextScript(editor, options) {
    var outline = editor.outline;
    var inbox = outline.evaluateItemPath("//Inbox")[0];
    var items;
    if (options.text && options.text !== "") {
        items = ItemSerializer.deserializeItems(options.text, outline, ItemSerializer.TEXTMimeType);
    }

    if (!inbox) {
        inbox = outline.createItem("Inbox:");
        outline.root.insertChildrenBefore(inbox, outline.root.firstChild);
    }

    if (items) {
        if (options.append) {
            inbox.appendChildren(items);
        } else {
            inbox.insertChildrenBefore(items, inbox.firstChild);
        }
    }
}

var app = Application("System Events");
app.includeStandardAdditions = true;

var prompt = app.displayDialog("Location: " + filePath, {
    withTitle: "TaskPaper – Quick Entry",
    withIcon: Path("/Applications/TaskPaper.localized/TaskPaper.app/Contents/Resources/TaskPaper.icns"),
    buttons: ["Cancel", "Save"],
    defaultAnswer: "",
    defaultButton: "Save"
})

var tp3 = Application("TaskPaper");
var isRunning = tp3.running();

var strFullPath = ObjC.unwrap($(filePath).stringByExpandingTildeInPath);
var document = tp3.open(Path(strFullPath));

document.evaluate({
    script: TaskPaperContextScript.toString(),
    withOptions: {text: (prompt.textReturned), append: appendItems}
});

document.save();

if (!isRunning) { tp3.quit(); }

Just set the filePath and appendItems variables on top of the script according to your needs. Depending on location of TaskPaper app on your machine, you would probably need to adapt path to TaskPaper icon as well (or comment this line out entirely).

Hope it will be useful for someone.

2 Likes

Thank you. This is very useful. I made a Keyboard Maestro macro with this script and it works great. The only thing I had to change was the path to the TaskPaper icon.

macosxguru

1 Like

I like this a lot! Thanks!

It looks like the entry is entered as a note. Is it easy to preface the entry with a dash and a space?
(example: Entry becomes - Entry)