Reply to topic  [ 6 posts ] 
Need TOC Macro for Journal/Diary 
Author Message

Joined: 2017-06-13 09:21:48
Posts: 6
I don't know if this is possible. I want to be able to create a new document, with an entire year's dates pasted in, and then have a macro add them to the TOC as 365 separate entries, with hard returns between each day so when I make my entries, they don't extend the TOC date entry.
I auto create a year's worth of days and dates, then I export them into a new NisusWriter Pro document. Ideally, the weekday, month date is in bold, after the year are a couple of hard returns. See below:
Monday, Jan 29, 2018

Tuesday, Jan 30, 2018
This is easy to do. No problems.

The real time consumer: I use the Navigator panel for moving around my journal. (And please let me know if this is ill advised or if there's a better way). I use the TOC/Navigator LEVELS 1-5 for Monday through Friday, and 3,4 for Sat and Sun.
This way they stand out in the Navigator side panel.
Example:
Monday, Jan 29
-----Tuesday, Jan 30
----------Wednesday, Jan 31
---------------Thursday, Feb 1
--------------------Friday, Feb 2
---------- Saturday, Feb 3
------------------- Sunday, Feb 4 (I added the dashes because this message eliminates spaces and there are no tabs)

If I try to add multiple dates to TOC in one go, then they all go in as one entry. (I leave the year out of TOC because 1. I don't need it, but also 2. So it doesn't extend the TOC entry. I've found that if the TOC item includes spaces at the end and I start typing in those spaces, I can wind up with a thousand word TOC entry. Leaving off the year number keeps this from happening.
[I once tried using FileMaker Pro for a journal. Worked great. I could write for hours and then FMP just deleted everything past a certain small number of characters.]
My current journal is over 2 million characters. I like using the journal for many reasons, one of the best is that I can then just search for specific words and immediately find my entry or notes on that topic. I usually wind up spending more than a few hours adding each date into the Navigator/TOC one at a time. Also when I'm writing something with multiple chapters/sections I'd like to be able to do the same thing with the outline I've pasted to organize my writing.
Thanks


2017-09-10 06:11:09
Profile

Joined: 2012-12-19 05:02:52
Posts: 199
Will N too wrote:
I once tried using FileMaker Pro for a journal. Worked great. I could write for hours and then FMP just deleted everything past a certain small number of characters.

How can that be? The technical specifications of FileMaker Pro 12 and newer say that you can have up to 1 billion characters per field (limited by available memory.)
They don't say how much memory one needs for a field with 1 billion characters though. :-)


2017-09-11 01:52:24
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 852
Location: Japan
Hello Will,
Try the following macro. To run it make sure to select the last date in your file (e.g. Sunday, Feb 5, 2017). The macro should then add a year's worth of dates with TOC formating per your instructions.
NB: Try running it on a test file to see how it works, before running it on something important.


Attachments:
Create Journal Dates (Will N Too).nwm [4.2 KiB]
Downloaded 20 times

_________________
philip
2017-09-11 08:42:56
Profile

Joined: 2012-12-19 05:02:52
Posts: 199
Hello Philip,

Thank you for this very useful macro.

I don't know if it's just me, but when I run the macro unaltered, I get this error:

Unknown menu item path: Set Bold @true

If I remove the line, I get:

Unknown menu item path: Set Bold @false

If I just use "Bold", it runs fine.

Code:
Bold
Type Text $textDate
Bold


2017-09-12 03:46:41
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 852
Location: Japan
Þorvarður wrote:
I don't know if it's just me, but when I run the macro unaltered, I get this error:

Unknown menu item path: Set Bold @true

The macro documentation lists the Set Bold @true/false as being part of the language since NWP v.2.1.5. Is it possible you are still running something older? (I'm on 2.1.7).

Obviously using Bold will work, but Bold just toggles the state, so you can't be sure whether you are turning it on or off.

_________________
philip


2017-09-12 03:52:42
Profile

Joined: 2012-12-19 05:02:52
Posts: 199
phspaelti wrote:
Is it possible you are still running something older?

Yes, you are right. That's the reason then. Thanks for clarifying.


2017-09-12 04:38:35
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software