Giter VIP home page Giter VIP logo

swift-org's Introduction

SwiftOrg

org-mode Parser for Swift

https://travis-ci.org/xiaoxinghu/swift-org.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/swift-org.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 SwiftOrg

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

Supported Syntax (so far) [17/19]

Affiliated 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

TODO Keywords

#+TODO: TODO NEXT | DONE

* TODO Head Line 1
* NEXT Head Line 2
** DONE Head Line 2.1
   CLOSED: [2016-12-31 Sat 14:12]

[#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:

Planning

* DONE Closed task
  CLOSED: [2017-01-09 Mon 15:58]

* Scheduled task
  SCHEDULED: <2017-01-09 Mon>

* TODO task that has a deadline
  DEADLINE: <2017-01-16 Mon +1w>

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

Table

| Name         | Species    | Gender | Role         |
|--------------+------------+--------+--------------|
| Bruce Wayne  | Human      | M      | Batman       |
| Clark Kent   | Kryptonian | M      | Superman     |
| Diana Prince | Amazonian  | F      | Wonder Woman |

Clock

Attachments

[#c] Maybe? [0/2]

  • [ ] Latex Support
  • [ ] Macros

Performance Test

Contribute

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

Setup

./bin/setup
./bin/test

Release

To bump up version number.

agvtool new-marketing-version 0.7.9
sed -i.bak "s/s\.version = .*/s\.version = '0\.7\.9'/" SwiftOrg.podspec

License

Carthage is released under the MIT LIcense.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.