This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function subscribeEvents() { | |
| Backend::$events->addEvent('shop:onExtendProductModel', $this, 'extend_product_model'); | |
| Backend::$events->addEvent('shop:onExtendProductForm', $this, 'extend_product_form'); | |
| Backend::$events->addEvent('shop:onOverrideProductCsvExportColumns', $this, 'set_product_csv_export_columns'); | |
| Backend::$events->addEvent('shop:onOverrideProductCsvImportData', $this, 'set_product_csv_import_data'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # ./canada.rb amateur.txt | |
| Fields = %w{call first_name last_name address city postal_code license} | |
| puts Fields.join ',' | |
| open(ARGV[0],:encoding=>"ISO8859-1").each_line.map{|l| | |
| p = (case l.size | |
| when 212 then | |
| l.match /^(?<call>.{7})(?<first_name>.{36})(?<last_name>.{36})(?<address>.{71})(?<city>.{36})(?<postal_code>.{14})(?<license>.{10})/ | |
| when 471 then |
NewerOlder