Session log + DFWDS Node port + Hoffman API uploader pipeline
Built the missing piece between the test datasheet pipeline and Dataforth's new product API. End-to-end: - Pulled DFWDS (Dataforth Web Datasheet System) VB6 source from AD1\Engineering\ENGR\ATE\Test Datasheets\DFWDS to local for analysis - Decoded its filename validation: A-J prefix decodes (A=10..J=19), all- numeric WO# valid (no leading 0), anything else bad - Ported the validation + move logic to Node (dfwds-process.js) - Built bulk uploader (upload-delta.js) for Hoffman's Swagger API (POST /api/v1/TestReportDataFiles/bulk with OAuth client_credentials) Sanitized 3 prior reference scripts (fetch-server-inventory, test-scenarios, test-upload-two) to read CF_* env vars instead of hardcoded creds. Live drain results: - 897 files moved Test_Datasheets -> For_Web (all valid, no renames, no bad), DFWDS port summary in 1.1s - Pushed entire For_Web (7,061 files) to Hoffman API in 49.7s @ 142/s: Created=803 Updated=114 Unchanged=6,144 Errors=0 - Server count: 489,579 -> 490,382 (+803 net new) Also: - Added clients/dataforth/.gitignore to exclude plaintext Oauth.txt note - Added clients/instrumental-music-center/docs/2026-04-13-ticket-notes.md (ticket write-up of 2026-04-11/12/13 IMC1 RDS removal/SQL migration work) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
Public Function AllFiles(ByVal DirPath As String) As String()
|
||||
Dim sFile As String
|
||||
Dim lElement As Long
|
||||
Dim sAns() As String
|
||||
ReDim sAns(0) As String
|
||||
|
||||
sFile = Dir(DirPath, vbNormal + vbHidden + vbReadOnly + vbSystem + vbArchive)
|
||||
|
||||
If sFile <> "" Then
|
||||
sAns(0) = sFile
|
||||
Do
|
||||
sFile = Dir
|
||||
If sFile = "" Then Exit Do
|
||||
lElement = IIf(sAns(0) = "", 0, UBound(sAns) + 1)
|
||||
ReDim Preserve sAns(lElement) As String
|
||||
sAns(lElement) = sFile
|
||||
|
||||
Loop
|
||||
End If
|
||||
AllFiles = sAns
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim Files() as String = System.IO.Directory.GetFiles(folderpath)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
DATASHEET FOLDER NAME,C:\Datasheets_For_Web\Test_Datasheets
|
||||
INVALID FILE MOVE FOLDER,C:\Datasheets_For_Web\Bad_Datasheets
|
||||
LOG FILE NAME,DFWDS
|
||||
LOG FILE FOLDER,C:\Datasheets_For_Web\Datasheets_Log
|
||||
WEB FOLDER,C:\Datasheets_For_Web\For_Web
|
||||
OPERATION,WEBMOVE
|
||||
|
||||
Last updated: 2015-06-08
|
||||
|
||||
The first six lines of this file are folder and file names required by
|
||||
the Dataforth Website Datasheet program (DFWDS.exe). Each line consists
|
||||
of the parameter name (in all CAPS), followed by a comma, followed by
|
||||
the file or folder name (not in quotes) or operation. A space is
|
||||
allowed after the comma separator.
|
||||
|
||||
The six lines parameter lines must contain only the allowed parameters
|
||||
and data, in this specified format, for the program to operate properly.
|
||||
Any lines below these six lines are not read by the program, and can
|
||||
consist of comments or instructions (such as these).
|
||||
|
||||
The location and name of this file (usually C:\DFWDS\DFWDS_NAMES.TXT) is
|
||||
hardcoded in the program.
|
||||
|
||||
Descriptions of the six required lines (along with the required parameter
|
||||
names) are shown below:
|
||||
|
||||
First line:
|
||||
-----------
|
||||
DATASHEET FOLDER NAME: This is the location of the folder containing the
|
||||
datasheet files that will eventually be copied to the Dataforth website.
|
||||
|
||||
Second line:
|
||||
------------
|
||||
INVALID FILE MOVE FOLDER: This is the location of the folder to which
|
||||
invalid files in the datasheet folder will be moved.
|
||||
|
||||
Third line:
|
||||
-----------
|
||||
LOG FILE NAME: This is the name of the file that logs the operation of the
|
||||
Dataforth Website Datasheet program (DFWDS.exe), including invalid file
|
||||
moves and datasheet file renaming. NOTE: This is the file name (only),
|
||||
and does NOT include the ".log" extension.
|
||||
|
||||
Fourth line:
|
||||
------------
|
||||
LOG FILE FOLDER: This is the location of the folder containing the log
|
||||
file for the DFWDS.exe program.
|
||||
|
||||
Fifth line:
|
||||
WEB FOLDER: This is the location of the folder to which the valid
|
||||
datasheet files (including renamed files) are moved if the "OPERATION"
|
||||
parameter (see below) is "WEBMOVE".
|
||||
|
||||
Sixth line:
|
||||
-----------
|
||||
OPERATION: This parameter controls the operation of the program, and
|
||||
can only be one of the values described below:
|
||||
-------------------------------------
|
||||
COUNT causes the program to only count the invalid files
|
||||
and files that should be renamed.
|
||||
|
||||
LISTALL causes the program to list all of the files found in the
|
||||
datasheet folder.
|
||||
|
||||
LISTBAD causes the program to list all of the invalid ("bad") files
|
||||
found in the datasheet folder.
|
||||
|
||||
LISTRENAME causes the program to list all of the datasheet files in
|
||||
the datasheet folder that have DOS-encoded names that need to be
|
||||
renamed to match the module serial number contained in the file.
|
||||
|
||||
INPLACE renames the appropriate files in their current directory
|
||||
(specified by the "DATASHEET FOLDER NAME" parameter - see above), but
|
||||
moves the invalid files to the directory specified by the
|
||||
"INVALID FILE MOVE FOLDER" parameter (see above).
|
||||
|
||||
WEBMOVE moves the invalid files to the "INVALID FILE MOVE FOLDER"
|
||||
directory, but also moves the valid datasheet files (including those
|
||||
that have been renamed) to the folder specified by the "WEB FOLDER"
|
||||
parameter (see above).
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
Renamed file: C:\DFWDS\WebDatasheets\A2345-01.TXT to: 102345-01.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\B2345-02.TXT to: 112345-02.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\C2345-03.TXT to: 122345-03.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\D2345-04.TXT to: 132345-04.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\E2345-05.TXT to: 142345-05.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\F2345-06.TXT to: 152345-06.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\G2345-07.TXT to: 162345-07.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\H2345-08.TXT to: 172345-08.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\I2345-09.TXT to: 182345-09.TXT
|
||||
Renamed file: C:\DFWDS\WebDatasheets\J2345-10.TXT to: 192345-10.TXT
|
||||
Binary file not shown.
Reference in New Issue
Block a user