View Single Post
Old Aug 9th, 2011, 4:35:50 PM   #12
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,050
DC Metro Area
Default

CSV->Trade Thread Script
Long before I had my trade thread up-and-running, I kept a database of my "trade-worthy" pokemon in a Google Docs spreadsheet. When I decided to make myself a trade thread, rather than dig through sprite databases and lay everything out, one by one by hand, I decided I'd write a Python script instead.

If it's of interest to you, feel free to pilfer it, use it and modify it to your heart's content.

Prerequsities


Your CSV file should be in the following format:


The script


Or you can download it.

In Linux, I run this from the command-line as:
Code:
$python threadmaker.py Tradeables.csv > thread.txt
Tradeables.csv is my database file. thread.txt is a plaintext file containing the VBB code that can then be copy/pasted into your thread.

Without the "> thread.txt" part, it will just output everything to the screen. I'm not sure what the Windows equivalent is. I've never used Python in Windows.

Anyway, if you have problems or find a bug, let me know!
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog

Last edited by Antar; Sep 21st, 2012 at 8:21:49 AM.
Antar is offline   Reply With Quote