Please provide an instruction for using dash-docset for dummies (like me)
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-builderrepository - I've tried to export the path
dash-docset-builder/dash-docsetfrom 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 🙏🏽
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 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-docsetBut 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
I've managed to run the
dash-docsetcommand with./dash-docsetbut 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 └── testsdash-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.
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
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 ❤️
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/binin 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? 😂️