APIExample:Partlist Export to CSV
From Aligni Wiki
This example shows how to use the Aligni API to query a part's partlist and export that partlist as CSV. Although this functionality is included with the Aligni Application, the script allows you to customize the CSV output and include or exclude fields as necessary.
To use this script, you just need to place aligni.rb and the above script in the same directory, then call it with the part_id of the part you want to export the partlist for. For example, the demo database has the part FPGA-1200-v1. Note that the part ID (747) is at the end of the URL. To export this partlist to partlist.csv, you would enter this:
partlist_export_csv.rb 747 > partlist.csv
