It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

Help with short batch file to archive a full ATS thread as a PDF file??

page: 2
7
<< 1   >>

log in

join
share:

posted on Apr, 7 2023 @ 11:30 AM
link   
I've now started creating PDF copies of various UFO threads from ATS.

Due to permission issues, I've started with about 75 of my own threads here.

I tweaked the code above (using ChatGPT to help with debugging and improving the code) to deal with a couple of small but significant issues. In particular, the code above created temporary files with names ending with sequential numbers (i.e. 1, 2, 3, ... 10,11...) and then combined then - but the lack of any leading zeros resulted in page 10 following page 1 rather than being after page 9. ChatGPT was impressively quick to rewrite bits of the code and explain problems to me.

Here's the final code:

@echo off
setlocal enabledelayedexpansion

for /f "usebackq tokens=1-3 delims=," %%A in ("thread_details.csv") do (
echo %%A %%B %%C
rem %%A = thread number, %%B = number of final page, %%C = thread name
timeout 2
for /l %%a in (1,1,%%B) do (
set "n=00%%a"
set "n=!n:~-3!"
"C:Program Fileswkhtmltopdfbinwkhtmltopdf.exe" www.abovetopsecret.com... thread%%A_!n!.pdf
)
pdftk "thread%%A_*.pdf" cat output "ATS thread%%A - %%C.pdf"
del thread*.pdf
)



posted on Apr, 7 2023 @ 12:26 PM
link   
As a sample of the output of the above code, here is a folder of about 70 of my ATS threads archived a searchable PDF files:

files.afu.se...






(If there is no objection from the moderators of ATS, and if there is any interest from other members / researchers, I can now easily apply the same code to - say - the threads in the UFO forum with the most flags or the most popular threads by particular UFO researchers here).

The main purposes of creating such an archive of some UFO threads from ATS are:

(1) To ensure preservation of this material;
(2) To make it quick and easier to search the material (and combine such a search with searching a collection of digitised UFO books, documents, newsletters etc).

In relation to the latter point, I've previously posted about free software that allows directories full of different sets of PDFs to be searched quickly and then the results displayed in a format that enables the user to click on each result to open a relevant document and see the keyword in context. I find reviewing the results of such a search using that software much, much faster than reviewing the results of a Google search.


The above code accesses a separate file ("thread_details.csv") which is a simply Comma Separated Values file. Each row has three elements separated by commas:
(1) A relevant thread number
(2) The number of pages in that thread (found by clicking on the last post in the thread and looking at the URL or top of the webpage)
(3) A filename, based on the thread title (but usually shortened, to avoid issues with the file name being too long).


To make it quicker and easier to enter the relevant details, I use a simple spreadsheet with three columns, then save the file as a CSV file, to create the "thread_details.csv". It only takes a few seconds to enter the details for each thread.



The code above can then be run, turning a batch of threads into PDFs.



edit on 7-4-2023 by IsaacKoi because: (no reason given)

edit on 7-4-2023 by IsaacKoi because: (no reason given)



posted on Apr, 9 2023 @ 12:08 PM
link   
I've now posted the above code etc on Facebook and Twitter, with thanks to the members here who helped (particularly "drewlander") and ChatGPT.

isaackoiup.blogspot.com...



posted on Nov, 4 2023 @ 08:59 AM
link   
I've now added over 60 UFO threads by Karl12 to my archive of some UFO material from ATS:
isaackoiup.blogspot.com...

Since it currently appears that ATS may be dying, I'm tempted to archive more.



new topics

top topics
 
7
<< 1   >>

log in

join