From 1ce7b6eb3f94c6c2711510936e6fbb602578ca79 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Fri, 17 Aug 2012 14:34:23 -0400 Subject: [PATCH] FILES.BBS importer --- mystic/mutil.cfg | 34 ++++++++++++++++++++++++++++++++-- mystic/mutil.pas | 6 +++++- mystic/mutil_common.pas | 1 + 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/mystic/mutil.cfg b/mystic/mutil.cfg index 60e25c3..5503739 100644 --- a/mystic/mutil.cfg +++ b/mystic/mutil.cfg @@ -21,9 +21,11 @@ ; - Import FILEBONE.NA into File bases ; - Mass upload files to all file bases (with FILE_ID.DIZ import) ; - Generate Top 1 up to 99 Callers, Posters, Downloaders, Uploaders, PCR +; - Import FILES.BBS into file bases ; ; ========================================================================== ; ========================================================================== +; ========================================================================== [General] @@ -38,6 +40,7 @@ Import_FIDONET.NA = false Import_FILEBONE.NA = false + Import_FILES.BBS = false MassUpload = false GenerateTopLists = false @@ -101,7 +104,7 @@ ; MYSTICBBS it will create "c:\mystic\filebase\MYSTICBBS". This root ; directory MUST exist. - root_dir = \code\mystic1\filebase + root_dir = c:\mystic\files\ ; convert tags to lower case for filebase base filename/dir 1=yes @@ -128,6 +131,33 @@ ; ========================================================================== ; ========================================================================== +[Import_FILES.BBS] + + ; This function searches the filebase directories for existance of a + ; FILES.BBS file. If the file is found, MUTIL will process all files + ; within it and upload any new files into the BBS using the description + ; from the FILES.BBS. The files must physically exist in the same + ; directory as the FILES.BBS in order for them to be uploaded to the BBS + + uploader_name = Mystic BBS + + ; for custom files.bbs importing. desc_char is the character that denotes + ; extended description (blank = space). desc_charpos is the position in + ; which the character exists. desc_start is the position where the + ; description actually starts. + + desc_char = + desc_charpos = 1 + desc_start = 14 + + ; erase files.bbs after processing? 0=no, 1=yes + + delete_after = 0 + +; ========================================================================== +; ========================================================================== +; ========================================================================== + [MassUpload] ; this function searches all configured file directories for new @@ -223,4 +253,4 @@ top_pcr_desc = Posts Per Call top_pcr_namelen = 30 top_pcr_datalen = 10 - \ No newline at end of file + diff --git a/mystic/mutil.pas b/mystic/mutil.pas index b713886..c4fee3e 100644 --- a/mystic/mutil.pas +++ b/mystic/mutil.pas @@ -47,7 +47,8 @@ Uses mutil_ImportNA, mutil_FileBone, mutil_Upload, - mutil_TopLists; + mutil_TopLists, + mutil_FilesBBS; {$I MUTIL_ANSI.PAS} @@ -149,6 +150,7 @@ End; Var DoImportNA : Boolean; + DoFilesBBS : Boolean; DoFileBone : Boolean; DoMassUpload : Boolean; DoTopLists : Boolean; @@ -161,6 +163,7 @@ Begin DoFileBone := CheckProcess(Header_FILEBONE); DoMassUpload := CheckProcess(Header_UPLOAD); DoTopLists := CheckProcess(Header_TOPLISTS); + DoFilesBBS := CheckProcess(Header_FILESBBS); // Exit with an error if nothing is configured @@ -176,6 +179,7 @@ Begin If DoImportNA Then uImportNA; If DoFileBone Then uImportFileBone; + If DoFilesBBS Then uImportFilesBBS; If DoMassUpload Then uMassUpload; If DoTopLists Then uTopLists; End. diff --git a/mystic/mutil_common.pas b/mystic/mutil_common.pas index a50b0fc..02c808a 100644 --- a/mystic/mutil_common.pas +++ b/mystic/mutil_common.pas @@ -26,6 +26,7 @@ Const Header_GENERAL = 'General'; Header_IMPORTNA = 'Import_FIDONET.NA'; Header_FILEBONE = 'Import_FILEBONE.NA'; + Header_FILESBBS = 'Import_FILES.BBS'; Header_UPLOAD = 'MassUpload'; Header_TOPLISTS = 'GenerateTopLists';