21 Commits
Author SHA1 Message Date
Tzu-ping Chung 6323925f64 Xcode and dependencies update, many warning fixes 2018-01-13 00:20:57 +08:00
Niklas Berglund fa3298adf6 Separate bundle identifier for debug builds 2017-02-22 13:59:34 +08:00
Tzu-ping Chung fa1c20d398 Merge niklasberglund/macdown-cmd-pipe into master 2017-02-04 16:39:17 +08:00
Niklas Berglund e0ad90f273 Collect piped content error guard 2017-02-03 17:27:16 +08:00
Niklas Berglund 37f246065d Writing with NSData's writeToFile:options:error: method
So we can pass an NSError object
2017-02-03 17:26:21 +08:00
Niklas Berglund db0359d01a MP prefix for function name 2017-02-03 01:00:28 +08:00
Niklas Berglund f7635fda79 Support for piping text to macdown utility
Text piped to the macdown shell utility is inserted into a new untitled
document
2017-02-03 00:44:24 +08:00
Niklas Berglund 5138165bb7 Modified macdown shell utility usage info
Removed “version” and “[option]”
2017-01-28 21:19:18 +08:00
Tzu-ping Chung eb79defa9a Refactor file-launching method in cmd
Previously the cmd util uses different strategies to open files based
on whether MacDown is currently running. This results in various
problems, the most prominent being that NSWorkspace cannot be used
to pass a path for files that do not exist.

This change unifies the opening strategy to always be based on
cross-application NSUserDefaults instead, and moves the open file
check from during application launch to application activation.
This makes the implementation simpler, and also solves the problem
aforementioned.

Fix #672.
2016-11-06 04:50:16 +08:00
Tzu-ping Chung 17a212619f Use matching pref implementation on GUI and cmd
This avoids any error we write to the wrong domain.
2016-11-04 18:45:15 +08:00
Tzu-ping Chung f668605357 Refactor cmd arg processing to make more sense 2016-03-04 02:46:52 +08:00
Blake Skinner 15de2016b3 Percent-escape command arguments 2016-02-19 10:24:14 -05:00
Tzu-ping Chung a017995876 Order collected documents in CLI 2015-10-11 14:11:02 +09:00
Tzu-ping Chung 472b94d6d1 Open files directly if there's a running instance
Not running -> Persist the URLs temporarily, and launch the app.
               (The current solution.)
Running     -> Open directly. (New solution.)

Fix #392.
2015-07-26 22:28:22 +08:00
Tzu-ping Chung 3770ab8c6c Integrate GBCli 2014-12-02 14:28:38 +08:00
Tzu-ping Chung 834aa299f5 Cleanup 2014-11-23 00:59:55 +08:00
Tzu-ping Chung dd967a4e8f Make version outputs match 2014-11-22 22:04:27 +08:00
Tzu-ping Chung c2ac5aeb72 Add version generation and print job 2014-11-22 22:01:51 +08:00
Tzu-ping Chung 225a100558 Use CoreFoundation to maintain 10.8 compatibility 2014-11-22 22:01:50 +08:00
Tzu-ping Chung 0b81296656 Implement better file-opening utility
This implements a preference-based file-opening scheme. When the
CLI utility is run, all file name arguments are resolved to
absolute URLs and stored in a user default key *under the master
Macdown application's namespace*, and then launch MacDown.

Everytime MacDown is launched, it checks the aforementioned user
default key, and open any documents in it, creating non-saved drafts
if necessary (for non-existing documents). This mimics the expected
behaviours for "normal" editors, like VIM, nano, etc.. The user
default key is reset to nil after the documents are opened.

Closed #35.
2014-11-22 22:01:50 +08:00
Esben Sorig 3c72894769 Added command line utility.
Added a new target to the project. This is a command line utility
launcher for MacDown. The command line utility allows users to symlink
to their /usr/local/bin folder. In this way users can open files with
MacDown from the command line.
2014-11-22 22:01:50 +08:00