Ongnissim's AutoPost V. 1.1 [Nov. 7th (Output to File)]

Hello Blenderers :smiley: !
Have I got an announcement that will blow your minds! I have invented the peak of new age technology written in the best of all programming languages for all platforms! The following is not a joke, nay, but the future! I have written an Open-Source application for all the user of Blender to love and cherish within their own abode. I entitle it- “Ongnissim’s Fantastic AutoPoster!” and I subentitle it “The First Auto Post Maker on the Elysiun Forums!”. It sounds crazy. you say, and it is, but it is not a joke! It will allow the user to input their name, the artists name, the score they give the image, and a certain signature that is customized to the end of your post. It then, with the amazing power of Artificial Intelligence writes the post for you, filling in all of the blanks (OOOOOOH!)

What is available now you ask?

  1. Autopost/fill in the blanks.
  2. A sophisticated Rankimng system
  3. Multiplatform (No binaries yet, but for all those who would like to contribute, I’d be much obliged, the source code is in this post)
  4. Personalized C&C
  5. Personalized Pre-Sig
    NEW!!!: Output to file… OOOH!

What may be available later?

  1. Auto Templates (You choose where everything goes)
  2. Distinction of WIP/Finished Projects/Focused Critique/ETC…
  3. A GUI, right now it is command-line
  4. A port to Java, perhaps, so that you don’t have to leave the comfort of the internet…

The source also has guidelines as to which person should deserve any certain ranking. The lowest 2 (1 + 2 for those who can’t count) are mean, and are to be used against people who steal other’s work and/or act snooty with a yellow cube with interesting lighting type-scheme (Without it being a joke of course…). They get increasingly better from there on. This is released under the … Artistic License??? Sure… So, You can edit it, just say I wrote the original… Updates in a day or so.

/*Ongnissim's Offical auto-post mechanism. For those times when 
 *it just takes to much to get you own point accross...
 *
 *	By: Robert Edwards; Ongnissim...
 */


#include <iostream>
#include <fstream>

using namespace std;

class Post
{
	private:
		string artist, poster, specifics, subText, post;
		int rating;
	public:
		Post(string a, string p, string spec, int r, string s)
		{
			artist = a;
			poster = p;
			specifics = spec;
			rating = r;
			subText = s;
		};

		
		void calcPost();
		
		string getPost()
		{
			return post;
		};
};

void Post::calcPost()
{
	switch (rating)
	{
		case 1:
			post += "Man, "+artist+", were you even trying?
This is not worthy of Blender, go back to your hole in the ground...
"; //only for annoying/Kansas15 type people :D (actually, kansas didn't bother me that much 0-0)
			break;
		case 2:
			post += artist+", this needs a lot of work.You know what people here call that? They call it K3d, which stands for \"K\"rap in the third dimension... Not to be harsh, but, you should learn Blender before posting a finished project...
"; //Super n00bs that need to be broken down...
			break;
		case 3:
			post += "I can see that you are trying,"+artist+", but this still needs more effort to be a great image. Have you tried some of the tutorials on the Blender site? Start there, keep blendering!
";//People who want to learn.
			break;
		case 4:
			post += "This is looking pretty good. If I were you, I would keep working on it just a little more, to get all of the bugs fixed out of it. Good work overall, "+artist+"...
";//the average Blenderer (No offense, everyone, lol)
			break;
		case 5:
			post += "This is nice, "+artist+", it looks really neat. Nice concept, and you acieved it fairly well. Its not quite perfect, but it is a good piece.
";//the slightly above average, average blenderer
			break;
		case 6:
			post += "This is some quality work, "+artist+", I hope to see more from you in the future!
";//one of those "cool!" moments...
			break;
		case 7:
			post += "OOOOOH! Thats cool, "+artist+". I wish I had one of those at home. The mood works well, and everything is great, not perfect, but really well done...
";//People that need to be bribed.
			break;
		case 8:
			post += "Great Job, "+artist+"! I really enjoy this image. I think a few of the finer details can be brought out, but I could see this as a finished piece...
";//People who are almost professionals
			break;
		case 9:
			post += "You should submit this to the gallery! A great image, in all ways, not the best I've seen, but pretty dog-gone close to it, "+artist+"!
";//People who gloat at the #8 people
			break;
		case 10:
			post += "Whoa! That blew me away! This has got to be one of the coolest pictures I've seen in my entire Life! I wasn't expecting this to be this cool, though, in retrospect, is is your image, "+artist+"...
";//@ndy/RobertT/VenomGFX the list goes on...
			break;
		default:
			post += ":o
";
			break;
	};
	post += specifics+"

"+subText+"
"+poster+"

An Autopost by Ongnissim\'s Autopost-Maker";
};


int main()
{
	ofstream outF("post.txt");
	int rating;
	string poster, artist, specific, subText, null;
	cout<<"Who are you?: ";
	getline(cin, poster);
	cout<<"Who's image is it?: ";
	getline(cin,artist);
	cout<<"On a scale from one to ten, how was the image?: ";
	cin>>rating;
	getline(cin, null);//clear buffer before next getline();
	cout<<"Specific Comments/Critisism: ";
	getline(cin,specific);
	cout<<"Anything you'd like to add to the end, before your name?: ";
	getline(cin,subText);
	Post post(artist, poster, specific, rating, subText);
	post.calcPost();
	cout<<post.getPost()<<"
You get a "<<rating<<" out of 10.
";
	outF<<post.getPost()<<"
You get a "<<rating<<" out of 10.
";
	outF.close();
	return EXIT_SUCCESS;
};

And that’s all I wrote…

The current User-Interface is as follows:

Who are you?: Ongnissim
Who’s image is it?: Stereo Type
On a scale from one to ten, how was the image?: 6
Specific Comments/Critisism: You were off key (?)
Anything you’d like to add to the end, before your name?: Hold on Tight,

Your Post:

This is some quality work, Stereo Type, I hope to see more from you in the future!
You were off key (?)

Hold on Tight,
Ongnissim

An Autopost by Ongnissim’s Autopost-Maker
You get a 6 out of 10.

As you can see, it is not perfect, but If you’re hankerin’ to be a Monkey, (and if you are, you know what I mean) you might consider trying this out to boost your post points.

C&C greatly Welcomed, as well as Feature Requests!

Hold on Tight,
Ongnissim

This Post was NOT An Autopost by Ongnissim’s Autopost-Maker, but if It had been:
You get a 10 out of 10.

(Yay me…)

So where’s the poll option for “If typing a message in the little reply box is too much effort you shouldn’t be on a forum”? Or frankly any poll option where I’m not saying it’s a good program?
And why does it spam itself at the bottom of every post it makes?

C&C is about actually giving specific responses! Not about picking stock replies from a list. As someone who specifically asks for C&C in their sig, I’d have thought you’d know that.
People complained all the time about just getting simple responses like “Great” or “Could be better” before the Focused Critique forum was created - this is no different - in fact worse because it’s more wordy, so there’s more garbage to read through but with exactly the same content.

I think you missed the point, phlip.

This is rich, Ongnissim. Well worth a good laugh. /me pulls out my compiler to play with it…

:smiley:

I totally agree. All this came from a long, boring night. It just popped into my head so I thought, what the heck, why not?

Just to be frank, it was more of an experiment, and by my tone I hoped people would have have realized I didn’t really intend people to use it. (I’ve used it once, but It felt extremely rude, and I really wouldn’t reccommend it… ) :-?

Anyways, I still want to work on it, to hone my C++ skills, if you use it or not. I would still like C&C, especially on the Features side. I want to improve.

Hold on Tight,
Ongnissim

P.S. I didn’t mean to offend anyone. My original idea was to but a bunch of jokes in it, in various places, so that only the programmers would get it, but I ran out of fuel [let me reiterate- LONG BORING NIGHT] so I just stated trying to get it to compile, lol.

EDIT: Thank you Duoas, that was more the reaction I was going for. You are free to do whatever you want to it… :smiley:

Ah, ok, sorry, I have also had a long boring night studying for an exam in one of the most boring subjects in the universe (project management), and as such I had a rather large penalty to my “Detect Humour” check. I didn’t realise this was intended as a joke :wink:

I retract my previous statement.

This is nice, Ongissim, it looks really neat. Nice concept, and you acieved it fairly well. Its not quite perfect, but it is a good piece.

:stuck_out_tongue:

Can you write one for Al_Capone?

%<

A few comments:

multiple conditions

You should try to simplify the code somewhat. In particular, that long chain of if-then-else-ifs, which I know is religiously taught in many schools, is really bad programming practice: it opens the door to errors, is more difficult to maintain, and is less readable.

Instead, try:

switch ((rating &lt; 1) ? 1 : rating) {
  case 1: ... break;
  case 2: ... break;
  ...
  case 9: ... break;
  default: ...
  }

The first line is OK here since it is a particularly simple program, but in general you’d want to do input verification before it hits the switch.

class structure

You should generally provide a default (no arguments required) constructor of a class. It’s not a problem here, but if your class is ever used outside of the file in which it is declared, or ever likely to be, it should have one. In the worst case you can just raise an exception and complain that that shouldn’t be done.

public:
  Post( 
    string _artist = "", 
    string _poster = "", 
    string _specifics = "", 
    int _rating = 0,
    string _subText = ""
    ) : artist( _artist ),
        poster( _poster ),
        specifics( _specifics ),
        rating( _rating ),
        subText( _subText )
    { };

A return statement is generally unnecessary in constructors and destructors.

inline functions

Even for such a simple program, I would have placed the body of the calcPost() function outside of the class. Inline functions should be, as a rule of thumb, a maximum of three lines long.

class Post
{
  public:
    void calcPost();
};

void Post::calcPost()
{
  ...
}

If you see my post here you’ll find some friendly links to C++ learning resources. Also mentioned higher up in the same thread by aquaglow is http://www.cprogramming.com/. Hmm… after searching a bit it appears the my post has the most comprehensive list of links to C/C++ programming…

Hope this helps and welcome to the frustrating and rewarding world of being programmed by computers! :stuck_out_tongue:

If you ever need help just post here or PM me.

Update at first post. Version 1.1 is out, hereye, hereye! (Her eye?)

lol.

I think I am misunderstaning your point… Though I will answer the way it sounds to me:

This allows you to choose who you want the message to go to, and who you are, so anyone could use this to post to anyone else (and later, they could post about anything!)

I would Like to thank Duoas for this release. I took his advice on using the switch command instead of the continuous If-Else chain that I had been using. I would have thanked him more, but during a session of P.M.ing back and forth, I realized that the problem I was asking him to help me sove was actually my own error, in that I was using GCC (A C compiler) to compile a C++ program. It was just a command line typo. If it weren’t for the countless mistakes in this world, there would be no Linux, so we all thank Microsoft :smiley: .

This new version includes a To File function, so that your post will automatically be saved in a text file called “Post.txt” in the folder you ran the program in, as well as in your command line still…

2 new possibilities, rating wise, have also been added. The amazing below a 1 grade, and the amazing (number > 10) / 10 grade, both can be explained by the single quote:

" :o "

And each with it’s own seperate meaning. If anyone has any builds they would like to share, please do not be afraid to, as this is an open forum…

Hold on Tight,
Ongnissim

Great Job, Ongnissim! I really enjoy this small app. I think a few of the finer details can be brought out, but I could see this as a finished piece…
Very clever design

Catch you later
Alex

An Autopost by Ongnissim’s Autopost-Maker
You get a 8 out of 10.

:wink:

Though I will answer the way it sounds to me:

COBWUMETWTK (chokingonbeerwhileusingmyelbowtowipethekeyboard)

You need to lighten up about this " :o " much (using your scripts unit of measure of course).

%<

Great Job, Ongnissim! I really enjoy this . I think a few of the finer details can be brought out, but I could see this as a finished piece…
Great job,

Yeonil

An Autopost by Ongnissim’s Autopost-Maker
You get a 8 out of 10.


edit. damn you, alex!

:stuck_out_tongue:

I’m sorry, I don’t understand what you mean by “You need to lighten up about this " :o " much”. I have read and re-read your post, and I don’t understnad what you mean…

As to Alex_G and Yeonil:
“Nothing is original…” :slight_smile:

(No hard feelings, I would have done the same thing had someone else posted a program like this…)