Package: aa-buybacks
Buybacks for Alliance AuthThis is a buyback program management app forAlliance Auth(AA).ContentsKey FeaturesInstallationInstall appUpdate Eve Online appConfigure AA settingsFinalize installation into AAData importSetup permissionsSetup corpDefine programsCalculatingUpdatingTips & TricksTODOOverviewThis app helps running buyback programs for an alliance or corporation.Key FeaturesIt offers the following main features:Manage corporation buyback programsCalculate value of the items that will be sent to the buyback programStore statistics on the usage of buyback programsInstallationInstall appInstall into your Alliance Auth virtual environment from PyPI:pipinstallaa-buybacksUpdate Eve Online appUpdate the Eve Online app used for authentication in your AA installation to include the following scopes:esi-universe.read_structures.v1
esi-contracts.read_corporation_contracts.v1
esi-assets.read_corporation_assets.v1Configure AA settingsConfigure your AA settings (local.py) as follows:Add'eveuniverse'and'buybacks'toINSTALLED_APPSAdd these lines to bottom of your settings file:# settings for buybacksCELERYBEAT_SCHEDULE['buybacks_update_all_offices']={'task':'buybacks.tasks.update_all_offices','schedule':crontab(minute=0,hour='*/12'),}CELERYBEAT_SCHEDULE['buybacks_sync_all_contracts']={'task':'buybacks.tasks.sync_all_contracts','schedule':crontab(minute=0,hour='*'),}Finalize installation into AARun migrations & copy static filespythonmanage.pymigrate
pythonmanage.pycollectstaticRestart your supervisor services for AAData importLoad EVE Online type data from ESI:pythonmanage.pybuybacks_load_typesSetup permissionsNow you can access Alliance Auth and setup permissions for your users. This is an overview of all permissions used by this app:NamePurposeCodeCan access this app and view buyback programsEnabling the app for a user. This permission should be enabled for everyone who is allowed to use the app (e.g. Member state)basic_accessCan setup corporationAdd or updates the character for syncing offices and contracts. This should be limited to users with admins / leadership privileges.setup_retrieverCan manage buyback programsUser with this permission can manage the buyback programs and notificationsmanage_programsSetup corpFinally you need to set a corporation with the character that will be used for fetching the corporation offices, contracts and related structures. Just click onSetup Corpand add the requested token.Note that only users with the appropriate permission will be able to see and use this button.Note that the respective character needs to be adirectorfor the corporation.Define programsLet's say your corp has an ORE buyback program and you want to use this tool for that. First, you need to click onCreate Programand fill the name of the program.Note that only users with the appropriate permission will be able to see and use this button.Once it is created, you should be able to add all the locations (where your corp has an office) denoting the structures or stations to create the contracts for. You might only accept the ores in certain corp refineries and don't want people to send it other structures.You should also be able to add all the items and the percentage the corp skims on top of the price. For example, for your ORE buyback program, addPlagioclasewith brokerage set at 20%.That's it. The buybacks program is fully created and ready to be used.CalculatingAny character can use one of the buyback programs by clicking onUsebutton on one of the program. Once done, they need to select the location and can copy-paste the items they want to send to the corp. When they click onCalculate, the app calculates the exact amount based on the prices defined in the program and shows them that total value.Once they see the total value, they would need to send an in-game contract for the exact amount and then click onNotifyto notify the app about it.Once the corp accepts a contract, our contracts sync feature would automatically match the corresponding notification (based on the total price, items with quantities and the location of the contract) and store it in the statistics.UpdatingTo update your existing installation of Buybacks first enable your virtual environment.Then run the following commands from your AA project directory (the one that containsmanage.py).pipinstall-Uaa-buybackspythonmanage.pymigrate
pythonmanage.pycollectstaticpythonmanage.pybuybacks_load_typesFinally restart your AA supervisor services.Tips & TricksIf you want to edit the brokerage of an item in a program, you can just add the item with the new brokerage and it will update the existing one.TODOUse refined value to calculate OREsSet refining percentage per itemStatistics filtering