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

Documentation Usage Example needs altering. #12

Open
forikal-uk opened this issue Jun 2, 2018 · 0 comments
Open

Documentation Usage Example needs altering. #12

forikal-uk opened this issue Jun 2, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@forikal-uk
Copy link
Collaborator

forikal-uk commented Jun 2, 2018

Steps to recreate

See my notes as I follow the Usage example in the docs.

What occurs

I invoke the command using the format to grab a sample sheet suggested by the docs:

$ pwd
/Users/x/Documents/Projects/XmlAuthoring/gsheet-to-xml


$ php bin/gsheet-to-xml.php forikal:gsheet-to-xml https://docs.google.com/spreadsheets/d/1_SnGKyXjHnsdylZw_YYIQ8HuxYQI-hsvxYQpftGMjpM/edit#gid=311423522 --credentials=../../../../APIKeys/gsheet-to-xml-e5eaf708560f.json

                                                       
  Too many arguments, expected arguments "drive-url".  
                                                       

forikal:gsheet-to-xml [-c|--credentials [CREDENTIALS]] [--] <drive-url>

I get an error.

What is expected

The docs should be updated to explain the example command syntax is only when the command is run in the context of a console suite of commands.

and if run as a standalone command then it should look something like this:

try without the command name.

$ php bin/gsheet-to-xml.php  --credentials="../../../../APIKeys/gsheet-to-xml-e5eaf708560f.json" https://docs.google.com/spreadsheets/d/1_SnGKyXjHnsdylZw_YYIQ8HuxYQI-hsvxYQpftGMjpM/edit#gid=311423522
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Products>
  <Product>
    <Inventory src-sheet="DocumentationSampleSheet" src-sheet-url="https://docs.google.com/spreadsheets/d/1_SnGKyXjHnsdylZw_YYIQ8HuxYQI-hsvxYQpftGMjpM/edit#gid=311423522" src-tab="InventoryTab">
      <StockItem>
        <KNumberExists>true</KNumberExists>
        <KNumber>1111111</KNumber>
        <AdditionalKNumbers></AdditionalKNumbers>
        <AlternativeNumber></AlternativeNumber>
        <InventoryContainerID></InventoryContainerID>
        <Name>baz</Name>
        <Purposes>
          <Purpose>11</Purpose>
        </Purposes>
        <PurposeOther></PurposeOther>
        <InventoryQuantity>99</InventoryQuantity>
        <HandlingStatus></HandlingStatus>
        <SupplierRegistrationNumber></SupplierRegistrationNumber>
      </StockItem>
      <StockItem>
        <KNumberExists>false</KNumberExists>
        <KNumber></KNumber>
        <AdditionalKNumbers></AdditionalKNumbers>
        <AlternativeNumber>foo</AlternativeNumber>
        <InventoryContainerID></InventoryContainerID>
        <Name>bar</Name>
        <Purposes>
          <Purpose>2</Purpose>
        </Purposes>
        <PurposeOther></PurposeOther>
        <InventoryQuantity>99</InventoryQuantity>
        <HandlingStatus></HandlingStatus>
        <SupplierRegistrationNumber></SupplierRegistrationNumber>
      </StockItem>
    </Inventory>
  </Product>
</Products>

Notes

I guess all the commands are slowly getting a more consistent interface.

@forikal-uk forikal-uk added the bug Something isn't working label Jun 2, 2018
@forikal-uk forikal-uk changed the title Example invocation needs altering. Documentation Usage Example needs altering. Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant