You are not logged in.

#1 2014-11-15 03:44:39

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Command Line Wiki

I was wondering if anyone knows of any good command-line programs for organizing your thoughts. I'd like to have something similar to a wiki with hierarchical structures.

I know of ZIM and Tomboy, both great applications, but I'd like something a bit more minimal.
I've used VIM for this for a bit, but after a while this becomes a bit difficult to sort and organize.

Does anyone have any good suggestions for a minimal app that helps organize your thoughts?

Offline

#2 2014-11-15 04:25:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Command Line Wiki

I use this. It qualifies as minimal:

n() {
  local arg files=()
  for arg; do 
      files+=( $HOME/".notes/$arg" )
  done
  ${EDITOR:-vi} "${files[@]}";
}

nls() {
  tree -CR --noreport $HOME/.notes| awk '{
    if (NF==1) print $1
    else if (NF==2) print $2
    else if (NF==3) printf "  %s\n", $3
  }'
}

# TAB completion for notes
_notes() {
  local files=($HOME/.notes/**/"$2"*)
  [[ -e ${files[0]} ]] && COMPREPLY=( "${files[@]##$HOME/.notes/}" )
}
complete -o default -F _notes n

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-11-15 04:41:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Command Line Wiki

cyberpsych0sis wrote:

I've used VIM for this for a bit, but after a while this becomes a bit difficult to sort and organize.

Why? I have files, directories and things work for me even though my notes are ~ 20 MB large.

For me, a wiki is a tool that lets edit things collaboratively using simple markup. I feel no need for a personal wiki.


Have you read https://wiki.archlinux.org/index.php/Li … organizers ?
Maybe http://orgmode.org/ is more to your liking? Or maybe https://aur.archlinux.org/packages/geeknote-git/ ?

Offline

#4 2014-11-15 04:59:03

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

karol wrote:
cyberpsych0sis wrote:

I've used VIM for this for a bit, but after a while this becomes a bit difficult to sort and organize.

Why? I have files, directories and things work for me even though my notes are ~ 20 MB large.

For me, a wiki is a tool that lets edit things collaboratively using simple markup. I feel no need for a personal wiki.


Have you read https://wiki.archlinux.org/index.php/Li … organizers ?
Maybe http://orgmode.org/ is more to your liking? Or maybe https://aur.archlinux.org/packages/geeknote-git/ ?

When I said wiki I meant something that can easily be organized through a hierarchical structure. Perhaps wiki wasn't the best way of wording it. Something like tomboy notes or ZIM that all you to create topics with subtopics, etc. I do however like the ability within wikis to link data together, but that may be a bit of a stretch.

But yea after viewing http://www.youtube.com/watch?v=fgizHHd7nOo, It's clear that orgmode is exactly what I'm looking for... I guess I'll go learn emacs now...

Thanks again Karol.

Last edited by cyberpsych0sis (2014-11-15 05:11:51)

Offline

#5 2014-11-15 04:59:54

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

Not on your level yet Jason, I have no idea what's going on with this script, but I'll make it a project to understand it. Thanks for sharing.

jasonwryan wrote:

I use this. It qualifies as minimal:

n() {
  local arg files=()
  for arg; do 
      files+=( $HOME/".notes/$arg" )
  done
  ${EDITOR:-vi} "${files[@]}";
}

nls() {
  tree -CR --noreport $HOME/.notes| awk '{
    if (NF==1) print $1
    else if (NF==2) print $2
    else if (NF==3) printf "  %s\n", $3
  }'
}

# TAB completion for notes
_notes() {
  local files=($HOME/.notes/**/"$2"*)
  [[ -e ${files[0]} ]] && COMPREPLY=( "${files[@]##$HOME/.notes/}" )
}
complete -o default -F _notes n

Last edited by cyberpsych0sis (2014-11-15 05:07:58)

Offline

#6 2014-11-15 05:13:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Command Line Wiki

jasonwryan explained it two years ago: http://jasonwryan.com/blog/2012/09/01/notes-updated/ although I see the code is a bit different.

Offline

#7 2014-11-15 05:31:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Command Line Wiki

Does emacs with org mode qualify?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#8 2014-11-15 05:33:56

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

karol wrote:

jasonwryan explained it two years ago: http://jasonwryan.com/blog/2012/09/01/notes-updated/ although I see the code is a bit different.

Thanks! smile

Offline

#9 2014-11-15 05:35:33

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

ewaller wrote:

Does emacs with org mode qualify?

Indeed it does, as mentioned above (Post #3 and #4)
While I'm not really looking forward to learning EMACs (I'm rather partial to VI), I don't suppose it could hurt. This solution does appear to be the closest to what I'm looking for.

Last edited by cyberpsych0sis (2014-11-15 05:37:29)

Offline

#10 2014-11-15 05:44:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Command Line Wiki

Offline

#11 2014-11-15 06:06:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Command Line Wiki

I missed that.  BTW, I use emacs/org mode at work.  I especially like how I can generate LaTeX reports straight from the outlines.  It is also extremely cool that emacs can be made to act as a web server that creates a dynamic page from the contents of my org buffer.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#12 2014-11-15 06:14:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Command Line Wiki

ewaller wrote:

It is also extremely cool that emacs can be made to act as a web server that creates a dynamic page from the contents of my org buffer.

Well, Toto, it doesn't look like we are in a text editor any more...

smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2014-11-15 06:17:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Command Line Wiki

Is it true that systemd will be merged in emacs?


@OP
Internet has plenty info, so just try it yourself:
https://github.com/hsitz/VimOrganizer/
https://news.ycombinator.com/item?id=7000953

Offline

#14 2014-11-15 06:22:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Command Line Wiki

It has been said that emacs is a great operating system in search of a decent editor.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#15 2014-11-15 06:41:52

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

karol wrote:

Is it true that systemd will be merged in emacs?


@OP
Internet has plenty info, so just try it yourself:
https://github.com/hsitz/VimOrganizer/
https://news.ycombinator.com/item?id=7000953

Trust me bud, i've been looking, this isn't the only site i've been too. But thanks for the motivations.

Offline

#16 2014-11-15 06:42:22

cyberpsych0sis
Member
Registered: 2014-11-02
Posts: 47

Re: Command Line Wiki

ewaller wrote:

It has been said that emacs is a great operating system in search of a decent editor.

And thus the editor war rages on.

Offline

Board footer

Powered by FluxBB