Thread Locked This thread is locked - replies are not allowed.


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 15 - Pages: 2 [ 1 2 | Next ] - Last Post: 29 Jun 21, 17:05 Last Post By: JeffTucker
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
General method to copy extra files to the folder output directory
Posted: 26 Jun 21, 09:56
 
Some users require extra files in the output directory, for instance zip-, gpx- and klm-files to show a route. As an example see this thread.
Or extra image files used for the theme image or to show a height profile and of course html files for users who like to add extra functions the to the index page like more info or map pages.

It would be nice if this general solution, which works for all skins, could be implemented::

If a folder image directory contains a folder out, jAlbum should copy all files in that folder to the folder output directory. Jalbum should not process that out folder as a normal folder, in the same way as is done with a res folder.
davidekholm

Posts: 3,903
Registered: 18-Oct-2002
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 11:16   in response to: AndreWolff in response to: AndreWolff
 
Attachment predir.bsh (134 bytes)
I'll consider this. Any one else commenting on this?

You can trigger this behavior in jAlbum today by creating a folder called "out", then exclude it, and add the attached "predir.bsh" file to your skin's folder.

I include the contents of this "predir.bsh" here:
File outDir = new File(imageDirectory, "out");
if (outDir.exists()) {
	IO.copyDirectoryContent(outDir, outputDirectory, false);
}
RobM

Posts: 3,782
Registered: 4-Aug-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 11:29   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
I'll consider this. Any one else commenting on this?

You can trigger this behavior in jAlbum today by creating a folder called "out", then exclude it, and add the attached "predir.bsh" file to your skin's folder.

I include the contents of this "predir.bsh" here:

File outDir = new File(imageDirectory, "out");
if (outDir.exists()) {
	IO.copyDirectoryContent(outDir, outputDirectory, false);
}
I have a sense of déjà-vu. The linked post above, filetypes.xml and your previous posting of the code above combine to give the feeling of being stuck in a nightmarish recursive loop.
Will it ever end? ;)
RobM

Posts: 3,782
Registered: 4-Aug-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 12:32   in response to: RobM in response to: RobM
 
How is this to work?
Will the skin create the ‘out’ folder, JAlbum make one for every folder or the user?

How does the user add files to the folder, Shift clicking the address bar to pen the directory or via the skin’s gui? Without a custom filetypes.xml being added you can’t t use drag and drop, with a custom filetypes.xml you don’t really need the special folder, the skin can automatically exclude such files.

If this is implemented I would like a special folder for alternative images, so a slide can have two images - either side by side or swapped. And a special folder for videos, so a small video can be used for mobiles and a large one for desktops. And, well I’m sure there are loads of other cases skin developers can come up with.

In short, I don’t like it. It can easily give a very messy user experience.
JeffTucker

Posts: 7,933
Registered: 31-Jan-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 12:39   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
Any one else commenting on this?

Since you asked....

A rare use case, and there are already plenty of tools to take care of it, including jAlbum solutions like those already posted, O/S scripting files, and, finally, File Explorer and Finder. If there is a recurring need for something like this, letting a user provide his own filetypes.xml, and even better, letting a skin provide one, should cover it.

A user might want to make a cup of tea while waiting for a large album to be built, but that doesn't mean jAlbum should provide a kettle.
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 12:42   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
I include the contents of this "predir.bsh" here:[

Yes that works perfect, thanks a lot!

But I still prefer that this is added to the jAlbum program:

1. A skin cannot disable the out folder automatically
2. If the user selects another skin, he suddenly see an out folder in the album

The contents of the out folder can sometimes be used by any skin, for instance my method of showing a GPS track can be used in any skin.
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 12:48   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
If there is a recurring need for something like this, letting a user provide his own filetypes.xml, and even better, letting a skin provide one, should cover it.

That does not work, because I use image files for a height profile or for special theme images, so in that case these images are automatically processed, placed in the slides directory and shown on the wrong place.
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 12:52   in response to: RobM in response to: RobM
 
RobM wrote:
How is this to work?
Will the skin create the ‘out’ folder, JAlbum make one for every folder or the user?
Of course not, the user creates the folder if required.
In short, I don’t like it. It can easily give a very messy user experience.
I know of course that your both are in principle against all my requests!
JeffTucker

Posts: 7,933
Registered: 31-Jan-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 13:04   in response to: AndreWolff in response to: AndreWolff
 
AndreWolff wrote:
I know of course that your both are in principle against all my requests!

Please knock if off with the "I'm just a poor victim" nonsense. It's really tiresome. I've had feature requests kicking around for years that have never been implemented.

This request is just a messy, bad idea. That's why we oppose it.

I'd like to see the custom filetypes.xml extended to the skin. Second, it should be possible to add a res subfolder at any level of the project, and have its contents (whatever is in there) copied to a corresponding res folder in the output. Such a folder is already ignored for processing purposes, even if it appears ten levels deep in the project. All that's missing is to have jAlbum copy it to the output. It currently does that at the root level, but not at the folder level.

No need for yet another "custom" folder. And we don't need to have jAlbum just guessing about where those files should land in the output - just stick to input res to output res.
RobM

Posts: 3,782
Registered: 4-Aug-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 13:50   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
AndreWolff wrote:
I know of course that your both are in principle against all my requests!

Please knock if off with the "I'm just a poor victim" nonsense. It's really tiresome. I've had feature requests kicking around for years that have never been implemented.

This request is just a messy, bad idea. That's why we oppose it.

There are many things I’ve done, like two images to a slide, replacing the theme image with a thumbnail, allowing different styles for subfolders, inheriting/overriding theme images, to name a few. But I don’t often ask for them to be part of the core, and I certainly don’t complain if an idea is rejected. The forum say Requests.

@David, can we have a forum just for Andre named Demands ;)
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 14:56   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
This request is just a messy, bad idea. That's why we oppose it.
Neither you nor Rob really have a compelling argument as to why this shouldn't be implemented.
jimberry

Posts: 559
Registered: 30-Aug-2004
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 15:06   in response to: AndreWolff in response to: AndreWolff
 
A compelling argument for not implementing this idea is that Andre does not have a compelling argument for implementing it ;)
AndreWolff

Posts: 2,183
Registered: 14-Dec-2007
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 15:23   in response to: jimberry in response to: jimberry
 
jimberry wrote:
A compelling argument for not implementing this idea is that Andre does not have a compelling argument for implementing it ;)
See here and here.
JeffTucker

Posts: 7,933
Registered: 31-Jan-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 15:30   in response to: jimberry in response to: jimberry
 
jimberry wrote:
A compelling argument for not implementing this idea is that Andre does not have a compelling argument for implementing it ;)

I'm going to press hard for implementation of my idea of providing a tea kettle with every license. It would be very handy, and no one can tell me why jAlbum shouldn't do it.

My earlier suggestion about a way to increase sales has never been implemented. David hasn't even provided me with an explanation of what's wrong with the idea.

RobM

Posts: 3,782
Registered: 4-Aug-2006
Re: General method to copy extra files to the folder output directory
Posted: 29 Jun 21, 16:17   in response to: JeffTucker in response to: JeffTucker
 
Three votes against, one for. I trust David to make the correct decision and think further posts are about as useful as the idea.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums