request - preference to not download duplicate

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

request - preference to not download duplicate

Pedro
hi,

thanks for 'being there' for pan development.

something I would like to see if preferences for duplicates

at present pan looks for existing and appends a '_copy_x' to the
filename, where x is a subsequent number, usually copy_2

it would be trivial, so trivial I will do this and recompile, to either
ignore duplicates, which saves me from downloading it, or to overwrite
newer or larger files.

more specifically.

decoder.cc calls getuniquefilename , which puts copy into it.
should be able to cancel all cop1_? decodes

char * fname = file::get_unique_fname(save_path.c_str(),
                                               (item->filename
                                                && *item->filename)
                                               ? item->filename
                                               : "pan-saved-file" )

so like if fname == *copy_?, ignore it and do not decode if preferences
are set that way. though better to return null in file-util.cc which is
called there (I assume)..

specifically char*

file :: get_unique_fname

   else if (is_nonempty_string(path))
       {
          unique = g_strdup_printf ("%s%c%s_copy_%d%s",
                              path, G_DIR_SEPARATOR,
                              lead, i, tail);

**


another suggestion would be for an import/export of headers for backup
purposes... some of these are gigabytes these days.


examples of regex with pan would be good too.


thanks


_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

Jim Henderson-4
On Wed, 29 Mar 2017 17:38:08 +1100, Pedro wrote:

> it would be trivial, so trivial I will do this and recompile, to either
> ignore duplicates, which saves me from downloading it, or to overwrite
> newer or larger files.

That doesn't account for the possibility of two completely different
files with the same filename, though. :)

--
 Jim Henderson
 Please keep on-topic replies on the list so everyone benefits


_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

Pedro
then I would also check for filesize, in any case, give the user the
option and with a warning.


for advanced searches of usenet headers or for that matter downloads,
check out recoll, for linux. should be able to resuse it if it is freeware.


On 30/03/17 09:34, Jim Henderson wrote:
> On Wed, 29 Mar 2017 17:38:08 +1100, Pedro wrote:
>
>> it would be trivial, so trivial I will do this and recompile, to either
>> ignore duplicates, which saves me from downloading it, or to overwrite
>> newer or larger files.
> That doesn't account for the possibility of two completely different
> files with the same filename, though. :)
>


_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

Pedro
just thought of another suggestion for improvement

when saving binaries , shift-s, select location

give the option to send to start of pan tasks queue. maybe also option
for start paused.

a timer for tasks (see chron for linux) would be neat too. (I have a
workaround for that using gnome schedule and either of these two
commands. put gnome-schedule into startup applications (gnome
applications, system tools , preferences, startup applications.)


kill -SIGSTOP $(pidof pan)
kill -SIGCONT $(pidof pan)


for ubuntu 14.04



On 30/03/17 11:27, Pedro wrote:

> then I would also check for filesize, in any case, give the user the
> option and with a warning.
>
>
> for advanced searches of usenet headers or for that matter downloads,
> check out recoll, for linux. should be able to resuse it if it is
> freeware.
>
>
> On 30/03/17 09:34, Jim Henderson wrote:
>> On Wed, 29 Mar 2017 17:38:08 +1100, Pedro wrote:
>>
>>> it would be trivial, so trivial I will do this and recompile, to either
>>> ignore duplicates, which saves me from downloading it, or to overwrite
>>> newer or larger files.
>> That doesn't account for the possibility of two completely different
>> files with the same filename, though. :)
>>
>
>
> _______________________________________________
> Pan-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/pan-users
>
>


_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

Rhialto
On Thu 30 Mar 2017 at 11:41:59 +1100, Pedro wrote:
> a timer for tasks (see chron for linux) would be neat too. (I have a
> workaround for that using gnome schedule and either of these two commands.
> put gnome-schedule into startup applications (gnome applications, system
> tools , preferences, startup applications.)

There is a command line option to run Pan headless with a given nzb
file. You can also use the download queue from the GUI, I believe.
So you can execute that from cron at a schedule you like.

> kill -SIGSTOP $(pidof pan)
> kill -SIGCONT $(pidof pan)

Yes I sometimes use that sort of trick as well. But maybe for Pan you
don't really need it.

-Olaf.
--
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl    -- are condemned to reinvent it. Poorly.

_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users

signature.asc (465 bytes) Download Attachment
RW
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

RW
In reply to this post by Pedro
On Wed, 29 Mar 2017 17:38:08 +1100
Pedro wrote:

> hi,
>
> thanks for 'being there' for pan development.
>
> something I would like to see if preferences for duplicates
>
> at present pan looks for existing and appends a '_copy_x' to the
> filename, where x is a subsequent number, usually copy_2
>
> it would be trivial, so trivial I will do this and recompile, to
> either ignore duplicates, which saves me from downloading it, or to
> overwrite newer or larger files.

What I'd like to see is is that pan downloads a renamed file and then
deletes it if it's an exact copy of the original (or any of the
files with intermediate names).




_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request - preference to not download duplicate

Duncan-42
RW posted on Sat, 29 Apr 2017 13:26:23 +0100 as excerpted:

> On Wed, 29 Mar 2017 17:38:08 +1100 Pedro wrote:
>
>> hi,
>>
>> thanks for 'being there' for pan development.
>>
>> something I would like to see if preferences for duplicates
>>
>> at present pan looks for existing and appends a '_copy_x' to the
>> filename, where x is a subsequent number, usually copy_2
>>
>> it would be trivial, so trivial I will do this and recompile, to either
>> ignore duplicates, which saves me from downloading it, or to overwrite
>> newer or larger files.
>
> What I'd like to see is is that pan downloads a renamed file and then
> deletes it if it's an exact copy of the original (or any of the files
> with intermediate names).

Now /that/ would be useful. =:^)

Meanwhile, FWIW, the whole general lack of control when doing mass
downloads, all to the same location, is one reason I tend to configure
pan with a much larger cache (the default is only 10 MB, not enough for
this usage style, I use a cache of multiple GB), download all messages to
cache, and then go thru after everything's cached and sort and save off
attachments to subdirs named by post series, etc.

Then I clear the cache and start again by downloading to cache.

--
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


_______________________________________________
Pan-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/pan-users
Loading...