Page 1 of 1

print outline?

Posted: Mon Sep 11, 2006 3:57 pm
by soliphint
Is it possible to print only the outline of a document?

Posted: Mon Sep 11, 2006 4:52 pm
by macsailor
Not AFAIK, but it might be a hidden feature :wink:

But it would be great if it was possible to do.

Posted: Mon Sep 11, 2006 6:09 pm
by zoul
This should be an easy thing to do using XSL (exporting the outline to plaintext or HTML). Maybe somebody has already done this? Or I could give it a try, should be done in a few hours.

(Edit: Yes, so it took 40 minutes with plain text. I’ll wrap it up in a nice script and post an address.)

Posted: Mon Sep 11, 2006 6:59 pm
by macsailor
Great, can hardly wait…

Posted: Mon Sep 11, 2006 7:15 pm
by soliphint
Great. Thank you.

Posted: Mon Sep 11, 2006 8:26 pm
by zoul
OK, here it goes: http://mellel.davi.cz/. I guess the XSL style is a good starting point for anybody who wants to write some other kind of outliner, for example an HTML outliner or an OPML export.

Posted: Wed Sep 13, 2006 7:54 pm
by matthias
zoul wrote:OK, here it goes: http://mellel.davi.cz/. I guess the XSL style is a good starting point for anybody who wants to write some other kind of outliner, for example an HTML outliner or an OPML export.
zoul,
that sounds really great. The only thing is I have absolutly no idea how I run a Perl script. Do I have to deal with the terminal or the apple script editor?

Matthias

Posted: Wed Sep 13, 2006 8:19 pm
by zoul
Heh, sorry :) I did not know how much verbose I should be. You have to download the script, save it somewhere on your path, make it executable and you are ready to go.

1) Downloading should be no trouble at all.
2) Putting it on your path. This is a bit tricky. If you just want to play with it, simply drop it into the directory with the document.
3) Make it executable. Open Terminal and go to the directory with the script. This is done using the “cd” command, for example to go your Desktop you issue this:

Code: Select all

cd Desktop
Then you want to make it executable:

Code: Select all

chmod a+x outline
4) Run it. Assuming the script is in the current directory and the document is called “Test.mellel”, you will issue this in the Terminal:

Code: Select all

./outline Test.mellel
But I realize this is not foolproof nor very convenient for those not on friendly terms with Terminal, I’ll try to create an Automator workflow.

Posted: Wed Sep 13, 2006 8:28 pm
by matthias
zoul wrote:Heh, sorry :) I did not know how much verbose I should be. You have to download the script, save it somewhere on your path, make it executable and you are ready to go.

1) Downloading should be no trouble at all.
2) Putting it on your path. This is a bit tricky. If you just want to play with it, simply drop it into the directory with the document.
3) Make it executable. Open Terminal and go to the directory with the script. This is done using the “cd” command, for example to go your Desktop you issue this:

Code: Select all

cd Desktop
Then you want to make it executable:

Code: Select all

chmod a+x outline
4) Run it. Assuming the script is in the current directory and the document is called “Test.mellel”, you will issue this in the Terminal:

Code: Select all

./outline Test.mellel
But I realize this is not foolproof nor very convenient for those not on friendly terms with Terminal, I’ll try to create an Automator workflow.
zoul,
this really sounds great, but you pointed to an important detail: it is not foolproof. So I guess I will wait a few days – be assured I have great trust in your programming skills - before start running something as intimidating as the terminal. :)

Posted: Wed Sep 13, 2006 9:28 pm
by zoul
Automator seems to be a bit fishy, but I managed.

1) Go to http://mellel.davi.cz/ and download the Outliner.zip package.
2) Unzip, you’ll get the Automator workflow and the XSL template.
3) Put the template into your home directory.
4) Open the template with a text editor and set the names of the styles you would like to see in the outline. Save.
5) Open the workflow in the Automator. Save the workflow as Finder plugin, call it Outline.
6) Select a Mellel document in the Finder, right-click, choose Automator>Outline. Pray.
7) Be happy.

[Edit: I am almost certain that this will not work for documents or paths with spaces in their names.]

Posted: Fri Sep 15, 2006 9:07 am
by matthias
zoul wrote:Automator seems to be a bit fishy, but I managed.

1) Go to http://mellel.davi.cz/ and download the Outliner.zip package.
2) Unzip, you’ll get the Automator workflow and the XSL template.
3) Put the template into your home directory.
4) Open the template with a text editor and set the names of the styles you would like to see in the outline. Save.
5) Open the workflow in the Automator. Save the workflow as Finder plugin, call it Outline.
6) Select a Mellel document in the Finder, right-click, choose Automator>Outline. Pray.
7) Be happy.

[Edit: I am almost certain that this will not work for documents or paths with spaces in their names.]
zoul,

Thanks for all work! I really appreciate it. I downloaded the file and followed your instructions. But when applying the action via context menu to the respective Mellel file I get an empty TextEdit document only. Could this be because the names of the auto-titles contain diacritics and spaces (e.g. Überschrift I)? I'll play around with it when I have a more time.

Matthias

Posted: Fri Sep 15, 2006 9:49 am
by zoul
Matthias, keep going, you are close! :) I finally found some more time to look into the file format and I have found a way to pick the correct autotitles without having the user to specify them [this should among else get rid of the problem you found]. I will upload the new version with new instructions to the web soon (~ half an hour).