Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Among the lucky, you are the chosen one.


dovenet / Synchronet Discussion / File list/scan loadable module

SubjectAuthor
* File list/scan loadable moduleNightfox
+* File list/scan loadable moduleDigital Man
|`* File list/scan loadable moduleNightfox
| `- File list/scan loadable moduleDigital Man
`* File list/scan loadable moduleNightfox
 `* File list/scan loadable moduleNightfox
  `- File list/scan loadable moduleDigital Man

1
File list/scan loadable module

<63F98119.83272.dove_sync@digitaldistortionbbs.com>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: File list/scan loadable module
Message-ID: <63F98119.83272.dove_sync@digitaldistortionbbs.com>
Date: Fri, 24 Feb 2023 12:31:37 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Discussion
X-FTN-PID: Synchronet 3.20a-Linux master/12f48d226 Feb 24 2023 GCC 11.3.0
X-FTN-MSGID: 49132.sync@1:103/705 285f7ae3
X-FTN-CHRS: CP437 2
WhenImported: 20230224194807-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49132
WhenImported: 20230224193137-0800 41e0
WhenExported: 20230224194769-0800 41e0
ExportedFrom: DIGDIST dove_sync 83272
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Fri, 24 Feb 2023 20:31 UTC

Hi DM,

I started testing the file list/scan loadable module feature. One thing I noticed is that when I call bbs.list_files() or bbs.list_file_info(), the same types of parameters are passed in argv:
argv[0]: Directory internal code
argv[1]: 0
argv[2]: Filespec

In both cases (bbs.list_files() or bbs.list_file_info()), the 2nd argument is 0. Both FL_NONE and FL_INFO are defined as 0, so I'm wondering how to differentiate between the two? I'm not sure how to determine whether the user wants to just list the files with the given filespec (FL_NONE) or display extended information (FI_INFO).

Nightfox

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

File list/scan loadable module

<63F98E93.49133.sync@vert.synchro.net>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: File list/scan loadable module
Message-ID: <63F98E93.49133.sync@vert.synchro.net>
Date: Fri, 24 Feb 2023 13:29:07 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F98119.83272.dove_sync@digitaldistortionbbs.com>
References: <63F98119.83272.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Win32 master/12f48d226 Feb 24 2023 MSC 1929
X-FTN-MSGID: 49133.sync@1:103/705 285f8480
X-FTN-REPLY: 49132.sync@1:103/705 285f7ae3
X-FTN-CHRS: CP437 2
WhenImported: 20230224202907-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49133
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 24 Feb 2023 21:29 UTC

Re: File list/scan loadable module
By: Nightfox to Digital Man on Fri Feb 24 2023 07:31 pm

> Hi DM,
>
> I started testing the file list/scan loadable module feature. One thing I
> noticed is that when I call bbs.list_files() or bbs.list_file_info(), the
> same types of parameters are passed in argv:
> argv[0]: Directory internal code
> argv[1]: 0
> argv[2]: Filespec
>
> In both cases (bbs.list_files() or bbs.list_file_info()), the 2nd argument
> is 0. Both FL_NONE and FL_INFO are defined as 0, so I'm wondering how to
> differentiate between the two?

You mean FI_INFO (not FL_INFO). The "FI" stands for file info, so only use those values in a fileinfo loadable module.

For a listfiles module, 0 means FL_NONE. "FL" steads for file list. Get it?

> I'm not sure how to determine whether the
> user wants to just list the files with the given filespec (FL_NONE) or
> display extended information (FI_INFO).

Are you trying to use the same script to implement both module types? If so,
you'd need to pass an extra parameter (that you define) to determine whether it's a file "list" or an "info" request.
--
digital man (rob)

Synchronet "Real Fact" #29:
Rob Swindell first called BBSes (at 300bps) with an Apple II computer in 1982
Norco, CA WX: 49.6°F, 86.0% humidity, 8 mph NE wind, 0.20 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

File list/scan loadable module

<63F99366.83274.dove_sync@digitaldistortionbbs.com>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: File list/scan loadable module
Message-ID: <63F99366.83274.dove_sync@digitaldistortionbbs.com>
Date: Fri, 24 Feb 2023 13:49:42 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F98119.83272.dove_sync@digitaldistortionbbs.com>
References: <63F98119.83272.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Linux master/12f48d226 Feb 24 2023 GCC 11.3.0
X-FTN-MSGID: 49134.sync@1:103/705 285f8969
X-FTN-REPLY: 49132.sync@1:103/705 285f7ae3
X-FTN-CHRS: CP437 2
WhenImported: 20230224205003-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49134
WhenImported: 20230224204942-0800 41e0
WhenExported: 20230224204962-0800 41e0
ExportedFrom: DIGDIST dove_sync 83274
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Fri, 24 Feb 2023 21:49 UTC

Re: File list/scan loadable module
By: Nightfox to Digital Man on Fri Feb 24 2023 07:31 pm

Another thing I noticed - Synchronet doesn't seem to be passing the additional bool argument to indicate the user is scanning all directories. I think that would be the case for something like the following?

bbs.scan_dirs(FL_ULTIME, true);

With that, my script is only getting 2 command-line arguments, both of which are FL_ULTIME.

Nightfox

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

File list/scan loadable module

<63F993F5.83275.dove_sync@digitaldistortionbbs.com>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: File list/scan loadable module
Message-ID: <63F993F5.83275.dove_sync@digitaldistortionbbs.com>
Date: Fri, 24 Feb 2023 13:52:05 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F98E93.49133.sync@vert.synchro.net>
References: <63F98E93.49133.sync@vert.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/12f48d226 Feb 24 2023 GCC 11.3.0
X-FTN-MSGID: 49136.sync@1:103/705 285f8cae
X-FTN-REPLY: 49133.sync@1:103/705 285f8480
X-FTN-CHRS: CP437 2
WhenImported: 20230224210358-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49136
WhenImported: 20230224205205-0800 41e0
WhenExported: 20230224210361-0800 41e0
ExportedFrom: DIGDIST dove_sync 83275
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Fri, 24 Feb 2023 21:52 UTC

Re: File list/scan loadable module
By: Digital Man to Nightfox on Fri Feb 24 2023 08:29 pm

>> I started testing the file list/scan loadable module feature. One
>> thing I noticed is that when I call bbs.list_files() or
>> bbs.list_file_info(), the same types of parameters are passed in argv:
>> argv[0]: Directory internal code
>> argv[1]: 0
>> argv[2]: Filespec

>> In both cases (bbs.list_files() or bbs.list_file_info()), the 2nd
>> argument is 0. Both FL_NONE and FL_INFO are defined as 0, so I'm
>> wondering how to differentiate between the two?

DM> You mean FI_INFO (not FL_INFO). The "FI" stands for file info, so only use
DM> those values in a fileinfo loadable module.

DM> For a listfiles module, 0 means FL_NONE. "FL" steads for file list. Get
DM> it?

Yes, that was a typo.

DM> Are you trying to use the same script to implement both module types? If
DM> so, you'd need to pass an extra parameter (that you define) to determine
DM> whether it's a file "list" or an "info" request.

Ah, I see. I was thinking the same script could do both, but for now I might just implement my file lister for the FL_ options.

Nightfox

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

File list/scan loadable module

<63F996AE.83277.dove_sync@digitaldistortionbbs.com>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: File list/scan loadable module
Message-ID: <63F996AE.83277.dove_sync@digitaldistortionbbs.com>
Date: Fri, 24 Feb 2023 14:03:42 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F99366.83274.dove_sync@digitaldistortionbbs.com>
References: <63F99366.83274.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Linux master/12f48d226 Feb 24 2023 GCC 11.3.0
X-FTN-MSGID: 49138.sync@1:103/705 285f8cb0
X-FTN-REPLY: 49134.sync@1:103/705 285f8969
X-FTN-CHRS: CP437 2
WhenImported: 20230224210358-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49138
WhenImported: 20230224210342-0800 41e0
WhenExported: 20230224210361-0800 41e0
ExportedFrom: DIGDIST dove_sync 83277
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Fri, 24 Feb 2023 22:03 UTC

Re: File list/scan loadable module
By: Nightfox to Digital Man on Fri Feb 24 2023 08:49 pm

Ni> Another thing I noticed - Synchronet doesn't seem to be passing the
Ni> additional bool argument to indicate the user is scanning all directories.
Ni> I think that would be the case for something like the following?

Ni> bbs.scan_dirs(FL_ULTIME, true);

Maybe I was wrong about what I was seeing. In that case, it seems the first argument is the bool (0/1) and the 2nd argument is one of the FL_ values - Is that correct?

Nightfox

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

File list/scan loadable module

<63F998DB.49139.sync@vert.synchro.net>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: File list/scan loadable module
Message-ID: <63F998DB.49139.sync@vert.synchro.net>
Date: Fri, 24 Feb 2023 14:12:59 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F996AE.83277.dove_sync@digitaldistortionbbs.com>
References: <63F996AE.83277.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Linux master/ce90be9ea Feb 21 2023 GCC 12.2.0
X-FTN-MSGID: 49139.sync@1:103/705 285f8ece
X-FTN-REPLY: 49138.sync@1:103/705 285f8cb0
X-FTN-CHRS: CP437 2
WhenImported: 20230224211259-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49139
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 24 Feb 2023 22:12 UTC

Re: File list/scan loadable module
By: Nightfox to Digital Man on Fri Feb 24 2023 09:03 pm

> Re: File list/scan loadable module
> By: Nightfox to Digital Man on Fri Feb 24 2023 08:49 pm
>
> Ni> Another thing I noticed - Synchronet doesn't seem to be passing the
> Ni> additional bool argument to indicate the user is scanning all
> Ni> directories. I think that would be the case for something like the
> Ni> following?
>
> Ni> bbs.scan_dirs(FL_ULTIME, true);
>
> Maybe I was wrong about what I was seeing. In that case, it seems the first
> argument is the bool (0/1) and the 2nd argument is one of the FL_ values -
> Is that correct?

Correct. Same pattern as the scan subs loadable module.
--
digital man (rob)

Synchronet/BBS Terminology Definition #27:
DTE = Data Terminal Equipment
Norco, CA WX: 50.0°F, 84.0% humidity, 5 mph N wind, 0.19 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

File list/scan loadable module

<63F99B16.49140.sync@vert.synchro.net>

  copy mid

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

  copy link   Newsgroups: DOVE-Net.Synchronet_Discussion
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: File list/scan loadable module
Message-ID: <63F99B16.49140.sync@vert.synchro.net>
Date: Fri, 24 Feb 2023 14:22:30 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Discussion
In-Reply-To: <63F993F5.83275.dove_sync@digitaldistortionbbs.com>
References: <63F993F5.83275.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Linux master/ce90be9ea Feb 21 2023 GCC 12.2.0
X-FTN-MSGID: 49140.sync@1:103/705 285f910a
X-FTN-REPLY: 49136.sync@1:103/705 285f8cae
X-FTN-CHRS: CP437 2
WhenImported: 20230224212230-0800 41e0
WhenExported: 20230224221816-0800 41e0
ExportedFrom: VERT sync 49140
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 24 Feb 2023 22:22 UTC

Re: File list/scan loadable module
By: Nightfox to Digital Man on Fri Feb 24 2023 08:52 pm

> Re: File list/scan loadable module
> By: Digital Man to Nightfox on Fri Feb 24 2023 08:29 pm
>
> >> I started testing the file list/scan loadable module feature. One
> >> thing I noticed is that when I call bbs.list_files() or
> >> bbs.list_file_info(), the same types of parameters are passed in argv:
> >> argv[0]: Directory internal code
> >> argv[1]: 0
> >> argv[2]: Filespec
>
> >> In both cases (bbs.list_files() or bbs.list_file_info()), the 2nd
> >> argument is 0. Both FL_NONE and FL_INFO are defined as 0, so I'm
> >> wondering how to differentiate between the two?
>
> DM> You mean FI_INFO (not FL_INFO). The "FI" stands for file info, so only
> DM> use those values in a fileinfo loadable module.
>
> DM> For a listfiles module, 0 means FL_NONE. "FL" steads for file list. Get
> DM> it?
>
> Yes, that was a typo.
>
> DM> Are you trying to use the same script to implement both module types?
> DM> If so, you'd need to pass an extra parameter (that you define) to
> DM> determine whether it's a file "list" or an "info" request.
>
> Ah, I see. I was thinking the same script could do both, but for now I
> might just implement my file lister for the FL_ options.

The same script *could* do both (though that's probably not the tack I'd take), but if you did, you'd need to pass an extra parameter, like I said, to indicate in what context the script was being called.
--
digital man (rob)

Breaking Bad quote #6:
My Name is ASAC Schrader - and you can go fuck yourself. - Hank Schrader
Norco, CA WX: 49.9°F, 84.0% humidity, 0 mph ENE wind, 0.19 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net


dovenet / Synchronet Discussion / File list/scan loadable module

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor