Skip to content

Commit 68d1ce7

Browse files
committed
Update README
1 parent f3fd03f commit 68d1ce7

File tree

1 file changed

+62
-26
lines changed

1 file changed

+62
-26
lines changed

README.org

Lines changed: 62 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,26 @@ provide /almost/ the same tangling functionality at a much higher
3333
speed.
3434

3535
You do *not* need Emacs or Org mode installed to use ~ntangle~.
36+
* Download binary (64-bit GNU/Linux)
37+
If you are using a 64-bit GNU/Linux type OS, head over to the [[https://github.com/OrgTangle/ntangle/releases][Releases]]
38+
section of this repo to download the release archive
39+
~ntangle-VERSION.Linux_64bit_musl.tar.xz~. Then simply extract it to
40+
get the statically linked binary ~ntangle~ and run it.
41+
42+
If you are using any other type of OS, see [[#installation][Installation]].
3643
* Installation
37-
** Download binary
38-
- 64-bit GNU/Linux type OS :: Head over to the [[https://github.com/OrgTangle/ntangle/releases][Releases]] section of this
39-
repo to download the release archive
40-
~ntangle-VERSION.Linux_64bit_musl.tar.xz~. Then simply extract it
41-
to get the statically linked binary ~ntangle~ and run it.
42-
- Other OSes :: The statically linked binary is available only for
43-
64-bit GNU/Linux type OS. Follow the [[#development][Development]]
44-
section below to build the binary locally for your OS.
45-
** Build locally
46-
See [[#development][Development]].
44+
45+
[[https://github.com/nim-lang/nimble][~nimble~]] can be used to install ~ntangle~. This utility ships with Nim
46+
installations. Think of it as the equivalent of the Python ~pip~.
47+
48+
/See [[https://github.com/dom96/choosenim#installation][*choosenim* installation]] to install *nim* and *nimble*./
49+
50+
To install ~ntangle~:
51+
#+begin_example
52+
nimble install ntangle
53+
#+end_example
54+
55+
Above installs the binary in the *~/.nimble/bin/* directory.
4756
* Features
4857
** Tangling /minus Noweb/ [7/8]
4958
- [X] Understands global tangle header-args in ~#+property~ keywords
@@ -117,33 +126,60 @@ file.
117126
* Org mode file samples for tangling
118127
You can find samples of the supported Org mode tangling in the [[https://github.com/OrgTangle/ntangle/tree/master/tests][*test*
119128
directory]] of this project.
129+
* Org Tangle Syntax
130+
~ntangle~ expects the Org files to use the ~header-args~ property
131+
syntax used in Org mode 9.0 and newer. There was a minor syntax change
132+
with *header-args* property in Org 9.0 ([[https://code.orgmode.org/bzg/org-mode/src/a85ba9fb9bc7518bc0b654c79812f5606be84c58/etc/ORG-NEWS#L1042][see ORG-NEWS]]).
133+
134+
So if you used the below in Org 8.x and older:
135+
#+begin_src org
136+
# Deprecated syntax
137+
,#+property: tangle yes
138+
#+end_src
139+
140+
Refactor that to:
141+
#+begin_src org
142+
# Org 9.0 syntax
143+
,#+property: header-args :tangle yes
144+
#+end_src
145+
146+
Similarly, refactor a property drawer from:
147+
#+begin_src org
148+
# Deprecated syntax
149+
,* Some heading
150+
:PROPERTIES:
151+
:tangle: yes
152+
:END:
153+
#+end_src
154+
155+
To:
156+
#+begin_src org
157+
# Org 9.0 syntax
158+
,* Some heading
159+
:PROPERTIES:
160+
:header-args: :tangle yes
161+
:END:
162+
#+end_src
120163
* Development
164+
Below assumes that you have ~nim~ and ~nimble~ installed.
121165
** Building
122-
[[https://github.com/nim-lang/nimble][~nimble~]] is used to build this project. This utility ships with Nim
123-
installation. Think of it as the equivalent of ~pip~ in Python.
124-
125-
With Nim and ~nimble~ installed, do:
126166
#+begin_example
127167
git clone https://github.com/OrgTangle/ntangle
128168
cd ntangle
129-
nimble build -d:release # creates the ntangle binary in the same directory
169+
nimble build # creates the ntangle binary in the same directory
170+
# nimble build -d:release # same as above but creates an optimized binary
130171
#+end_example
131-
** Installing
132-
If you want to install it (i.e. build the binary and copy it to
133-
=~/.nimble/bin/=), do:
134-
#+begin_example
135-
# cd to the git repo dir
136-
nimble install
137-
#+end_example
138-
139-
You need to add *~/.nimble/bin/* to your ~PATH~ environment variable.
140172
** Testing
141173
#+begin_src shell :results output verbatim
142174
# cd to the git repo dir
143175
./tests/test.sh
144176
#+end_src
145177
* History
146-
The ~ntangle.nim~ file was written as an exercise to roughly translate the
147-
Python script [[https://github.com/thblt/org-babel-tangle.py][~org-babel-tangle.py~]] (by @thblt) to Nim.
178+
I was [[https://www.reddit.com/r/emacs/comments/8m5wuf/a_python_version_of_orgbabeltangle_for_literate/dzl3ooo/][motivated]] to start this project after reading about the
179+
[[https://github.com/OrgTangle/org-babel-tangle.py\][~org-babel-tangle.py~]] Python project by @thblt.
180+
181+
I wanted to just see how easy it was to translate a Python script to
182+
Nim (it was very easy!), and from there, this project started
183+
snowballing, gathering features of its own :).
148184
* Other Org tangling implementations
149185
See [[https://github.com/OrgTangle]].

0 commit comments

Comments
 (0)