Comments (9)
what is what ?
some docs - the readme is quite extensive and there is a large wiki -
but may be out of date as this is an open source project done for free in my spare time and I no longer work with Spree much
https://github.com/autotelik/datashift_spree/wiki
syntax as specified by Usage :
thor datashift:import:csv -i your_csv_file.csv
from datashift_spree.
the parent project : https://github.com/autotelik/datashift is up to date and with good readme, and probably does what you need
from datashift_spree.
Thanks What was the idea behind building a spree specific version ? Why does datashift ask for --i and --m arguments to go with -i and -m ?
from datashift_spree.
to support non trivial processing like nested child taxons. if you really need that you can see in the code how I used to over write datashift ... there is a branch to migrate Spree loader specifics to new DataShift API - but its WIP .... https://github.com/autotelik/datashift_spree/blob/feature/update_api_latest_ds_and_spree/lib/loaders/spree/product_populator.rb
--i won't work. its -i or --input
thor help
is useful, e.g
$ thor help datashift:import:csv
Usage:
thor datashift:import:csv -i, --input=INPUT -m, --model=MODEL
Options:
-m, --model=MODEL # The related active record model
-i, --input=INPUT # The input .xls file
-c, [--config=CONFIG] # YAML config file with defaults, over-rides etc
-a, [--assoc], [--no-assoc] # Include any associations supplied in the input
-e, [--exclude=one two three] # Use with -a : Exclude association types. Any from [:assignment, :belongs_to, :has_one, :has_many]
-v, [--verbose], [--no-verbose] # Verbose logging
import CSV file for specified active record model
from datashift_spree.
thor datashift:import:csv -i, --input=products_export.csv -m, --model=Product
ERROR: "thor csv" was called with arguments ["-i,", "-m,"]
Usage: "thor datashift:import:csv -i, --input=INPUT -m, --model=MODEL"
thor datashift:import:csv -i products_export.csv
No value provided for required options '--model'
from datashift_spree.
it tells you the issue
No value provided for required options '--model'
from datashift_spree.
I think maybe reading around the basics of calling a rake or a thor task would help you. thor is nothing to do with me, it provides the task calling framework and defines how options are passed
you need to tell the task which DB model the csv file relates to
thor datashift:import:csv -i products_export.csv -m Product
from datashift_spree.
Well you previously said "Usage: "thor datashift:import:csv -i, --input=INPUT -m, --model=MODEL"
from datashift_spree.
I supplied you the thor help ...that's how the thor gem and most linux type command line apps decides to print out its help.
from datashift_spree.
Related Issues (20)
- Spree verison 3.0.4 HOT 7
- Feature: spree_related_products support HOT 2
- No Thor commands available HOT 5
- #<NoMethodError: undefined method `stock_location_name=' for #<Spree::Product:0x00000007ecd9a0>> HOT 2
- change count_on_hand in templates to stock_items
- master price is reset if using variants
- Product assigned to every parent taxonomy
- thor datashift_spree:load:products fails to render values from xls formulas HOT 1
- Paperclip not working for spree 3? HOT 6
- Error to upload images using datashift_spree:load:images HOT 3
- how to upload order and users HOT 1
- Products price get a trailing zero in import
- Failed to import supplier_id (spree_drop_ship) HOT 6
- uninitialized constant DataShift::CsvLoading (NameError) HOT 3
- can't attach images on product update HOT 5
- uninitialized constant DataShift::Spree HOT 1
- Failed to import Products. Error: undefined method `type_cast_from_database' HOT 10
- Variants are not updated with variant SKU
- how do i generate compatible csv files HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datashift_spree.