Posted by: maki | Date: 2020-01-10 19:23 | IP: IP Logged
How to Advanced link generation.
Generate all combinations according to the formula/template.
XXXX -> 1 to 9999
Edited 1 time(s). Last edit at 2020-01-10 19:33 by maki.
Posted by: pspad | Date: 2020-01-10 19:27 | IP: IP Logged
in this case I would use Excel, create list of dates and using formula I would create your links.
Each solution has own tool hich is for some purposes better than others
Posted by: maki | Date: 2020-01-10 19:39 | IP: IP Logged
If it's possible and it's easy, generate for me from 2000 to the end of 2020 and send me a text file.
Posted by: pspad | Date: 2020-01-10 20:06 | IP: IP Logged
Do you understand, that one year means 365 * 9999 = 3 649 635 lines?
And you want it for 20 year? Over 60 milions lines?
Posted by: pspad | Date: 2020-01-10 20:14 | IP: IP Logged
Use PSPad 32b with scripting support
Save contend of code into file .\PSPad\Scripts\VBScript\Maki-yearlink.vbs
' it will generate list of links
const module_name = "Maki-yearlinks"
const module_ver = "1.0"
set obj = newEditor()
s = "https://example.com/"
txt = ""
d = CDate("2000-01-01")
dto = CDate("2020-12-31")
while d <= dto
ss = s & datePart("yyyy", d) & "/" & right("0" & datePart("m", d), 2) & "/" & right("0" & datePart("d", d), 2) & "/"
' this part generates 1 to 9 links for each day. If you will run it for 1 .. 9999, you will end reach memory limit
' for i = 1 to 9
' txt = txt & ss & i & Chr(13) & chr(10)
' next line add link without number on the end. If you will use FOR, comment it
txt = txt & ss & Chr(13) & chr(10)
d = DateAdd("d", 1, d)
' name "Init" is required, its called automatically during initialization to create menu items
addMenuItem "&Maki year links","", "MakiYearLinks"
Edited 2 time(s). Last edit at 2020-01-10 20:16 by pspad.
Posted by: maki | Date: 2020-01-10 20:15 | IP: IP Logged
Ah, I understand. Reduce it since 2006-2020.
But you can split the file into 1 million lines.
Posted by: pspad | Date: 2020-01-10 20:18 | IP: IP Logged
Script above will generate it for you
when you will run it as is, it will generate links without xxxx
if you will uncomment it, it will generate links include numbers
but I suggest you to generate part of the year by part of the year
d = CDate("2000-01-01") = start date
dto = CDate("2020-12-31") = enddate
for i = 1 to 9 replace with 1 to 9999
If you will run it month by month, it will generate files with over 300 000 lines each and it will take ages.
Edited 1 time(s). Last edit at 2020-01-10 20:21 by pspad.
Posted by: maki | Date: 2020-01-10 20:25 | IP: IP Logged
I don't remember how to enable the Script command in PSPad.
I know it will take long time in PSPad, but maybe there are other programs with a more efficient algorithm.
Posted by: pspad | Date: 2020-01-10 20:34 | IP: IP Logged
If course there is. You can write it in VC++ or Delphi or another native compilling program
PSPad scripting uses Windows scripting hosts. So it's speed is Microsoft bussines, not a PSPad bussines.
Edited 1 time(s). Last edit at 2020-01-10 20:50 by pspad.
Posted by: pspad | Date: 2020-01-10 20:35 | IP: IP Logged
But I don't understand what for do you need 70 millions links