Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting by HeaderColumns #14

Open
denislutz opened this issue Feb 6, 2016 · 7 comments
Open

Formatting by HeaderColumns #14

denislutz opened this issue Feb 6, 2016 · 7 comments

Comments

@denislutz
Copy link

Hi,

thanks for your great work.

I think what would tremendously simplify impex work is proper formatting by columns, I usually do it with sublime text but it would be great to have it as standart part of your editor.

So here is how it would work: you just align all by the header column. But this happens for EACH TYPE. If a type is having a specifically long header it does not affect the other types inside impex. This is what you can see in the example below.

#INSERT PRODUCTS
INSERT_UPDATE Product ; code[unique=true]  ; name[lang=en] ; description[lang=en] ; manufacturerName  ; ean   ; catalogVersion(catalog(id), version) ; unit(code)[default=pieces] ;
                      ; product_identifier ; Product Name  ; Description          ; Manufacturer Name ; 12345 ; sampleProductCatalog:Staged          ; pieces                     ; approved ; us-vat-full

#PRICE
INSERT_UPDATE PriceRow ; product(code,catalogversion(catalog(id),version))[unique=true] ; currency(isocode)[unique=true] ; unit(code)
                       ; product_identifier:sampleProductCatalog:Staged                 ; US                             ; pieces     ;

Finally if you have this feature, I would like to be able to select all impex files in a project and realign them that way in one bunch. But this is nice to have.

@eljoujat
Copy link
Owner

eljoujat commented Feb 6, 2016

👍

@eljoujat
Copy link
Owner

eljoujat commented Feb 6, 2016

Hi,

YES !!
it's with no doubt a very useful feature, and a must have ,
i will work on it ASAP, and try to make it on the next release .

Thanks

@denislutz
Copy link
Author

Excellent, thank you!

@denislutz
Copy link
Author

Further more, you could split up the macros area by the '=' sign like this


$catalogVersion     = catalogVersion(catalog(id[default = $productCatalog]),version[default = 'Staged'])[unique = true,default = $productCatalog:Staged]
$supercategories    = supercategories(code, $catalogVersion)
$baseProduct        = baseProduct(code,$catalogVersion)
$approved           = approvalstatus(code)[default = 'approved']

@denislutz denislutz changed the title Feature Suggestion Formatting by HeaderColumns Formatting by HeaderColumns Feb 15, 2016
@denislutz
Copy link
Author

Just FYI: I took a look at this plugin https://code.google.com/archive/p/csvedit/downloads which provide decent csv features, may be you can find something useful there.

What I definitely like here is how the csv noise is reduced by creating a pure columns view without modifications on the text level and only a value change in some cell will insert a version change in impex.

@eljoujat
Copy link
Owner

Great !
I downloaded the code source i found some interesting features that could help.
Thanks

@eljoujat
Copy link
Owner

eljoujat commented Apr 5, 2016

A new version with formatting feature is released

@eljoujat eljoujat added the Format label Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants