unknown
5/18/25

[#8929] Small fixes to import script
Summary Small fixes to import script
Queue Ansel
Queue Version 1.1.1
Type Enhancement
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester lameventanas (at) gmail (dot) com
Created 03/23/2010 (5535 days ago)
Due
Updated 09/12/2010 (5362 days ago)
Assigned 05/10/2010 (5487 days ago)
Resolved 09/12/2010 (5362 days ago)
Milestone
Patch Yes

History
09/12/2010 10:48:55 PM Michael Rubinsky Comment #11
Assigned to Michael Rubinsky
State ⇒ Resolved
Version ⇒ 1.1.1
Reply to this comment
Sorry for the delay, but finally tweaked and committed to both FW_3 
and git master.

Thanks!
09/12/2010 10:38:11 PM CVS Commit Comment #9 Reply to this comment
Changes have been made in CVS for this ticket:

Add sort order parameter to import script.
Request: 8929
Submitted by: lameventanas (at) gmail (dot) com
http://cvs.horde.org/diff.php/ansel/scripts/recursive_import.php?rt=horder1=1.11.2.2r2=1.11.2.3ty=u
05/10/2010 01:28:00 PM Jan Schneider State ⇒ Assigned
 
04/14/2010 06:27:24 AM lameventanas (at) gmail (dot) com Comment #8
New Attachment: ansel_import_sort.diff Download
Reply to this comment
This patch adds the desired sorting functionality.
04/13/2010 03:30:13 PM Michael Rubinsky Comment #7 Reply to this comment
Would you want to add a switch for this, or should I mark this as resolved?
03/25/2010 01:38:22 PM Michael Rubinsky Comment #6 Reply to this comment
If you install ansel in a different directory (rather than 
HORDE_BASE . '/ansel'), the script won't work.
With my change, it always works.
True...committed, thanks.
I think most people would rather have an alphabetical order rather 
than no order at all (which is how it works now).
It's not "no order at all" - it's the order that the files are 
returned by readdir(), which should be the order that they are stored 
on the filesystem. http://php.net/readdir

Additionally, I wouldn't want my images imported sorted alphabetically 
by default. If anything, I'd want them sorted by the image DateCreated 
time.  If you add a switch for this, I'd be willing to commit it.
03/25/2010 01:31:21 PM CVS Commit Comment #5 Reply to this comment
Changes have been made in CVS for this ticket:

Fix import script for installations where Ansel is not installed under
horde root.
Bug: 8929
Submitted by: lameventanas (at) gmail (dot) com
http://cvs.horde.org/diff.php/ansel/scripts/recursive_import.php?rt=horde&r1=1.11.2.1&r2=1.11.2.2&ty=u
03/25/2010 01:16:39 PM lameventanas (at) gmail (dot) com Comment #4 Reply to this comment
Eh, sorry, not a duplicate, but I don't really understand what you 
are attempting to fix.  The definition of ANSEL_BASE should be fine 
as is.  Why is the ANSEL_BASE definition that is built from 
HORDE_BASE not working for you?
If you install ansel in a different directory (rather than HORDE_BASE 
. '/ansel'), the script won't work.
With my change, it always works.
Regarding the sorting, I'm inclined to reject this. It's assuming 
that the user wants images sorted by filename when importing. Not 
always the case. At the very least if you really want this feature 
to be included you should make it a configuration switch on the 
command line.
I think most people would rather have an alphabetical order rather 
than no order at all (which is how it works now).


03/24/2010 10:02:04 PM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Eh, sorry, not a duplicate, but I don't really understand what you are 
attempting to fix.  The definition of ANSEL_BASE should be fine as is. 
  Why is the ANSEL_BASE definition that is built from HORDE_BASE not 
working for you?

Regarding the sorting, I'm inclined to reject this. It's assuming that 
the user wants images sorted by filename when importing. Not always 
the case. At the very least if you really want this feature to be 
included you should make it a configuration switch on the command line.
03/24/2010 09:52:12 PM Michael Rubinsky Comment #2
State ⇒ Duplicate
Reply to this comment
Duplicate of Bug: 8760
03/23/2010 08:57:18 AM lameventanas (at) gmail (dot) com Comment #1
State ⇒ New
New Attachment: ansel_import.diff Download
Patch ⇒ Yes
Milestone ⇒
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Small fixes to import script
Queue ⇒ Ansel
Reply to this comment
I have made some trivial but important changes in Ansel's import script.

First, it fixes the hard-coding of the installation path of ansel.
Second, it sorts alphabetically the galleries/pictures when importing them.

I have also written a script to import comments from text-files into 
Ansel, but I guess this is too system specific.

Saved Queries