resource/project list

Everything related to our flagship word processor.
Post Reply
lash
Posts: 2
Joined: 2008-09-08 08:27:16

resource/project list

Post by lash »

I often have a project going for which I have many files on my computer. I would like to make a master list of all of the files, with links that would open them automatically within Nisus Writer Pro.

If these resources were on line, I could use the hyperlink tool. But what about hyperlinks to files on my own computer? Is there a handy way to do this?
User avatar
greenmorpher
Posts: 767
Joined: 2007-04-12 04:01:46
Location: Melbourne, Australia
Contact:

Re: resource/project list

Post by greenmorpher »

You might be looking for something like the "Research" folder in Scrivener.

Cheers, Geoff

Geoffrey Heard, Business Writer & Publisher

"Type & Layout: Are you communicating or just making pretty shapes", the secrets of how type can help you to sell or influence, and "How to Start and Produce a magazine or Newsletter", now at the new low price of $29.95. See these books and more at http://www.worsleypress.com or Amazon.
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: resource/project list

Post by Kino »

lash wrote:But what about hyperlinks to files on my own computer?
That does not work at least for me.

For a similar purpose, I use the macro below to put symbolic links to my frequently used files in "/Users/me/Documents/Nisus Documents" to be able to open them from Document Manager, which allows you to open multiple files at once.

A week point of this method is that it is difficult to categorize files: DM does not recognize files in a subfolder. So I have added prefixes to some links by renaming them manually -- e.g. "[label] filename.rtf" -- so that they are sorted conveniently. It is a bit tedious but handy for a limited number of files (up to 20 or 30?).

If you are already using Document Manager for other purpose(s) or you need managing a larger number of files, I think it would be better to create a folder with subfolders for storing aliases to files and put it in the Dock. In Leopard, you have to set the view mode to List to be able to access files in subfolders.

Code: Select all

### AddLink2DocumentManager ###

# This macro is intended to use Document Manager as a kind of
# Essential Files menu.

# Also you can put "/Users/you/Documents/Nisus Documents" in the Dock
# to open them from there.

# The macro creates a symbolic link from the frontmost document to
# "/Users/you/Documents/Nisus Documents".

# The link will appear in the Document Manager as "[link to] filename".
# You can change "[link to] " as you like, by changing the definition
# of $linkPrefix = '[link to] '.

# You can open the original file by hitting Open button in the Document
# Manager.

# When you delete a link in the Document Manager, only the link will be
# removed. The deletion will not affect the original file itself.

$linkPrefix = '[link to] '
Require Application Version '3.1'
Debug.setDestination 'none'

$doc = Document.active
if $doc == undefined
	Exit 'No open document, exit...'
else
	$sourcePath = $doc.filePath
	if $sourcePath == undefined
		Exit 'This is an unsaved document, exit...'
	end
end

$documentManagerPath = User Property 'document manager folder path'
$documentManagerExists = File.existsAtPath $documentManagerPath
if ! $documentManagerExists  # i.e. if "~/Documents/Nisus Documents" foler does not exist...
	$check = File.createFolderWithPath $documentManagerPath  # create the folder
	if ! $check  # if the command above returned an error...
		Exit 'Could not create \"$documentManagerPath\", exit...'  # permission problem?
	else
		Debug.log "Created \"$documentManagerPath\"."
	end
end

$linkName = $linkPrefix & $sourcePath.lastFilePathComponent
$linkPath = $documentManagerPath.filePathByAppendingComponent $linkName

Set Exported Perl Variables 'sourcePath', 'linkPath'
begin Perl
	`ln -fs "$sourcePath" "$linkPath"`;
	# create a symlink overwriting the like of the same name if any
end

Menu ':Window:Document Manager'  # open or refresh Document Manager

### end of macro ###
formatted macro file:
http://www2.odn.ne.jp/alt-quinon/files/ ... er_nwm.zip
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: resource/project list

Post by martin »

lash wrote:But what about hyperlinks to files on my own computer? Is there a handy way to do this?
I don't know about handy, but you can create a hyperlink to a file on your local computer. As the "link destination" you'll need to use the form:

Code: Select all

file:///Users/yourloginname/whatever/path/file.rtf
So if your OSX login name is "lash" and you had a file "test.rtf" on your desktop the link destination would be:

Code: Select all

file:///Users/lash/Desktop/test.rtf
The following macro will copy the link destination of the active/frontmost document to the clipboard:

Code: Select all

Require Application Version 1.1
$doc = Document.active
If ! $doc
	Prompt 'There is no active document.'
	Exit
End

$path = $doc.filePath
$link = 'file://' & $path
$link = Cast to String $link
Write Clipboard $link
lash
Posts: 2
Joined: 2008-09-08 08:27:16

Re: resource/project list

Post by lash »

Thanks for the info; I will give it a try.
Post Reply