+
Skip to content

orgapp/swift-org

Repository files navigation

CocoaOrg

org-mode Parser for Cocoa

https://travis-ci.org/xiaoxinghu/CocoaOrg.svg?branch=master https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000 https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat https://img.shields.io/github/release/xiaoxinghu/CocoaOrg.svg?maxAge=2592000

org-mode is awesome. This is the first step to bring it to iOS, (arguably) the most popular platform on the planet.

Usage

An simple example will explain everything.

import CocoaOrg

let lines = [
    "* TODO head line",
    "  A normal line here.",
]
let parser = OrgParser()
let doc = try parser.parse(lines: lines)

Supported Syntax (so far) [14/17]

Keywords (aka In Buffer Settings)

#+TITLE: Hello World
#+OPTIONS: Hello World

Headlines

* Head Line 1
* Head Line 2
** Head Line 2.1
*** Head Line 2.1.1

Paragraph

Lines without line breaker becomes a paragraph.

Emphasis

*bold* 
/italic/
_underlined_
=verbatim=
~code~
+strike-through+

Link

[[google][https://www.google.com]]

List

# ordered list
1. first
2) second
3. 3rd

# unordered list
- item
+ item
* item

# nested list
- item
  1. sub item
  1) sub item
- item

Horizontal rules

Above.
-----
Below

Comment

# This is a comment.
#This is a regular line.

Blocks

#+BEGIN_SRC javascript
  Console.log("Hello Org.")
#+END_SRC

#+BEGIN_QUOTE
Everything should be made as simple as possible,
but not any simpler -- Albert Einstein
#+END_QUOTE

Drawer

Drawer for headlines.

* WAITING Talk to Jake
  :PROPERTIES:
  :CATEGORY: personal
  :END:
  :LOGBOOK:
State "WAITING"    from "TODO"       [2016-09-20 Tue 22:41] \\
    waiting for call from Jake
  :END:

Footnote

This is a footnote right here[fn:1]. And this is the rest.

[fn:1] The content of the footnote here.

Checkbox

Checkboxes in list items.
- [X] item one checked
- [-] item two not checked
- [ ] item three not checked

[#A] Priority

* TODO [#A] Top Priority Task
* [#B] Medium Priority Item
* TODO [#c] Low Priority Task
* TODO [#D] No Priority Task

Tags

* Section with One Tag                                                :tag1:
* Section with multiple tags                                 :tag1:tag2:tag3:

Table

Clock

Attachments

[#c] Maybe? [0/2]

  • [ ] Latex Support
  • [ ] Macros

Performance Test

Contribute

CocoaOrg is written in Swift 3. So you need xcode 8 to be able to build it.

Setup

./bin/setup
./bin/test

License

Carthage is released under the MIT License.

About

org-mode with swift

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载