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

Please provide an instruction for using dash-docset for dummies (like me) #23

Open
proelf98 opened this issue Oct 26, 2022 · 6 comments

Comments

@proelf98
Copy link

proelf98 commented Oct 26, 2022

I am using ZSH on a MacBook. I've installed composer with Homebrew.
I've run the following commands.

mkdir my-doc
cd my-doc
composer require godbout/dash-docset-builder
dash-docset new my-pretty-docset

But I've got the following message:
zsh: command not found: dash-docset

I've tried to troubleshoot the error.

  • I've cloned the dash-docset-builder repository
  • I've tried to export the path dash-docset-builder/dash-docset from the repository to my .zshrc, but it still couldn't find the command
  • I've tried to run

Please provide an instruction for dummies like 🙏🏽

@proelf98
Copy link
Author

proelf98 commented Oct 26, 2022

I've managed to run the dash-docset command with ./dash-docset but now I've got the following error message:

├── build-doc 👈🏼 Folder where I've executed the docset from s. below
│   ├── composer.json 👈🏼 was created by `composer require godbout/dash-docset-builder`
│   ├── composer.lock
│   └── vendor
└── dash-docset-builder 👈🏼 Repository 
    ├── LICENSE.md
    ├── README.md
    ├── app
    ├── bootstrap
    ├── composer.json
    ├── composer.lock
    ├── config
    ├── dash-docset 👈🏼 This is what i am trying to execute 
    ├── database
    ├── phpunit.xml.dist
    └── tests
dash-docset-builder on  master via 🐘 v8.1.11
❯ ../dash-docset-builder/dash-docset new my-pretty-docset
PHP Warning:  require(/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php): Failed to open stream: No such file or directory in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18

Warning: require(/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php): Failed to open stream: No such file or directory in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18
PHP Fatal error:  Uncaught Error: Failed opening required '/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.1.11/share/php/pear') in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset:18
Stack trace:
#0 {main}
  thrown in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18

Fatal error: Uncaught Error: Failed opening required '/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.1.11/share/php/pear') in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset:18
Stack trace:
#0 {main}
  thrown in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18```

@godbout
Copy link
Owner

godbout commented Oct 27, 2022

yeah. so because this is built in PHP and requires a bit of PHP knowledge to edit the Docset class, i expect people to at least be familiar with PHP and composer. see below:

I am using ZSH on a MacBook. I've installed composer with Homebrew. I've run the following commands.

mkdir my-doc
cd my-doc
composer require godbout/dash-docset-builder
dash-docset new my-pretty-docset

But I've got the following message: zsh: command not found: dash-docset

the issue you have is that ./vendor/bin is not in your PATH. usually PHP developers have it in their path, as this is the composer bin directory for independent projects.

in your case you then need ./vendor/bin/dash-docset new my-pretty-docset

@godbout
Copy link
Owner

godbout commented Oct 27, 2022

I've managed to run the dash-docset command with ./dash-docset but now I've got the following error message:

├── build-doc 👈🏼 Folder where I've executed the docset from s. below
│   ├── composer.json 👈🏼 was created by `composer require godbout/dash-docset-builder`
│   ├── composer.lock
│   └── vendor
└── dash-docset-builder 👈🏼 Repository 
    ├── LICENSE.md
    ├── README.md
    ├── app
    ├── bootstrap
    ├── composer.json
    ├── composer.lock
    ├── config
    ├── dash-docset 👈🏼 This is what i am trying to execute 
    ├── database
    ├── phpunit.xml.dist
    └── tests
dash-docset-builder on  master via 🐘 v8.1.11
❯ ../dash-docset-builder/dash-docset new my-pretty-docset
PHP Warning:  require(/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php): Failed to open stream: No such file or directory in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18

Warning: require(/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php): Failed to open stream: No such file or directory in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18
PHP Fatal error:  Uncaught Error: Failed opening required '/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.1.11/share/php/pear') in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset:18
Stack trace:
#0 {main}
 thrown in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18

Fatal error: Uncaught Error: Failed opening required '/Users/noahk/Documents/netzbros/dash-docset-builder/../../autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.1.11/share/php/pear') in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset:18
Stack trace:
#0 {main}
 thrown in /Users/noahk/Documents/netzbros/dash-docset-builder/dash-docset on line 18```

yeah so all that is because you've cloned the repo, rather than installing/using the binary. you can ignore all that stuff. see my comment above.

@godbout
Copy link
Owner

godbout commented Oct 27, 2022

Please provide an instruction for dummies like 🙏🏽

somehow i don't want to 😂️😂️😂️
let me be more precise: the configuration to generate your Docset is done through editing a PHP class. so users need to know PHP. the instructions in the README will be clear to someone who has experience with PHP and composer. if i detail every step so that people who don't know PHP/composer use this binary, i'll have to deal with a lot of issues/questions regarding the configuration, which most probably will be about PHP. and i have no interest dealing with this :p

@proelf98
Copy link
Author

somehow i don't want to 😂️😂️😂️

damn hahaha it was worth a try🤣. But still thanks for the reply and I understand now better where my problems lies ... not knowing PHP 😂

Well, but it was a good note that I would need to ./vendor/bin in my export. Thanks ❤️

@godbout
Copy link
Owner

godbout commented Oct 28, 2022

damn hahaha it was worth a try🤣. But still thanks for the reply and I understand now better where my problems lies ... not knowing PHP 😂

i think there's some other tools that may use some sort of json or yaml config. maybe worth a look?
tbh the PHP class generated by dash-docset-builder is not complicated, and it's just for "configuration". you can check the examples in the README. here's one not too complex: https://github.com/godbout/ploi-api-dash-docset/blob/master/app/Docsets/Ploi.php

all you have to do is define what CSS Selectors to apply to grab the info you want.

Well, but it was a good note that I would need to ./vendor/bin in my export. Thanks ❤️

i'll add this to the README. i think somehow you're right, it's better to have it. although if someone needs it, they'll probably have issue later down the road. but i guess not my problem? 😂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants