Quantcast

Jump to content


Photo

syaopup's AB list maker for non advanced members


  • Please log in to reply
23 replies to this topic

#1 syaopup

syaopup
  • 61 posts

Posted 25 March 2012 - 07:11 PM

*
POPULAR POST!

Based on this topic and this topic, just that it automates the process.

What it does: You give it an unformatted copy and paste text file, it gives you a properly formatted text file ready for use with AB.
Attached File  AB List Maker.zip   4.94KB   206 downloads
Posted Image

The format it requires for each item
[item name]
[price]
[profit]

The number of blank spaces in between each item does not matter.
Other than that, it is stupid and does not know if you are giving a txt file proper format, so it'll output garbage if you try to format other txt files that does not follow that format.
Done in Visual C#, which means you need the .net framework for it to work.

Be lenient on me, it's my first application published on the net, ever, and I'm self learning how to script. :) Do inform me if there's any bugs!

Edited by syaopup, 25 March 2012 - 07:13 PM.


#2 Neoquest

Neoquest
  • 1,680 posts


Users Awards

Posted 25 March 2012 - 07:14 PM

Nice! Looks clean and simple! Great utility for Non-Advanced members.

#3 Icey Defeat

Icey Defeat
  • 8,298 posts


Users Awards

Posted 25 March 2012 - 07:21 PM

+1. If this works as advertised, this is a great tool.

#4 syaopup

syaopup
  • 61 posts

Posted 25 March 2012 - 09:23 PM

Does it also check the end of line to ensure there are no spaces after the item name?

From memory, when I copy/paste the information, some or all of the items had one or two spaces after the item name (but not all items). I had to check the last character to see if it was a space, then remove it using the replace function.

It takes care of whitespaces before and after item names too. :)

E.g. Glowing Apple has tabs before and after, Honey and Bacon Burger has spaces before and after.
Glowing Apple	
99,999 NP
Profit: 94,998 NP
	

   Honey and Bacon Burger	
99,833 NP
Profit: 94,833 NP

The output will become
Glowing Apple
Honey and Bacon Burger


#5 Icey Defeat

Icey Defeat
  • 8,298 posts


Users Awards

Posted 25 March 2012 - 09:40 PM

OOC, are you splitting each line by new line character then iterating through each line and removing those with 'np' in them?

If so, this would break it: http://items.jellyne...&showitem=39948

Edited by Icey Defeat, 25 March 2012 - 09:41 PM.


#6 syaopup

syaopup
  • 61 posts

Posted 25 March 2012 - 10:07 PM

OOC, are you splitting each line by new line character then iterating through each line and removing those with 'np' in them?

If so, this would break it: http://items.jellyne...&showitem=39948

Nope, items having 'np' or numbers in them are safe. ^^

The script goes something like this:
1. Trim all the lines of whitespaces
2. Delete empty lines
3. For every block of 3 lines, add the first line using
if (i % 3 == 0)
This means it only adds the name of the item, then discards the cost and profit of the item
5. Repeat until end of document
6. Print it out on the output textbox

Not the most efficient nor failproof way of doing things, but it gets the job done. xD

#7 Kae

Kae
  • 65 posts

Posted 27 March 2012 - 02:21 AM

It looks really cool. Great job ^^ But I'm going to go ahead and ask: is this available on mac?

#8 syaopup

syaopup
  • 61 posts

Posted 27 March 2012 - 04:38 PM

Sorry, because it's done in Visual C#, it needs the .Net framework, so it's not available on mac. :X

#9 Kae

Kae
  • 65 posts

Posted 28 March 2012 - 12:10 AM

Dang, I'll just have to stick with the notepad method then. Thanks anyway :)

#10 Unseen

Unseen
  • Cultist of the Unseeing Eye

  • 570 posts

Posted 28 March 2012 - 12:52 AM

Might be able to convert this over using the Mono open source design, but it's totally syao's call.

Edit: Sorry, said ASP.NET because of a different idea I had.

Edited by Unseen, 28 March 2012 - 12:57 AM.


#11 syaopup

syaopup
  • 61 posts

Posted 28 March 2012 - 01:48 AM

Might be able to convert this over using the Mono open source design, but it's totally syao's call.

Edit: Sorry, said ASP.NET because of a different idea I had.


Will look into that when I have the time, if it's just opening the existing project in mono and exporting it for other platforms, I don't see why not. :)
This program is pretty primitive though, I'm very sure most of the other programmers on here can whip up a web based version in under an hour.

#12 Unseen

Unseen
  • Cultist of the Unseeing Eye

  • 570 posts

Posted 28 March 2012 - 02:15 AM

Will look into that when I have the time, if it's just opening the existing project in mono and exporting it for other platforms, I don't see why not. :)
This program is pretty primitive though, I'm very sure most of the other programmers on here can whip up a web based version in under an hour.


Not sure if it's exactly that simple, might be more work on the end user area also.

#13 Inkheart

Inkheart
  • 268 posts

Posted 28 March 2012 - 04:40 AM

Not sure if it's exactly that simple, might be more work on the end user area also.


Nah, it's pretty simple. : ) Whenever I need to grab a quick list from the Item DB, I just copy-and-paste the entire page, pop it into my editor, and replace against this RegEx: /(.+?)\n.+?NP/

I could wrap a Web interface around this very simple operation in minutes, but I don't think I could do so in good conscience, as this is syao's first program, and it doesn't seem right to "steal her thunder", as it were.

Edited by Inkheart, 28 March 2012 - 04:40 AM.


#14 syaopup

syaopup
  • 61 posts

Posted 28 March 2012 - 05:32 AM

You can go ahead, if it makes the community better, there's not point stopping. :)
If it'll make you feel better about 'stealing my thunder', I'm actually happy that someone better is interested enough to make something similar to what I've done, because it shows that the idea/concept of the program is good enough to be expanded on.

#15 Turnip

Turnip
  • woomy woomy manmenmi!!

  • 2,480 posts


Users Awards

Posted 28 March 2012 - 05:51 AM

Looks great!! Good job~ +rep :3

You can go ahead, if it makes the community better, there's not point stopping. :)
If it'll make you feel better about 'stealing my thunder', I'm actually happy that someone better is interested enough to make something similar to what I've done, because it shows that the idea/concept of the program is good enough to be expanded on.


That's a really nice way of putting it, heheh ♥

#16 Romy

Romy
  • Ableist Neocodex Elite Four Member



  • 4,738 posts


Users Awards

Posted 28 March 2012 - 09:45 AM

Wow! This is amazing!

Since I'm way to cheap to get advanced, I will definitively be using this program a alot!

Thank you!

#17 SStupid

SStupid
  • 1 posts

Posted 29 March 2012 - 10:22 AM

Thanks so much!
So much easier than doing it myself :funone:

#18 trizzle

trizzle
  • Deceptive Minx

  • 973 posts


Users Awards

Posted 29 March 2012 - 10:41 AM

Oh you are awesome :)

#19 zandra

zandra
  • 791 posts

Posted 29 March 2012 - 04:28 PM

I do remember making list manually when i am none-advance, takes up too much time, especially for food shops etc. This would solve all the problems with not-updated lists

#20 RitzWin

RitzWin
  • 241 posts

Posted 07 April 2012 - 05:46 PM

+rep :)
Thanks, very easy

#21 Singer

Singer
  • 487 posts


Users Awards

Posted 08 April 2012 - 12:01 PM

WOW I love it :)
+rep

#22 crispywoof

crispywoof
  • 14 posts

Posted 21 July 2012 - 06:15 AM

You're the GOD.

#23 pyelon

pyelon
  • 73 posts

Posted 16 September 2012 - 02:54 PM

ty for yet another useful program. I shall be trying it out soon :)

#24 HappyAccident

HappyAccident
  • 389 posts


Users Awards

Posted 16 September 2012 - 03:42 PM

Very, very nice simple program. +rep.

(Even if I don't need it as I have advanced thanks anyways.)

Edited by HappyAccident, 16 September 2012 - 03:43 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users