Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Elephant, n.: A mouse built to government specifications.


dovenet / Synchronet Javascript / FileBase - Add to batch downloads?

SubjectAuthor
* FileBase - Add to batch downloads?Nightfox
`* FileBase - Add to batch downloads?Digital Man
 `* FileBase - Add to batch downloads?Nightfox
  `* FileBase - Add to batch downloads?Digital Man
   `- FileBase - Add to batch downloads?Nightfox

1
FileBase - Add to batch downloads?

<61F18577.3536.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=702&group=DOVE-Net.Synchronet_Javascript#702

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: FileBase - Add to batch downloads?
Message-ID: <61F18577.3536.dove_sync_js@digitaldistortionbbs.com>
Date: Wed, 26 Jan 2022 02:31:35 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.19b-Win32 master/a2a9dc027 Jan 2 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220126094338-0800 41e0
WhenExported: 20220126105761-0800 41e0
ExportedFrom: VERT sync-js 3604
WhenImported: 20220126093135-0800 41e0
WhenExported: 20220126094335-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3536
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Wed, 26 Jan 2022 10:31 UTC

Hi DM,

Synchronet's JS object model has had bbs.batch_add_list() for a while now. With each file in the list, it has to search the whole file database to see if and where the file exists in the filebases.

Now that there is a FileBase class, I'm wondering if it would make sense for the FileBase class to have a similar batch_add function, for files just within that filebase? I've been working on a lightbar file lister, and if the user wants to add one of the files in that filebase to their batch download queue, I was thinking it might make sense for the FileBase class to have its own batch_add function, so that Synchronet wouldn't have to search through all of the filebases for that file.

If there already is such a function in the FileBase class, I'm not seeing it in the current documentation.. Maybe I missed it?
http://www.synchro.net/docs/jsobjs.html#FileBase_class

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

FileBase - Add to batch downloads?

<61F1C454.3605.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=703&group=DOVE-Net.Synchronet_Javascript#703

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: FileBase - Add to batch downloads?
Message-ID: <61F1C454.3605.sync-js@vert.synchro.net>
Date: Wed, 26 Jan 2022 06:59:48 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F18577.3536.dove_sync_js@digitaldistortionbbs.com>
References: <61F18577.3536.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/9187c26df Jan 25 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220126135948-0800 41e0
WhenExported: 20220126165758-0800 41e0
ExportedFrom: VERT sync-js 3605
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Wed, 26 Jan 2022 14:59 UTC

Re: FileBase - Add to batch downloads?
By: Nightfox to Digital Man on Wed Jan 26 2022 09:31 am

> Hi DM,
>
> Synchronet's JS object model has had bbs.batch_add_list() for a while now.
> With each file in the list, it has to search the whole file database to see
> if and where the file exists in the filebases.
>
> Now that there is a FileBase class, I'm wondering if it would make sense for
> the FileBase class to have a similar batch_add function, for files just
> within that filebase? I've been working on a lightbar file lister, and if
> the user wants to add one of the files in that filebase to their batch
> download queue, I was thinking it might make sense for the FileBase class to
> have its own batch_add function, so that Synchronet wouldn't have to search
> through all of the filebases for that file.
>
> If there already is such a function in the FileBase class, I'm not seeing it
> in the current documentation.. Maybe I missed it?
> http://www.synchro.net/docs/jsobjs.html#FileBase_class

No, there isn't a per-base "add to batch download queue" method (yes, I could add one pretty easily). However, the batch lists are now just .ini files (for details, see https://wiki.synchro.net/history:newfilebase#batches), so adding/removing files to the queue from a JS module should be pretty trivial. I'm pretty sure you know the File class has methods for dealing with .ini files.
--
digital man (rob)

Synchronet "Real Fact" #22:
The second ever Synchronet BBS was the Mid-Nite Hacker BBS (sysop: The Zapper)
Norco, CA WX: 69.7°F, 16.0% humidity, 3 mph NNW wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

FileBase - Add to batch downloads?

<61F1DB44.3538.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=704&group=DOVE-Net.Synchronet_Javascript#704

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: FileBase - Add to batch downloads?
Message-ID: <61F1DB44.3538.dove_sync_js@digitaldistortionbbs.com>
Date: Wed, 26 Jan 2022 08:37:40 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F1C454.3605.sync-js@vert.synchro.net>
References: <61F1C454.3605.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19b-Win32 master/a2a9dc027 Jan 2 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220126154341-0800 41e0
WhenExported: 20220126165758-0800 41e0
ExportedFrom: VERT sync-js 3606
WhenImported: 20220126153740-0800 41e0
WhenExported: 20220126154336-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3538
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Wed, 26 Jan 2022 16:37 UTC

Re: FileBase - Add to batch downloads?
By: Digital Man to Nightfox on Wed Jan 26 2022 01:59 pm

DM> No, there isn't a per-base "add to batch download queue" method (yes, I
DM> could add one pretty easily). However, the batch lists are now just .ini
DM> files (for details, see
DM> https://wiki.synchro.net/history:newfilebase#batches), so adding/removing
DM> files to the queue from a JS module should be pretty trivial. I'm pretty
DM> sure you know the File class has methods for dealing with .ini files.

It looks like the bbs.batch_add_list() function (which has been around since version 3.10) is able to add files to the user's batch download list, and it seems the file format it expects is just one filename per line. Are you recommending to no longer use bbs.batch_add_list() but to write an ini file instead?

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

FileBase - Add to batch downloads?

<61F1F043.3607.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=705&group=DOVE-Net.Synchronet_Javascript#705

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: FileBase - Add to batch downloads?
Message-ID: <61F1F043.3607.sync-js@vert.synchro.net>
Date: Wed, 26 Jan 2022 10:07:15 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F1DB44.3538.dove_sync_js@digitaldistortionbbs.com>
References: <61F1DB44.3538.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/9187c26df Jan 25 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220126170715-0800 41e0
WhenExported: 20220126225751-0800 41e0
ExportedFrom: VERT sync-js 3607
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Wed, 26 Jan 2022 18:07 UTC

Re: FileBase - Add to batch downloads?
By: Nightfox to Digital Man on Wed Jan 26 2022 03:37 pm

> Re: FileBase - Add to batch downloads?
> By: Digital Man to Nightfox on Wed Jan 26 2022 01:59 pm
>
> DM> No, there isn't a per-base "add to batch download queue" method (yes, I
> DM> could add one pretty easily). However, the batch lists are now just
> DM> .ini files (for details, see
> DM> https://wiki.synchro.net/history:newfilebase#batches), so
> DM> adding/removing files to the queue from a JS module should be pretty
> DM> trivial. I'm pretty sure you know the File class has methods for
> DM> dealing with .ini files.
>
> It looks like the bbs.batch_add_list() function (which has been around since
> version 3.10) is able to add files to the user's batch download list, and it
> seems the file format it expects is just one filename per line. Are you
> recommending to no longer use bbs.batch_add_list() but to write an ini file
> instead?

Correct. If you want to add files fast, open the appropriate file (as mentioned in that wiki article) and add the file details.

Or you can wait and I'll add a FileBase() method to do that for you, but it won't exist in v3.19b. Opening and updating the .ini file will work for v3.19b and future versions.
--
digital man (rob)

Synchronet "Real Fact" #108:
Weedpuller "Falling Star" http://youtu.be/J0ijOUT7KIw
Norco, CA WX: 64.3°F, 20.0% humidity, 0 mph NNW wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

FileBase - Add to batch downloads?

<61F1F32C.3540.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=706&group=DOVE-Net.Synchronet_Javascript#706

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: FileBase - Add to batch downloads?
Message-ID: <61F1F32C.3540.dove_sync_js@digitaldistortionbbs.com>
Date: Wed, 26 Jan 2022 10:19:40 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F1F043.3607.sync-js@vert.synchro.net>
References: <61F1F043.3607.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19b-Win32 master/a2a9dc027 Jan 2 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220126174341-0800 41e0
WhenExported: 20220126225751-0800 41e0
ExportedFrom: VERT sync-js 3608
WhenImported: 20220126171940-0800 41e0
WhenExported: 20220126174338-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3540
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Wed, 26 Jan 2022 18:19 UTC

Re: FileBase - Add to batch downloads?
By: Digital Man to Nightfox on Wed Jan 26 2022 05:07 pm

>> line. Are you recommending to no longer use bbs.batch_add_list() but
>> to write an ini file instead?

DM> Correct. If you want to add files fast, open the appropriate file (as
DM> mentioned in that wiki article) and add the file details.

DM> Or you can wait and I'll add a FileBase() method to do that for you, but
DM> it won't exist in v3.19b. Opening and updating the .ini file will work for
DM> v3.19b and future versions.

I'll just have it open and update the .ini file.

Thanks.

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor