get_all(); $summaries = array_map(function(CommunityListing $listing) { return $listing->to_summary(); }, $listings_resolved); file_put_contents($LISTING_PROVIDER_LISTING_SUMMARY, json_encode($summaries)); foreach ($listings_resolved as $listing) { $id = $listing->id; file_put_contents( "$LISTING_PROVIDER_LISTINGS/$id", json_encode($listing) ); } $listings_count = count($listings_resolved); log_info("Generated $listings_count listings."); } file_exists($LISTING_PROVIDER_LISTINGS) or mkdir($LISTING_PROVIDER_LISTINGS, 0755, true); $options = getopt("v", ["verbose"]); if (isset($options["v"]) or isset($options["verbose"])) { $LOGGING_VERBOSITY = LoggingVerbosity::Debug; } generate_listings(); ?>