README.md in importo-2.0.5 vs README.md in importo-3.0.9

- old
+ new

@@ -24,26 +24,30 @@ introduction %i[what columns required_column first_line save_locally translated more_information] column attribute: :id # attributes - column attribute: :name - column attribute: :number + column attribute: :name, required: true column attribute: :description, strip_tags: false + column attribute: :number, export: { format: 'text', value: ->(record) { record.number }, example: 'FLAG-NLD-001' }, style: {b: true} + column attribute: :expires_on, export: { format: 'dd/mm/yyyy h:mm'} + column name: :price, export: { format: 'number', value: ->(record) { record.price } } column attribute: :images do |value| value.split(',').map do |image| uri = URI.parse(image) { filename: File.basename(uri.to_s), io: URI.open(uri) } end end + column name: :kitting_component_product, delay: ->(value) {value.present? ? 5 : 0 } def export_scope Current.account.products end end ``` +export args for column is optional, format takes excel custom format codes default is General You should add translations to your locale files: ```yaml en: @@ -60,24 +64,37 @@ column: name: Name number: Number description: Description images: Images - explanation: - id: Record-id, only needed if you want to update an existing record + kitting_component_product: Component Product + # Shown in note in import sheet hint: id: 36 characters, existing of hexadecimal numbers, separated by dashes images: Allows multiple image urls, separated by comma - introduction: null + # Below items are show in explanation sheet + explanation: + id: Record-id, only needed if you want to update an existing record + example: + id: 12345678-1234-1234-1234-123456789012 + name: TEST-123 + number: TEST-123 + description: Test product + value: + id: Optional + ``` ## Installation Add this line to your application's Gemfile: ```ruby gem 'importo' ``` + +Importo depends on Sidekiq Pro's batch functionality, +though you can use [sidekiq-batch](https://github.com/entdec/sidekiq-batch) as a drop-in for that. And then execute: ```bash $ bundle