Skip to content

k-and/TaskPaper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskPaper

This project is "shared source" for TaskPaper license owners:

  1. Do modify as you see fit for your own use.
  2. Do not change or disable any of the licensing code.
  3. Do not redistribute binaries without permission from [email protected]
  4. Do submit pull requests if you would like your changes potentially included in the official TaskPaper release.

I want TaskPaper to continue on. Contact me if you want to do something with the code that does not fit under the above conditions and we can probably work something out.

Background

I worked adding features to TaskPaper from around 2007-2018.

Around 2018 I decided that I wanted a new foundation for outlining that wasn't compatible with TaskPaper's approach. Since then most of my time has been spent developing Bike Outliner. I fix TaskPaper bugs and update for macOS releases, but other then that I have not actively worked on TaskPaper.

This has been a bit sad for me as TaskPaper is a nice well polished app. But I only have so much work time, and I'm dedicating that time to Bike Outliner's development.

I hope by making TaskPaper's source available to license holders TaskPaper can continue to grow for those who enjoy it.

Design

TaskPaper's code is spread across a few different projects:

  • birch-outline.js The model layer consisting of outline, attributed string, serialization, query language, and undo.
  • BirchOutline.swift Swift wrapper around model layer.
  • birch-editor.js The view model layer consisting of editor state, selection, visible lines, and style calculations.
  • BirchEditor.swift Swift wrapper around birch editor view model layer + most of Swift application code. NSTextView based editor, document, window, picker views, etc.
  • TaskPaper TaskPaper specific customization to BirchEditor.swift. The intention was that there might be other apps that build off BirchEditor.swift.

Building

These instructions work for me, but there could very well be system dependencies that I've not accounting for. Let me know if they don't work for you and I'll add extra notes.

Dependencies

TaskPaper uses Swift Package Manager for dependency management. Dependencies are automatically resolved when opening TaskPaper.xcodeproj in Xcode 13.0 or later.

Main Dependencies:

No manual dependency installation steps are required. Dependencies will be fetched automatically when you first open the project or build.

If needed, you can manually resolve dependencies using:

swift package resolve

Javascript

This is a bit of a mess. Goal was to make birch-outline.js and BirchOutline.swift reusable so that other apps could read TaskPaper's file format. Would simplify things to just have a single JavaScript layer and single Swift layer... but getting code to that point would take some time, so that's why it's the way that it is.

Node.js Requirements:

Installing nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Both BirchOutline/birch-outline.js/ and BirchEditor/birch-editor.js/ directories contain .nvmrc files. Running nvm use in either directory will automatically switch to the correct Node.js version (v20).

Build Steps:

  1. Install Node.js v20.x LTS (or use nvm use in the JavaScript package directories)
  2. Install dependencies:
    cd BirchOutline/birch-outline.js/
    npm install
    cd ../../BirchEditor/birch-editor.js/
    npm install
  3. Start development build watchers:
    # In BirchOutline/birch-outline.js/
    npm run start
    
    # In BirchEditor/birch-editor.js/
    npm run start
  4. The Xcode project will automatically pick up changes to the JavaScript bundles

Notes:

  • Use npm link from within birch-outline.js so that birch-editor.js can reference the local version
  • Running npm run start in both packages ensures an updated webpack build is always in each package's "min" folder
  • When Xcode builds BirchOutline and BirchEditor, it checks if the JavaScript files have changed and copies new versions into dependencies

Releasing

Update TaskPaper-Direct-Notes.md ./build.sh # update build number in script, because me dumb!

That should build all versions, direct, direct preview, setapp, and app store

  • Direct and setapp version are bundled into a new folder in TaskPaper/build and can be copied from there.
  • App store version is found in Xcode organizer and can be submitted from there.

About

TaskPaper shared source code for TaskPaper license holders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 77.5%
  • CoffeeScript 9.0%
  • Swift 8.7%
  • Objective-C 2.7%
  • Shell 0.9%
  • Perl 0.8%
  • Other 0.4%