Driving force behind gw2crafts
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
auto_gen recipe updates Sep 17, 2018
css css stylings for 'need' field. Jun 13, 2017
img adsense changes and translation updates May 24, 2016
js Added "remaining cost" information. Apr 8, 2018
translations Added "remaining cost" information. Apr 8, 2018
.gitignore added bank/materials support to guides. Does not have lang support yet Jun 13, 2017
Crafting.py Replaced deepcopy with simpler version. Jul 29, 2018
Create_recipes.py Minor optimizations. Specifically removed several unnecessary deepcopy Jul 28, 2018
Gen_ifn.py Removed thanks for prior guides(5 years ago at this point) Sep 17, 2018
Globals.py type(dict) != type(defaultdict) Jul 30, 2018
MakeGuide.py revert to deepcopy Jul 30, 2018
MyPrices.py Updated basic decoration prices Apr 16, 2017
MyPrint.py Minor optimizations. Specifically removed several unnecessary deepcopy Jul 28, 2018
README.md Centralized file output in a single place. Sep 23, 2015
apple-touch-icon-114x114-precomposed.png Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
apple-touch-icon-144x144-precomposed.png Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
apple-touch-icon-72x72-precomposed.png Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
apple-touch-icon-precomposed.png Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
apple-touch-icon.png Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
favicon.ico Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
fi.gif Added links to Ascended Armor as well as some udated recipes. Dec 10, 2013
output.py revert accidentally setting to local Mar 17, 2018
output_aws.py Updated Copyright years. Nov 26, 2016
output_ftp.py Updated Copyright years. Nov 26, 2016
output_local.py Updated Copyright years. Nov 26, 2016
xpgain_lookup.py Revert "bugfix for discoveries (only german was correct)" Jul 29, 2018

README.md

gw2craft

These are all the Python files that generate http://gw2crafts.net

Requires Python 2.7.x. You will need to define a ftp_info.py file which contains 3 strings; ftp_url, ftp_user, and ftp_pass.

Primary .py Files:

Crafting -- The main file.

MakeGuide -- Calculated the actual guides based on prices and recipes.

MyPrices -- Gathers pricing data for generating the guides. Primary resource is GW2 API. Replace "u'cost':sitem[u'sells'][u'unit_price']" with "u'cost':sitem[u'buys'][u'unit_price'] if sitem[u'buys'][u'unit_price'] > Items.ilist[item][u'vendor_value'] else sitem[u'sells'][u'unit_price']" on line 197 to create guides based on buy orders of materials instead of lowest sale price.

MyPrint -- Functions for generating human readable output.

Globals -- Initializes a couple global variables and provides a global function.

Gen_ifn -- generates the localized FAQ, nav and index pages.

Localxx -- Localized language files. Need to be updated by hand.

Create_recipes -- creates all the secondary .py files you will need. A recent snapshot of those files is included.

Secondary .py Files:

Armorsmith, Artificer, Chef, Chef_karma, Huntsman, Jeweler, Leatherworker, Tailor -- Contain all recipes used by Crafting.py indexed by itemid(int).

Items_xx -- Contains itemid:name pairs for outputting item names in the correct language.

Items -- contains item_id indexed dictionary of thumbnail url, item count, rarity, vendor value, type, and if the item is discovered.

How-To

Update recipes:

Run Create_recipes.py and when it finished you will have updated recipes for Crafting.py

Setup guide output:

If you want to upload the guides to AWS, create a ftp_info.py file with the variables amakey and amasec. Both variables should be strings.

If you want to output the guides locally, rather than uploading, open Output.py and comment out this line:

from output_aws import write_file		# For uploading files to AWS

and uncomment this line:

#from output_local import write_file	# For writing files to disk

If you want to upload the guides via FTP, comment out the same AWS line in output.py, and uncomment this line:

#from output_ftp import write_file		# For uploading files via FTP

Additionally, create a ftp_info.py file with the variables ftp_url, ftp_user, and ftp_pass. All 3 variables should be strings.

Generate guides:

Run Crafting.py, this step is much faster if you use pypy, and it will generate your guides.