Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 08:25:22 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Anyone have any tips for ASCII formatting?  (Read 4396 times)

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Anyone have any tips for ASCII formatting?
« on: December 06, 2009, 04:39:32 AM »
I don't really know any ASCII formatting (like the ones you see in Gamefaqs) so I've been making liberal use of the =, -, [,] symbols.

Any other advice like text editor and symbols. (For ex. I have no idea how to make a decent Table of Contents yet.)

It's just nowadays I've been relying on DropBox's free 2gb for back ups and .txt is the lightest, most convenient cross-OS format I know of.

I've even resorted to typing up webpages instead of using web clippers.

I'm just angry that when a program dies down (or in my case because I switched to Linux), it's a hell of a lot of work extracting those notes because exports only work on the same program.

Then I hate that I'm connected to one/couple of external HDs so I decided I might just as well squeeze all 2gb with text files. At least it's easier to recover compared to HDs and sticks.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #1 on: December 06, 2009, 06:29:56 AM »
There are several markup languages that use ascii input to generate various outputs: markdown, asciidoc, textile. However, none of these generate a TOC in the ascii document itself. They are just markup languages like html or that dreaded [[wiki markup]] and need further processing to look pretty.

I wonder if an outliner thingie like The Vim Outliner (TVO) can help you organize things. Although it seems the site is a little old. According to the snippet on google result, TVO has automatic generation of TOC. But you need to know your way around vim for TVO to be useful.

I'll ask a friend for a solution with emacs; it seems to me emacs would be able to do this sort of ascii-based word processing.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #2 on: December 07, 2009, 01:07:31 PM »
The friend has responded and suggested to use org-mode and muse with emacs.

He further suggests to look into the emacs wiki.

Hope it helps! :)

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #3 on: December 07, 2009, 09:49:41 PM »
Thanks but I knew about org mode already.

I was hoping for something that doesn't tie me in to commands on a single text editor and also from what I've seen of it (I haven't actually tried it), it's more of a simplification on the emacs command to produce an equivalent to-do list/outliner for emacs instead of switching to another program. (In that sense, it's more to keep it all in one program than to provide a separate product with it's own unique features)

Muse sounds interesting though. I'll look into it when I can finally understand how to use emacs.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #4 on: December 07, 2009, 10:17:02 PM »
Would a seperate program work, that parses your text file and inserts the generated TOC at a specified location in the file? You know, like a really simple template engine>

Quote
                                  Paul's Notes

{{{TOC}}}

Entry 1
    Dear diary and so forth

    blah

Entry 2
    and then...


would become

Quote
                                  Paul's Notes
{{{TOC}}}
    Table of Contents
        Entry 1
        Entry 2
{{{/TOC}}}

Entry 1
    Dear diary and so forth

    blah

Entry 2
    and then...


Such a parser should be easy to program, but would need to be run after adding or removing entries.

Does the TOC have to be inserted in-place in the same file or is it acceptable to generate an output file --which is not supposed to be edited but only read-- from the original file?

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #5 on: December 12, 2009, 03:36:42 AM »
I think a cross-OS read-only output file would be better as it's separate from a specific text editor.

I worry about the limitations though.

An in-place TOC works because you can use the text editor's find feature to find the section but how would an output file do that?

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #6 on: December 12, 2009, 12:01:42 PM »
The TOC in the output file can easily be generated from the input file (that is the file which you edit). However, I consider updating the TOC in the same file that you are editing difficult without any sort of mark up.

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #7 on: December 13, 2009, 04:06:06 AM »
How expansive would creating a custom markup be?

Do you need to rely on any standard? Even markdown IMO seems overkill and not really compatible with my usage of the [], (), *, symbols.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #8 on: December 13, 2009, 06:19:05 PM »
The markup could be whatever, there is no standard. And since a programmer would most likely program this parser from scratch, she/he could come up with whatever markup language (WML?) is suitable.

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #9 on: December 17, 2009, 01:31:57 AM »
How about this?

Big Red Font:

===
text
===

Big black font:

------
text
------

Small Blue Font:

[[text]]

Small Light Blue Font:

[text]

Small Red Font:

[[[text]]]

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #10 on: December 17, 2009, 10:53:31 PM »
That looks doable. How would you mark items that should be listed in the TOC?

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #11 on: December 19, 2009, 12:53:51 AM »
(Sorry, I forgot that most mark-ups changes the formatting within the text file itself)

The colors and size of the fonts are meant to be the TOC markings.

I didn't really mean for the symbols to actually format the actual text inside the file.


housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #12 on: December 19, 2009, 06:44:29 AM »
Still: How would the parser know which items to add to the generated TOC?

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #13 on: December 19, 2009, 07:55:32 AM »
Maybe I misunderstood but isn't for example:

[[[text]]]

...mean that a parser would add any text item enclosed in [[[]]] symbols to the TOC?

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #14 on: December 19, 2009, 12:51:21 PM »
I think I see it now. And with the other mark ups you could color code the entries.

Well we finally have that sorted :) Now about the parser: do you have python installed on your PC?

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,100
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #15 on: December 19, 2009, 05:47:14 PM »
Maybe YAML is a solution. Not too much extra syntax (if you don't want to) and has already parsers for languages:
C/C++, Java, Python, Ruby, Perl, C#/.NET, PHP, OCaml, Javascript, Actionscript and Haskell

Paul Keith

  • Member
  • Joined in 2008
  • **
  • Posts: 1,982
    • View Profile
    • Donate to Member
Re: Anyone have any tips for ASCII formatting?
« Reply #16 on: December 19, 2009, 10:19:52 PM »
I think I see it now. And with the other mark ups you could color code the entries.

Well we finally have that sorted :) Now about the parser: do you have python installed on your PC?

Yes