Browse files

Added toggle_text, string vars, and related changes.

  • Loading branch information...
larrykollar committed Jan 5, 2016
1 parent edc1735 commit df5eff1e740f42081f5dc201ee5689ae734e0312
Showing with 261 additions and 136 deletions.
  1. +27 −8 Makefile
  2. +11 −2
  3. +10 −3 ROADMAP
  4. +1 −1 VERSION
  5. +13 −11 doc/tines_opml.7
  6. +48 −29 doc/{hnbrc → tinesrc}
  7. +48 −29 doc/{ →}
  8. +1 −1 src/autosave.c
  9. +2 −1 src/cal.c
  10. +1 −1 src/config.h
  11. +12 −11 src/evilloop.c
  12. +3 −2 src/file.c
  13. +3 −3 src/file_hnb.c
  14. +4 −3 src/file_html.c
  15. +3 −2 src/file_opml.c
  16. +8 −7 src/prefs.c
  17. +7 −7 src/tines.c
  18. +21 −0 src/tree_todo.c
  19. +2 −1 src/ui_cli.c
  20. +36 −14 src/ui_draw.c
@@ -1,24 +1,43 @@
src/tines: src/*.c src/*.h doc/*.inc doc/
# Arguments to install
# Use this one for Linux
# Use this one for MacOSX & BSD
# Install directories
# Override the shell builtin echo
src/tines: src/*.c src/*.h doc/*.inc
(cd src;make)
install: src/tines
install -D src/tines /usr/local/bin/tines
install -D -m444 doc/tines.1 /usr/local/man/man1/tines.1
install $(INSTFLAGS) src/tines $(BINDIR)/tines
install $(INSTFLAGS) -m444 doc/tines.1 $(MANDIR)/man1/tines.1
install $(INSTFLAGS) -m444 doc/tines_hnb.7 $(MANDIR)/man7/tines_hnb.7
install $(INSTFLAGS) -m444 doc/tines_opml.7 $(MANDIR)/man7/tines_opml.7
install $(INSTFLAGS) -m444 doc/tinesrc $(SHAREDIR)/tinesrc
install $(INSTFLAGS) -m444 doc/starter.hnb $(SHAREDIR)/starter.hnb
# install $(INSTFLAGS) -m444 doc/default.css $(SHAREDIR)/default.css
(cd src;make clean)
(cd util;make clean)
rm -f *~
rcupdate: updaterc
updaterc: doc/
updaterc: doc/
doc/ doc/hnbrc
doc/ doc/tinesrc
(cd util;make)
echo -n "\"">doc/
cat doc/hnbrc | util/asc2c >> doc/
echo "\"">>doc/
$(ECHO) -n "\"">doc/
cat doc/tinesrc | util/asc2c >> doc/
$(ECHO) "\"">>doc/
tar: updaterc clean config.h
(cd ..;mkdir tines-`cat tines/VERSION`)
@@ -3,9 +3,18 @@ Tines is a console-based outliner/planner/notebook.
It is a fork of the hnb outliner,
which has not been updated in >10 years.
The current version, 1.9.19alpha, is based on hnb version 1.9.18pre7
The current version, 1.9.20, is based on hnb version 1.9.18pre7
and introduces support for 64-bit computers.
See the ROADMAP file for planned updates
Further updates (so far) include:
* new `--subtree` option to `expand` and `collapse` commands,
merged in from _lhnb_ with other bugfixes and updates.
* new `type="text"` attribute, with supporting command (`toggle_text`)
and string variables.
* Tines now loads `.tinesrc` and `.tines` as default files.
If you have used _hnb_, merge your old data with these new files.
See the ROADMAP file for further planned updates
along the way to version 2.0 and beyond.
The [wiki]( has a
@@ -12,10 +12,16 @@ the roadmap, that would be great. (I would particularly like
to have UTF-8 support as soon as possible, but I'm not sure
my coding skills are up to the job right now.)
1.9.19alpha (YOU ARE HERE): The fork from hnb 1.9.18pre7.
1.9.20 (YOU ARE HERE): The fork from hnb 1.9.18pre7.
This version runs on 64-bit computers and fixes a minor
bug that caused other outliners to reject hnb's OPML export.
In 1.9.20, Tines now looks for .tines and .tinesrc files
by default, and creates them if needed. The .tinesrc file
adds a Planner menu and other new functions, so consider
keeping it and merging your old .hnbrc customatizations
into the new config file.
1.9.19 - 2.0:
* finish renaming (.hnb to .tines, for example)
* import/convert .hnb files
@@ -28,8 +34,9 @@ bug that caused other outliners to reject hnb's OPML export.
(we have a working substitute for now, using key bindings -
use Ctrl-B to insert above)
* new command: sleep (put the process in the background)
* move, etc. into /usr/local/share/tines
* new attributes (mapped to OPML "type" attribute for import/export)
* move, etc. into /usr/local/share/tines (partially complete)
* new value for type attribute: 'text' (use toggle_text, mapped to F3) (Eone)
* preserve attributes for OPML import/export
2.0 - 3.0:
* autoconf
@@ -1 +1 @@
@@ -11,6 +11,9 @@ in the near future
This manpage describes how Tines maps
(and intends to map)
hnb and OPML elements and attributes.
Tines supports OPML 1.0. Any OPML 2.0 elements and attributes
are silently ignored.
.SS OPML Head Element
The hnb format has no analogous section.
@@ -22,16 +25,15 @@ write a placeholder <title> element.
.SS Attributes
Tines and \fIhnb\fP
discard the following OPML attributes on import,
and do not write them on export:
.IP \[bu] 4
.IP \[bu] 4
.IP \[bu] 4
.IP \[bu] 4
save OPML attributes on import,
and write them back on export.
The CLI commands
.BR att_get ,
.BR att_set ,
.BR att_clear ,
.BR att_list
can manipulate attributes if needed.
The OPML "text" attribute and the contents of an hnb <data> element
are equivalent.
@@ -87,7 +89,7 @@ will be driven through XSLT stylesheets,
allowing the user to modify or extend conversions.
.BR tines_hnb (7),
OPML 2.0 definition (
OPML 1.0 definition (
The original \fIhnb\fP was written by
\[/O]yvind Kol\[:a]s (
@@ -21,13 +21,19 @@
#bullet_todo_parent_done "[X]"
#bullet_todo_parent_undone "[ >"
#bullet_todo_parent_done "[X>"
#bullet_textleaf "t *"
#bullet_textparent "t +"
#bullet_textparent_expanded "t -"
bullet_leaf " *"
bullet_parent " +"
bullet_parent_expanded " -"
bullet_todo_leaf_undone "[ ]"
bullet_todo_leaf_done "[X]"
bullet_todo_parent_undone "[ ]"
bullet_todo_parent_done "[X]"
bullet_textleaf "t *"
bullet_textparent "t +"
bullet_textparent_expanded "t -"
##### user interface
##### display format
@@ -60,6 +66,7 @@
# set these variables to 0.
forced_up 1
forced_down 1
##### automatically added nodes
# To put automatically added nodes at the top of the current leve,
# set this variable to 1.
@@ -182,14 +189,15 @@
context main
helptext "ESC| menu || |F2| save || |F5| commandline || |return| edit |
helptext "ESC| menu || |F2| save || |F3| text || |F5| commandline || |return| edit |
bind f1 'status "Take a look at ~/.tinesrc to check out the configuration"'
bind .. 'status "there you will also find details about the available keybindings."'
bind .. 'status "please feel free to contribute more useful keybindings and helptexts..."'
bind esc menu
bind ^Q 'context quitsave'
bind f3 'toggle_text'
bind f5 'commandline'
bind .. 'status --clear'
@@ -536,51 +544,62 @@
escdelay 100
##### menu definition
##### file
menu "File" "------------" ""
menu "File" "save F2" "save"
menu "File" "save as.. " "macro saveas"
menu "File" "-------------" ""
menu "File" "Save F2" "save"
menu "File" "Save As... " "macro saveas"
macro define saveas
getquery db_file 'file to save'
go root
export_$format $db_file
menu "File" "revert " "revert"
menu "File" "Save Branch " "macro savebranch"
macro define savebranch
getquery 'File to save'
export_$format $db_file
menu "File" "Revert " "revert"
menu "File" "------------" ""
menu "File" "export ^E" "context export"
menu "File" "import ^L" "context import"
menu "File" "Export ^E" "context export"
menu "File" "Import ^L" "context import"
menu "File" "------------" ""
menu "File" "spell chk F6" "macro m_spellcheck"
menu "File" "expand all" "expand --all"
menu "File" "collapse all" "collapse --all"
menu "File" "statistics" "macro stats"
menu "File" "Spell Chk F6" "macro m_spellcheck"
menu "File" "Statistics " "macro stats"
macro define stats
status "file: \"$db_file\" format:$format"
menu "File" "------------" ""
menu "File" "exit ^Q" "context quitsave"
menu "File" "Exit ^Q" "context quitsave"
##### edit
menu "Edit" "---------" ""
menu "Edit" "copy ^C" "copy"
menu "Edit" "cut ^X" "cut"
menu "Edit" "paste ^V" "paste"
menu "Edit" "Copy ^C" "copy"
menu "Edit" "Cut ^X" "cut"
menu "Edit" "Paste ^V" "paste"
menu "Edit" "---------" ""
menu "Edit" "Search ^F" "macro m_search"
##### entry
menu "Entry" "--------------" ""
menu "Entry" "edit return" "edit"
menu "Entry" "delete del" "remove"
menu "Entry" "Edit return" "edit"
menu "Entry" "Delete del" "remove"
menu "Entry" "--------------" ""
menu "Entry" "Do Action ^A" "action"
menu "Entry" "Indent >" "indent"
menu "Entry" "Outdent <" "outdent"
menu "Entry" "Toggle Todo ^T" "toggle_todo"
menu "Entry" "Toggle Done ^D" "toggle_done"
menu "Entry" "Toggle Text F3" "toggle_text"
menu "Entry" "--------------" ""
menu "Entry" "do action ^A" "action"
menu "Entry" "indent >" "indent"
menu "Entry" "outdent <" "outdent"
menu "Entry" "toggle todo ^T" "toggle_todo"
menu "Entry" "toggle done ^D" "toggle_done"
menu "Entry" "expand +" "expand"
menu "Entry" "collapse -" "collapse"
menu "Entry" "Expand +" "expand"
menu "Entry" "Collapse -" "collapse"
menu "Entry" "Expand Subtree " "expand --subtree"
menu "Entry" "Collapse Subtree" "collapse --subtree"
menu "Entry" "Expand All " "expand --all"
menu "Entry" "Collapse All " "collapse --all"
##### Planner
Planner macros
macro define pl_new_act
@@ -642,15 +661,15 @@
menu "Planner" "Add Year... " "macro pl_add_yr"
##### level
menu "Level" "------------" ""
menu "Level" "sort ^S" "sort -a"
menu "Level" "sort (desc.)" "sort -d"
menu "Level" "shuffle " "sort -r"
menu "Level" "Sort ^S" "sort -a"
menu "Level" "Sort (desc.)" "sort -d"
menu "Level" "Shuffle " "sort -r"
context main
macro define m_about
status "tines - an outliner, planner, organizer, and notebook
status "Tines - an outliner, planner, organizer, and notebook
status "(c) 2015 Larry Kollar (
macro m_about
# vim: ts=4 sw=4
# vim: tabstop=4 shiftwidth=4
Oops, something went wrong.

0 comments on commit df5eff1

Please sign in to comment.