- Aug 8, 2010
- 965
- 155
I built a ubot that adds the title tags around the first line (everything before the first new line \n) in each article of a directory. It's non destructive, and makes a new folder in the target directory which will contain all the modified articles, with their original file names.
Please make sure you have the final "\" at the end of the folders path. The easiest way to get your folder path is to go to the folder in windows explorer, and copy the directory name from top "address bar".
The reason I built this bot is so it's easier to use scraped content and GAP articles with the SX file loading function, for more unique Tier 1s.
Yes, some people want to charge you $67 for an senukex course. I'll sum it up: Don't spin the same shit out again and again. Now buy me a beer.
The ubot code is below if you want to change it for your own needs. I didn't add a splash page, so it's loads google.com. You won't be notified that it's finished either, just check the new folder when it appears.
Download the .exe (in zip) here.
Please make sure you have the final "\" at the end of the folders path. The easiest way to get your folder path is to go to the folder in windows explorer, and copy the directory name from top "address bar".
The reason I built this bot is so it's easier to use scraped content and GAP articles with the SX file loading function, for more unique Tier 1s.
Yes, some people want to charge you $67 for an senukex course. I'll sum it up: Don't spin the same shit out again and again. Now buy me a beer.
The ubot code is below if you want to change it for your own needs. I didn't add a splash page, so it's loads google.com. You won't be notified that it's finished either, just check the new folder when it appears.
Download the .exe (in zip) here.
Code:
ui text box("Enter folder path include last \"\\\"", #foldername)
clear list(%article list)
add list to list(%article list, $get files(#foldername, "Yes"), "Delete", "Global")
set(#count, 0, "Global")
create folder(#foldername, "SX Titles")
loop($list total(%article list)) {
set(#currentfile, $read file($list item(%article list, #count)), "Global")
set(#title find, $find regular expression(#currentfile, "\\A.*"), "Global")
set(#changed file, $replace(#currentfile, #title find, "[title]{#title find}[/title]"), "Global")
set(#file name without path, $replace regular expression($list item(%article list, #count), ".*\\\\", ""), "Global")
save to file("{#foldername}SX Titles\\{#file name without path}", #changed file)
increment(#count)
}