Jump to content
UBot Underground

Multiple Articles In One Text File


Recommended Posts

Hi Guys,

 

I'm developing an article submitter, but for it to be useful it really needs to submit multiple articles from a single text file in one run. I'm having trouble working out what the most efficient way of doing this is. At the moment I'm using the format:

 

article #1 title

article #1 tags

article #1 content

*****

article #2 title

article #2 tags

article #2 content

*****

article #3 title

article #3 tags

article #3 content

 

etc... then creating a list by splitting with *, then a list splitting with "newline" and then looping through title, tags and content. The problem is that if the article isn't formatted correctly - or if the content has multiple paragraphs - then it's difficult to post the articles reliably.

 

I'm sure there's a better way of doing this but I can't see it, any advice?

Cheers

Link to post
Share on other sites

You do not want to use newline as a delimiter. This will end up breaking your articles into paragraphs or worse. My suggestion would be to have all of your articles into one text file, titles in it's own text file, and tags all in it's own text file.

 

Then just add them to their own list. If you have the same equal amount of lines in each file broken up by a delimiter you shouldn't have a problem. Is there a reason why you need all of the data crammed into one text file?

Link to post
Share on other sites

For my article poster bot loading the way you have suggested i could never get to work properly with formatting and spaces. Blank lines always screwed it up. I tried to input multiple articles to one file then randomly select one to use and never got it to work.

Link to post
Share on other sites

For my article poster bot loading the way you have suggested i could never get to work properly with formatting and spaces. Blank lines always screwed it up. I tried to input multiple articles to one file then randomly select one to use and never got it to work.

 

I have my submitter bot setup the same way as I described and it is working perfectly. If you want I can help, just send me a PM so I can view part of your source and see what the problem is.

 

Edit: Here I will just upload a sub that I use and you can use it as an example.

 

The bot can read these variables inside your text file.

 

Spin Syntax: The bot will first pull a random article and then spin it.

 

Delimiter:Articles are broken up by the @ character. Each article should have the @ symbol placed at the end of it. Well except for the last article in the file.

 

Url to Post: If #LINK# is found in your article it will be replaced by whatever is in the Url to Post text box.

 

It shouldn't be to hard to understand what is happening in this script.

 

Hope it helps.

Random Article.ubot

  • Like 1
Link to post
Share on other sites

I have done this numerous times and the most effective way I have found is to place each article in its own text file in a directory. Make sure the the title of the article and the name of the articles text file are the same:

 

i.e.

 

Title: How To Line Dance

text file: How to Line Dance.txt

 

You can then call the text file from the directory by it's name using the titles in a list like this:

 

(fill article body field)= $Read from File(path to directory) --->$Next List Item(%titles).txt

 

I hope that makes sense. I have been submitting thousands of articles that way without fail.

 

The path would look like this:

 

C:\Users\(username)\Documents\Articles\{1}.txt (where {1} is the title taken from the list of titles)

 

I hope that helps.

 

John

  • Like 1
Link to post
Share on other sites

Still. Another path could be spinning.

 

Have a spinnable title, make some of your content spinnable, and then have some spinnable conclusion.

 

I know that is very simplified but I do that on my blog network when I post to my primary site.

 

Wham Bamm thank you Mamm!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...