diff --git a/.gitmodules b/.gitmodules index cd89b465..c65e62f1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "coriolis-data"] path = coriolis-data url = https://github.com/EDCD/coriolis-data.git -[submodule "FDevIDs"] - path = FDevIDs - url = https://github.com/EDCD/FDevIDs.git diff --git a/EDMC.py b/EDMC.py index 39d98982..cbb95165 100755 --- a/EDMC.py +++ b/EDMC.py @@ -43,7 +43,7 @@ import stats from commodity import COMMODITY_DEFAULT from config import appcmdname, appversion, config from monitor import monitor -from update import EDMCVersion, Updater +from update import EDMCVersion, Updater, check_for_fdev_updates sys.path.append(config.internal_plugin_dir) # This import must be after the sys.path.append. @@ -498,6 +498,10 @@ def main(): # noqa: C901, CCR001 if __name__ == '__main__': - main() + try: + check_for_fdev_updates(silent=True) + main() + except KeyboardInterrupt: + logger.info("Ctrl+C Detected, Attempting Clean Shutdown") logger.debug('Exiting') sys.exit(EXIT_SUCCESS) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 3ab97eb5..17fac3d9 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -2290,35 +2290,6 @@ sys.path: {sys.path}''' ) config.set('plugins_not_py3_last', int(time())) - def check_fdev_ids(): - """Display message about missing FDEVID files.""" - fdev_files = {'commodity.csv', 'rare_commodity.csv'} - for file in fdev_files: - fdevid_file = pathlib.Path(config.respath_path / 'FDevIDs' / file) - if fdevid_file.is_file(): - continue - # LANG: Popup-text about missing FDEVID Files - popup_text = _( - "FDevID Files not found! Some functionality regarding commodities " - r"may be disabled.\r\n\r\n Do you want to open the Wiki page on " - "how to set up submodules?" - ) - # And now we do need these to be actual \r\n - popup_text = popup_text.replace('\\n', '\n') - popup_text = popup_text.replace('\\r', '\r') - - openwikipage = tk.messagebox.askquestion( - # LANG: Popup window title for missing FDEVID files - _('FDevIDs: Missing Commodity Files'), - popup_text - ) - if openwikipage == "yes": - webbrowser.open( - "https://github.com/EDCD/EDMarketConnector/wiki/Running-from-source" - "#obtain-a-copy-of-the-application-source" - ) - break - # UI Transparency ui_transparency = config.get_int('ui_transparency') if ui_transparency == 0: @@ -2331,8 +2302,6 @@ sys.path: {sys.path}''' root.after(1, messagebox_not_py3) # Show warning popup for killswitches matching current version root.after(2, show_killswitch_poppup, root) - # Check for FDEV IDs - root.after(3, check_fdev_ids) # Start the main event loop try: root.mainloop() diff --git a/FDevIDs b/FDevIDs deleted file mode 160000 index 9b3f4061..00000000 --- a/FDevIDs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9b3f40612017b43a8b826017e1e2befebd9074f2 diff --git a/FDevIDs/commodity.csv b/FDevIDs/commodity.csv new file mode 100644 index 00000000..1a541cb2 --- /dev/null +++ b/FDevIDs/commodity.csv @@ -0,0 +1,255 @@ +id,symbol,category,name +128049152,Platinum,Metals,Platinum +128049153,Palladium,Metals,Palladium +128049154,Gold,Metals,Gold +128049155,Silver,Metals,Silver +128049156,Bertrandite,Minerals,Bertrandite +128049157,Indite,Minerals,Indite +128049158,Gallite,Minerals,Gallite +128049159,Coltan,Minerals,Coltan +128049160,Uraninite,Minerals,Uraninite +128049161,Lepidolite,Minerals,Lepidolite +128049162,Cobalt,Metals,Cobalt +128049163,Rutile,Minerals,Rutile +128049165,Bauxite,Minerals,Bauxite +128049166,Water,Chemicals,Water +128049168,Beryllium,Metals,Beryllium +128049169,Indium,Metals,Indium +128049170,Gallium,Metals,Gallium +128049171,Tantalum,Metals,Tantalum +128049172,Uranium,Metals,Uranium +128049173,Lithium,Metals,Lithium +128049174,Titanium,Metals,Titanium +128049175,Copper,Metals,Copper +128049176,Aluminium,Metals,Aluminium +128049177,Algae,Foods,Algae +128049178,FruitAndVegetables,Foods,Fruit and Vegetables +128049180,Grain,Foods,Grain +128049182,Animalmeat,Foods,Animal Meat +128049183,Fish,Foods,Fish +128049184,FoodCartridges,Foods,Food Cartridges +128049185,SyntheticMeat,Foods,Synthetic Meat +128049188,Tea,Foods,Tea +128049189,Coffee,Foods,Coffee +128049190,Leather,Textiles,Leather +128049191,NaturalFabrics,Textiles,Natural Fabrics +128049193,SyntheticFabrics,Textiles,Synthetic Fabrics +128049197,Polymers,Industrial Materials,Polymers +128049199,Semiconductors,Industrial Materials,Semiconductors +128049200,Superconductors,Industrial Materials,Superconductors +128049202,HydrogenFuel,Chemicals,Hydrogen Fuel +128049203,MineralOil,Chemicals,Mineral Oil +128049204,Explosives,Chemicals,Explosives +128049205,Pesticides,Chemicals,Pesticides +128049208,AgriculturalMedicines,Medicines,Agri-Medicines +128049209,PerformanceEnhancers,Medicines,Performance Enhancers +128049210,BasicMedicines,Medicines,Basic Medicines +128049212,BasicNarcotics,Legal Drugs,Narcotics +128049213,Tobacco,Legal Drugs,Tobacco +128049214,Beer,Legal Drugs,Beer +128049215,Wine,Legal Drugs,Wine +128049216,Liquor,Legal Drugs,Liquor +128049217,PowerGenerators,Machinery,Power Generators +128049218,WaterPurifiers,Machinery,Water Purifiers +128049220,HeliostaticFurnaces,Machinery,Microbial Furnaces +128049221,MineralExtractors,Machinery,Mineral Extractors +128049222,CropHarvesters,Machinery,Crop Harvesters +128049223,MarineSupplies,Machinery,Marine Equipment +128049225,ComputerComponents,Technology,Computer Components +128049226,HazardousEnvironmentSuits,Technology,H.E. Suits +128049227,Robotics,Technology,Robotics +128049228,AutoFabricators,Technology,Auto-Fabricators +128049229,AnimalMonitors,Technology,Animal Monitors +128049230,AquaponicSystems,Technology,Aquaponic Systems +128049231,AdvancedCatalysers,Technology,Advanced Catalysers +128049232,TerrainEnrichmentSystems,Technology,Land Enrichment Systems +128049233,PersonalWeapons,Weapons,Personal Weapons +128049234,BattleWeapons,Weapons,Battle Weapons +128049235,ReactiveArmour,Weapons,Reactive Armour +128049236,NonLethalWeapons,Weapons,Non-Lethal Weapons +128049238,DomesticAppliances,Consumer Items,Domestic Appliances +128049240,ConsumerTechnology,Consumer Items,Consumer Technology +128049241,Clothing,Consumer Items,Clothing +128049243,Slaves,Slavery,Slaves +128049244,Biowaste,Waste,Biowaste +128049245,ToxicWaste,Waste,Toxic Waste +128049246,ChemicalWaste,Waste,Chemical Waste +128049248,Scrap,Waste,Scrap +128049669,ProgenitorCells,Medicines,Progenitor Cells +128049670,CombatStabilisers,Medicines,Combat Stabilisers +128049671,ResonatingSeparators,Technology,Resonating Separators +128049672,BioReducingLichen,Technology,Bioreducing Lichen +128064028,AtmosphericExtractors,Machinery,Atmospheric Processors +128066403,Drones,NonMarketable,Limpets +128666752,USSCargoBlackBox,Salvage,Black Box +128666754,USSCargoTradeData,Salvage,Trade Data +128666755,USSCargoMilitaryPlans,Salvage,Military Plans +128666756,USSCargoAncientArtefact,Salvage,Ancient Artefact +128666757,USSCargoRareArtwork,Salvage,Rare Artwork +128666758,USSCargoExperimentalChemicals,Salvage,Experimental Chemicals +128666759,USSCargoRebelTransmissions,Salvage,Rebel Transmissions +128666760,USSCargoPrototypeTech,Salvage,Prototype Tech +128666761,USSCargoTechnicalBlueprints,Salvage,Technical Blueprints +128667728,ImperialSlaves,Slavery,Imperial Slaves +128668547,UnknownArtifact,Salvage,Thargoid Sensor +128668548,AiRelics,Salvage,AI Relics +128668549,Hafnium178,Metals,Hafnium 178 +128668550,Painite,Minerals,Painite +128668551,Antiquities,Salvage,Antiquities +128668552,MilitaryIntelligence,Salvage,Military Intelligence +128671118,Osmium,Metals,Osmium +128671443,SAP8CoreContainer,Salvage,SAP 8 Core Container +128671444,TrinketsOfFortune,Consumer Items,Trinkets of Hidden Fortune +128672123,WreckageComponents,Salvage,Wreckage Components +128672124,EncriptedDataStorage,Salvage,Encrypted Data Storage +128672125,OccupiedCryoPod,Salvage,Occupied Escape Pod +128672126,PersonalEffects,Salvage,Personal Effects +128672127,ComercialSamples,Salvage,Commercial Samples +128672128,TacticalData,Salvage,Tactical Data +128672129,AssaultPlans,Salvage,Assault Plans +128672130,EncryptedCorrespondence,Salvage,Encrypted Correspondence +128672131,DiplomaticBag,Salvage,Diplomatic Bag +128672132,ScientificResearch,Salvage,Scientific Research +128672133,ScientificSamples,Salvage,Scientific Samples +128672134,PoliticalPrisoner,Salvage,Political Prisoners +128672135,Hostage,Salvage,Hostages +128672136,LargeExplorationDataCash,Salvage,Large Survey Data Cache +128672137,SmallExplorationDataCash,Salvage,Small Survey Data Cache +128672159,AntiqueJewellery,Salvage,Antique Jewellery +128672160,PreciousGems,Salvage,Precious Gems +128672161,EarthRelics,Salvage,Earth Relics +128672162,GeneBank,Salvage,Gene Bank +128672163,TimeCapsule,Salvage,Time Capsule +128672294,Cryolite,Minerals,Cryolite +128672295,Goslarite,Minerals,Goslarite +128672296,Moissanite,Minerals,Moissanite +128672297,Pyrophyllite,Minerals,Pyrophyllite +128672298,Lanthanum,Metals,Lanthanum +128672299,Thallium,Metals,Thallium +128672300,Bismuth,Metals,Bismuth +128672301,Thorium,Metals,Thorium +128672302,CeramicComposites,Industrial Materials,Ceramic Composites +128672303,SyntheticReagents,Chemicals,Synthetic Reagents +128672304,NerveAgents,Chemicals,Nerve Agents +128672305,SurfaceStabilisers,Chemicals,Surface Stabilisers +128672306,BootlegLiquor,Legal Drugs,Bootleg Liquor +128672307,GeologicalEquipment,Machinery,Geological Equipment +128672308,ThermalCoolingUnits,Machinery,Thermal Cooling Units +128672309,BuildingFabricators,Machinery,Building Fabricators +128672310,MuTomImager,Technology,Muon Imager +128672311,StructuralRegulators,Technology,Structural Regulators +128672312,Landmines,Weapons,Landmines +128672313,SkimerComponents,Machinery,Skimmer Components +128672314,EvacuationShelter,Consumer Items,Evacuation Shelter +128672315,GeologicalSamples,Salvage,Geological Samples +128672701,MetaAlloys,Industrial Materials,Meta-Alloys +128672775,Taaffeite,Minerals,Taaffeite +128672776,Jadeite,Minerals,Jadeite +128672810,UnstableDataCore,Salvage,Unstable Data Core +128672811,DamagedEscapePod,Salvage,Damaged Escape Pod +128673845,Praseodymium,Metals,Praseodymium +128673846,Bromellite,Minerals,Bromellite +128673847,Samarium,Metals,Samarium +128673848,LowTemperatureDiamond,Minerals,Low Temperature Diamonds +128673850,HydrogenPeroxide,Chemicals,Hydrogen Peroxide +128673851,LiquidOxygen,Chemicals,Liquid oxygen +128673852,MethanolMonohydrateCrystals,Minerals,Methanol Monohydrate Crystals +128673853,LithiumHydroxide,Minerals,Lithium Hydroxide +128673854,MethaneClathrate,Minerals,Methane Clathrate +128673855,InsulatingMembrane,Industrial Materials,Insulating Membrane +128673856,CMMComposite,Industrial Materials,CMM Composite +128673857,CoolingHoses,Industrial Materials,Micro-weave Cooling Hoses +128673858,NeofabricInsulation,Industrial Materials,Neofabric Insulation +128673859,ArticulationMotors,Machinery,Articulation Motors +128673860,HNShockMount,Machinery,HN Shock Mount +128673861,EmergencyPowerCells,Machinery,Emergency Power Cells +128673862,PowerConverter,Machinery,Power Converter +128673863,PowerGridAssembly,Machinery,Energy Grid Assembly +128673864,PowerTransferConduits,Machinery,Power Transfer Bus +128673865,RadiationBaffle,Machinery,Radiation Baffle +128673866,ExhaustManifold,Machinery,Exhaust Manifold +128673867,ReinforcedMountingPlate,Machinery,Reinforced Mounting Plate +128673868,HeatsinkInterlink,Machinery,Heatsink Interlink +128673869,MagneticEmitterCoil,Machinery,Magnetic Emitter Coil +128673870,ModularTerminals,Machinery,Modular Terminals +128673871,Nanobreakers,Technology,Nanobreakers +128673872,TelemetrySuite,Technology,Telemetry Suite +128673873,MicroControllers,Technology,Micro Controllers +128673874,IonDistributor,Machinery,Ion Distributor +128673875,DiagnosticSensor,Technology,Hardware Diagnostic Sensor +128673876,UnknownArtifact2,Salvage,Thargoid Probe +128682044,ConductiveFabrics,Textiles,Conductive Fabrics +128682045,MilitaryGradeFabrics,Textiles,Military Grade Fabrics +128682046,AdvancedMedicines,Medicines,Advanced Medicines +128682047,MedicalDiagnosticEquipment,Technology,Medical Diagnostic Equipment +128682048,SurvivalEquipment,Consumer Items,Survival Equipment +128682049,DataCore,Salvage,Data Core +128682051,MysteriousIdol,Salvage,Mysterious Idol +128682052,ProhibitedResearchMaterials,Salvage,Prohibited Research Materials +128682053,AntimatterContainmentUnit,Salvage,Antimatter Containment Unit +128682054,SpacePioneerRelics,Salvage,Space Pioneer Relics +128682055,FossilRemnants,Salvage,Fossil Remnants +128732183,AncientRelic,Salvage,Guardian Relic +128732184,AncientOrb,Salvage,Guardian Orb +128732185,AncientCasket,Salvage,Guardian Casket +128732186,AncientTablet,Salvage,Guardian Tablet +128732187,AncientUrn,Salvage,Guardian Urn +128732188,AncientTotem,Salvage,Guardian Totem +128737287,UnknownResin,Salvage,Thargoid Resin +128737288,UnknownBiologicalMatter,Salvage,Thargoid Biological Matter +128737289,UnknownTechnologySamples,Salvage,Thargoid Technology Samples +128740752,UnknownArtifact3,Salvage,Thargoid Link +128793127,ThargoidHeart,Salvage,Thargoid Heart +128793128,ThargoidTissueSampleType1,Salvage,Thargoid Cyclops Tissue Sample +128793129,ThargoidTissueSampleType2,Salvage,Thargoid Basilisk Tissue Sample +128793130,ThargoidTissueSampleType3,Salvage,Thargoid Medusa Tissue Sample +128824468,ThargoidScoutTissueSample,Salvage,Thargoid Scout Tissue Sample +128888499,AncientKey,Salvage,Ancient Key +128902652,ThargoidTissueSampleType4,Salvage,Thargoid Hydra Tissue Sample +128922517,M_TissueSample_Fluid,Salvage,Mollusc Fluid +128922518,M_TissueSample_Soft,Salvage,Mollusc Soft Tissue +128922519,M_TissueSample_Nerves,Salvage,Mollusc Brain Tissue +128922520,S_TissueSample_Cells,Salvage,Pod Core Tissue +128922521,S_TissueSample_Surface,Salvage,Pod Dead Tissue +128922522,S_TissueSample_Core,Salvage,Pod Surface Tissue +128922523,P_ParticulateSample,Salvage,Anomaly Particles +128922781,S9_TissueSample_Shell,Salvage,Pod Tissue +128922782,M3_TissueSample_Membrane,Salvage,Mollusc Membrane +128922783,M3_TissueSample_Mycelium,Salvage,Mollusc Mycelium +128922784,M3_TissueSample_Spores,Salvage,Mollusc Spores +128922785,S6_TissueSample_Mesoglea,Salvage,Pod Mesoglea +128922786,S6_TissueSample_Cells,Salvage,Pod Outer Tissue +128922787,S6_TissueSample_Coenosarc,Salvage,Pod Shell Tissue +128924325,Rhodplumsite,Minerals,Rhodplumsite +128924326,Serendibite,Minerals,Serendibite +128924327,Monazite,Minerals,Monazite +128924328,Musgravite,Minerals,Musgravite +128924329,Benitoite,Minerals,Benitoite +128924330,Grandidierite,Minerals,Grandidierite +128924331,Alexandrite,Minerals,Alexandrite +128924332,Opal,Minerals,Void Opal +128924333,RockforthFertiliser,Chemicals,Rockforth Fertiliser +128924334,AgronomicTreatment,Chemicals,Agronomic Treatment +128961249,Tritium,Chemicals,Tritium +128983059,OnionHeadC,Legal Drugs,Onionhead Gamma Strain +129015433,AncientRelicTG,Salvage,Unclassified Relic +129019258,ThargoidTissueSampleType5,Salvage,Thargoid Orthrus Tissue Sample +129019259,ThargoidGeneratorTissueSample,Salvage,Caustic Tissue Sample +129022087,UnocuppiedEscapePod,Salvage,Unoccupied Escape Pod +129022395,ThargoidTissueSampleType6,Salvage,Thargoid Glaive Tissue Sample +129022396,ThargoidTissueSampleType7,Salvage,Thargoid Scythe Tissue Sample +129022398,ThargoidTissueSampleType9a,Salvage,Titan Deep Tissue Sample +129022399,ThargoidTissueSampleType9b,Salvage,Titan Tissue Sample +129022400,ThargoidTissueSampleType9c,Salvage,Titan Partial Tissue Sample +129022402,ThargoidTissueSampleType10a,Salvage,Titan Maw Deep Tissue Sample +129022403,ThargoidTissueSampleType10b,Salvage,Titan Maw Tissue Sample +129022404,ThargoidTissueSampleType10c,Salvage,Titan Maw Partial Tissue Sample +129022405,UnknownSack,Salvage,Protective Membrane Scrap +129022406,ThargoidPod,Salvage,Xenobiological Prison Pod +129022407,CoralSap,Salvage,Coral Sap +129022408,UnknownMineral,Salvage,Impure Spire Mineral +129022409,UnknownRefinedMineral,Salvage,Semi-Refined Spire Mineral +129030459,ThargoidTitanDriveComponent,Salvage,Titan Drive Component +129030460,ThargoidCystSpecimen,Salvage,Cyst Specimen +129030461,ThargoidBoneFragments,Salvage,Bone Fragments +129030462,ThargoidOrganSample,Salvage,Organ Sample diff --git a/FDevIDs/rare_commodity.csv b/FDevIDs/rare_commodity.csv new file mode 100644 index 00000000..9997f171 --- /dev/null +++ b/FDevIDs/rare_commodity.csv @@ -0,0 +1,143 @@ +id,symbol,market_id,category,name +128666746,EraninPearlWhisky,128001536,Legal Drugs,Eranin Pearl Whisky +128666747,LavianBrandy,128106744,Legal Drugs,Lavian Brandy +128667019,HIP10175BushMeat,3223234816,Foods,HIP 10175 Bush Meat +128667020,AlbinoQuechuaMammoth,3222822912,Foods,Albino Quechua Mammoth Meat +128667021,UtgaroarMillenialEggs,128037120,Foods,Utgaroar Millennial Eggs +128667022,WitchhaulKobeBeef,3223358720,Foods,Witchhaul Kobe Beef +128667023,KarsukiLocusts,3225028096,Foods,Karsuki Locusts +128667024,GiantIrukamaSnails,3225345792,Foods,Giant Irukama Snails +128667025,BaltahSineVacuumKrill,128088056,Foods,Baltah'sine Vacuum Krill +128667026,CetiRabbits,3222560000,Foods,Ceti Rabbits +128667027,KachiriginLeaches,3221595648,Medicines,Kachirigin Filter Leeches +128667028,LyraeWeed,3226417152,Legal Drugs,Lyrae Weed +128667029,OnionHead,128129272,Legal Drugs,Onionhead +128667030,TarachTorSpice,128041984,Legal Drugs,Tarach Spice +128667031,Wolf1301Fesh,128084984,Legal Drugs,Wolf Fesh +128667032,BorasetaniPathogenetics,3229638400,Weapons,Borasetani Pathogenetics +128667033,HIP118311Swarm,3223177472,Weapons,HIP 118311 Swarm +128667034,KonggaAle,3226978048,Legal Drugs,Kongga Ale +128667035,WuthieloKuFroth,3222155776,Legal Drugs,Wuthielo Ku Froth +128667036,AlacarakmoSkinArt,3231373824,Consumer Items,Alacarakmo Skin Art +128667037,EleuThermals,3230624768,Consumer Items,Eleu Thermals +128667038,EshuUmbrellas,3222295552,Consumer Items,Eshu Umbrellas +128667039,KaretiiCouture,3227333120,Consumer Items,Karetii Couture +128667040,NjangariSaddles,3222416896,Consumer Items,Njangari Saddles +128667041,AnyNaCoffee,3229880064,Foods,Any Na Coffee +128667042,CD75CatCoffee,3228566016,Foods,CD-75 Kitten Brand Coffee +128667043,GomanYauponCoffee,3224449792,Foods,Goman Yaupon Coffee +128667044,VolkhabBeeDrones,3227831808,Machinery,Volkhab Bee Drones +128667045,KinagoInstruments,3227394304,Consumer Items,Kinago Violins +128667046,NgunaModernAntiques,3221538304,Consumer Items,Nguna Modern Antiques +128667047,RajukruStoves,3227512320,Consumer Items,Rajukru Multi-Stoves +128667048,TiolceWaste2PasteUnits,3224141312,Consumer Items,Tiolce Waste2Paste Units +128667049,ChiEridaniMarinePaste,128128760,Foods,Chi Eridani Marine Paste +128667050,EsusekuCaviar,3226919680,Foods,Esuseku Caviar +128667051,LiveHecateSeaWorms,128042496,Foods,Live Hecate Sea Worms +128667052,HelvetitjPearls,3231094528,Metals,Helvetitj Pearls +128667053,HIP41181Squid,3227995392,Foods,HIP Proto-Squid +128667054,CoquimSpongiformVictuals,3223832576,Foods,Coquim Spongiform Victuals +128667055,AerialEdenApple,128083448,Foods,Eden Apples of Aerial +128667056,NeritusBerries,3228206080,Foods,Neritus Berries +128667057,OchoengChillies,3226719232,Foods,Ochoeng Chillies +128667058,DeuringasTruffles,3229713408,Foods,Deuringas Truffles +128667059,HR7221Wheat,3226170880,Foods,HR 7221 Wheat +128667060,JarouaRice,3224698112,Foods,Jaroua Rice +128667061,BelalansRayLeather,3223537152,Textiles,Belalans Ray Leather +128667062,DamnaCarapaces,3227751936,Textiles,Damna Carapaces +128667063,RapaBaoSnakeSkins,3222875648,Textiles,Rapa Bao Snake Skins +128667064,VanayequiRhinoFur,3227289856,Textiles,Vanayequi Ceratomorpha Fur +128667065,BastSnakeGin,128086776,Legal Drugs,Bast Snake Gin +128667066,ThrutisCream,3226522368,Legal Drugs,Thrutis Cream +128667067,WulpaHyperboreSystems,3221388032,Machinery,Wulpa Hyperbore Systems +128667068,AganippeRush,128012800,Medicines,Aganippe Rush +128667069,TerraMaterBloodBores,128051466,Medicines,Terra Mater Blood Bores +128667070,HolvaDuellingBlades,3222713088,Weapons,Holva Duelling Blades +128667071,KamorinHistoricWeapons,3221669632,Weapons,Kamorin Historic Weapons +128667072,GilyaSignatureWeapons,3226857216,Weapons,Gilya Signature Weapons +128667073,DeltaPhoenicisPalms,128045312,Chemicals,Delta Phoenicis Palms +128667074,ToxandjiVirocide,3230258688,Chemicals,Toxandji Virocide +128667075,XiheCompanions,3224133120,Technology,Xihe Biomorphic Companions +128667076,SanumaMEAT,3230331136,Foods,Sanuma Decorative Meat +128667077,EthgrezeTeaBuds,3229524992,Foods,Ethgreze Tea Buds +128667078,CeremonialHeikeTea,3227417856,Foods,Ceremonial Heike Tea +128667079,TanmarkTranquilTea,128057866,Foods,Tanmark Tranquil Tea +128667080,AZCancriFormula42,3228400128,Technology,AZ Cancri Formula 42 +128667081,KamitraCigars,3225450752,Legal Drugs,Kamitra Cigars +128667082,RusaniOldSmokey,3229255680,Legal Drugs,Rusani Old Smokey +128667083,YasoKondiLeaf,3223088640,Legal Drugs,Yaso Kondi Leaf +128667084,ChateauDeAegaeon,3228416768,Legal Drugs,Chateau De Aegaeon +128667085,WatersOfShintara,128666762,Medicines,The Waters of Shintara +128667668,OphiuchiExinoArtefacts,3228939264,Consumer Items,Ophiuch Exino Artefacts +128667669,BakedGreebles,3229378560,Foods,Baked Greebles +128667670,CetiAepyornisEgg,3222560256,Foods,Aepyornis Egg +128667671,SaxonWine,3227986432,Legal Drugs,Saxon Wine +128667672,CentauriMegaGin,3228728832,Legal Drugs,Centauri Mega Gin +128667673,AnduligaFireWorks,3230243584,Consumer Items,Anduliga Fire Works +128667674,BankiAmphibiousLeather,3228346112,Textiles,Banki Amphibious Leather +128667675,CherbonesBloodCrystals,3229594624,Metals,Cherbones Blood Crystals +128667676,MotronaExperienceJelly,3229750528,Legal Drugs,Motrona Experience Jelly +128667677,GeawenDanceDust,3230954752,Legal Drugs,Geawen Dance Dust +128667678,GerasianGueuzeBeer,3228047360,Legal Drugs,Gerasian Gueuze Beer +128667679,HaidneBlackBrew,3226557696,Foods,Haiden Black Brew +128667680,HavasupaiDreamCatcher,3221438976,Consumer Items,Havasupai Dream Catcher +128667681,BurnhamBileDistillate,3230224384,Legal Drugs,Burnham Bile Distillate +128667682,HIPOrganophosphates,3227036160,Chemicals,HIP Organophosphates +128667683,JaradharrePuzzlebox,3230754816,Consumer Items,Jaradharre Puzzle Box +128667684,KorroKungPellets,3228726272,Chemicals,Koro Kung Pellets +128667685,LFTVoidExtractCoffee,3229028864,Foods,Void Extract Coffee +128667686,HonestyPills,3229561344,Medicines,Honesty Pills +128667687,NonEuclidianExotanks,3224135424,Machinery,Non Euclidian Exotanks +128667688,LTTHyperSweet,3224166400,Foods,LTT Hyper Sweet +128667689,MechucosHighTea,3228398848,Foods,Mechucos High Tea +128667690,MedbStarlube,3228762368,Chemicals,Medb Starlube +128667691,MokojingBeastFeast,3229612800,Foods,Mokojing Beast Feast +128667692,MukusubiiChitinOs,3221719296,Foods,Mukusubii Chitin-os +128667693,MulachiGiantFungus,3228892672,Foods,Mulachi Giant Fungus +128667694,NgadandariFireOpals,3226127872,Metals,Ngadandari Fire Opals +128667695,TiegfriesSynthSilk,3227726848,Textiles,Tiegfries Synth Silk +128667696,UzumokuLowGWings,3226474496,Consumer Items,Uzumoku Low-G Wings +128667697,VHerculisBodyRub,3228959232,Medicines,V Herculis Body Rub +128667698,WheemeteWheatCakes,3225032704,Foods,Wheemete Wheat Cakes +128667699,VegaSlimWeed,128149240,Medicines,Vega Slimweed +128667700,AltairianSkin,128151032,Consumer Items,Altairian Skin +128667701,PavonisEarGrubs,128117240,Legal Drugs,Pavonis Ear Grubs +128667702,JotunMookah,128078840,Textiles,Jotun Mookah +128667703,GiantVerrix,128121336,Machinery,Giant Verrix +128667704,IndiBourbon,128118520,Legal Drugs,Indi Bourbon +128667705,AroucaConventualSweets,128098040,Foods,Arouca Conventual Sweets +128667706,TauriChimes,128134648,Consumer Items,Tauri Chimes +128667707,ZeesszeAntGlue,128125432,Consumer Items,Zeessze Ant Grub Glue +128667708,PantaaPrayerSticks,3228824064,Medicines,Pantaa Prayer Sticks +128667709,FujinTea,128134392,Foods,Fujin Tea +128667710,ChameleonCloth,3223418880,Textiles,Chameleon Cloth +128667711,OrrerianViciousBrew,128166392,Foods,Orrerian Vicious Brew +128667712,UszaianTreeGrub,128164856,Foods,Uszaian Tree Grub +128667713,MomusBogSpaniel,128075256,Consumer Items,Momus Bog Spaniel +128667714,DisoMaCorn,128161016,Foods,Diso Ma Corn +128667715,LeestianEvilJuice,128639992,Legal Drugs,Leestian Evil Juice +128667716,BlueMilk,128639992,Foods,Azure Milk +128667717,AlienEggs,128164088,Consumer Items,Leathery Eggs +128667718,AlyaBodilySoap,3221638400,Medicines,Alya Body Soap +128667719,VidavantianLace,3231082240,Consumer Items,Vidavantian Lace +128667760,TransgenicOnionHead,128057866,Legal Drugs,Lucan Onionhead +128668017,JaquesQuinentianStill,128667761,Consumer Items,Jaques Quinentian Still +128668018,SoontillRelics,3225348096,Consumer Items,Soontill Relics +128671119,Advert1,3227172352,Consumer Items,Ultra-Compact Processor Prototypes +128672121,TheHuttonMug,3228728832,Consumer Items,The Hutton Mug +128672122,SothisCrystallineGold,128668557,Metals,Sothis Crystalline Gold +128672316,MasterChefs,128123640,Slavery,Master Chefs +128672431,PersonalGifts,128081912,Salvage,Festive Gifts +128672432,CrystallineSpheres,128059402,Salvage,Crystalline Spheres +128672812,OnionHeadA,3226977024,Legal Drugs,Onionhead Alpha Strain +128673069,OnionHeadB,3223027200,Legal Drugs,Onionhead Beta Strain +128682050,GalacticTravelGuide,128673074,Salvage,Galactic Travel Guide +128727921,AnimalEffigies,3228463360,Legal Drugs,Crom Silver Fesh +128732551,ShansCharisOrchid,128107768,Consumer Items,Shan's Charis Orchid +128748428,BuckyballBeerMats,128745551,Consumer Items,Buckyball Beer Mats +128793113,HarmaSilverSeaRum,3221575424,Legal Drugs,Harma Silver Sea Rum +128793114,PlatinumAloy,3223779840,Metals,Platinum Alloy +128913661,Nanomedicines,3226651904,Medicines,Nanomedicines +128922524,Duradrives,3223453184,Consumer Items,Duradrives +128958679,ApaVietii,128958681,Legal Drugs,Apa Vietii +129002574,ClassifiedExperimentalEquipment,128986325,Technology,Classified Experimental Equipment diff --git a/L10n/en.template b/L10n/en.template index 200743c8..a6418deb 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -207,12 +207,6 @@ /* EDMarketConnector.py: Popup-text about 'active' plugins without Python 3.x support; In files: EDMarketConnector.py:2253:2259; */ "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an updated version available, else alert the developer that they need to update the code for Python 3.x.\r\n\r\nYou can disable a plugin by renaming its folder to have '{DISABLED}' on the end of the name." = "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an updated version available, else alert the developer that they need to update the code for Python 3.x.\r\n\r\nYou can disable a plugin by renaming its folder to have '{DISABLED}' on the end of the name."; -/* EDMarketConnector.py: Popup-text about missing FDEVID Files; In files: EDMarketConnector.py:2329; */ -"FDevID Files not found! Some functionality regarding commodities may be disabled.\r\n\r\n Do you want to open the Wiki page on how to set up submodules?" = "FDevID Files not found! Some functionality regarding commodities may be disabled.\r\n\r\n Do you want to open the Wiki page on how to set up submodules?"; - -/* EDMarketConnector.py: Popup window title for missing FDEVID files; In files: EDMarketConnector.py:2340; */ -"FDevIDs: Missing Commodity Files" = "FDevIDs: Missing Commodity Files"; - /* EDMarketConnector.py: Settings > Plugins tab; prefs.py: Label on Settings > Plugins tab; In files: EDMarketConnector.py:2263; prefs.py:986; */ "Plugins" = "Plugins"; diff --git a/build.py b/build.py index 851f391b..440fd414 100644 --- a/build.py +++ b/build.py @@ -21,6 +21,7 @@ from config import ( _static_appversion, update_interval ) +from update import check_for_fdev_updates def iss_build(template_path: str, output_file: str) -> None: @@ -198,4 +199,5 @@ def build() -> None: if __name__ == "__main__": + check_for_fdev_updates() build() diff --git a/update.py b/update.py index 991558d6..e1dc4976 100644 --- a/update.py +++ b/update.py @@ -7,6 +7,7 @@ See LICENSE file. """ from __future__ import annotations +import pathlib import sys import threading from traceback import print_exc @@ -25,6 +26,37 @@ if TYPE_CHECKING: logger = get_main_logger() +def check_for_fdev_updates(silent: bool = False) -> None: # noqa: CCR001 + """Check for and download FDEV ID file updates.""" + files_urls = [ + ('commodity.csv', 'https://raw.githubusercontent.com/EDCD/FDevIDs/master/commodity.csv'), + ('rare_commodity.csv', 'https://raw.githubusercontent.com/EDCD/FDevIDs/master/rare_commodity.csv') + ] + + for file, url in files_urls: + fdevid_file = pathlib.Path(config.respath_path / 'FDevIDs' / file) + try: + with open(fdevid_file, newline='', encoding='utf-8') as f: + local_content = f.read() + except FileNotFoundError: + local_content = None + + response = requests.get(url) + if response.status_code != 200: + if not silent: + logger.error(f'Failed to download {file}! Unable to continue.') + continue + + if local_content == response.text: + if not silent: + logger.info(f'FDEV ID file {file} already up to date.') + else: + if not silent: + logger.info(f'FDEV ID file {file} not up to date. Downloading...') + with open(fdevid_file, 'w', newline='', encoding='utf-8') as csvfile: + csvfile.write(response.text) + + class EDMCVersion: """ Hold all the information about an EDMC version. @@ -135,6 +167,8 @@ class Updater: elif sys.platform == 'win32' and self.updater: self.updater.win_sparkle_check_update_with_ui() + check_for_fdev_updates() + def check_appcast(self) -> EDMCVersion | None: """ Manually (no Sparkle or WinSparkle) check the update_feed appcast file.