seyoung
Posts: 5
Joined: Wed Feb 18, 2015 11:22 am

[Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 8:43 am

Hei guys,

I was following "Using a standard USB webcam" - https://www.raspberrypi.org/documentati ... /README.md.

When editing crontab script:

Code: Select all

* * * * * /home/pi/webcam.sh 2>&1
should be

Code: Select all

* * * * * /home/pi/webcam/webcam.sh 2>&1
I didn't know where to submit this so I post it here.

Thanks.

User avatar
joan
Posts: 14849
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 8:48 am

I think you are expected to fork the page on github, edit the page, and then submit the new page for approval.

To my mind a self defeating process as it's too much hassle (speaking for myself, that's why I never bother to point out mistakes).

DirkS
Posts: 10315
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 8:54 am

joan wrote:I think you are expected to fork the page on github, edit the page, and then submit the new page for approval.
Creating a pull request is optional. It's OK to just submit an issue for a problem.

DirkS
Posts: 10315
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 8:54 am

seyoung wrote:I didn't know where to submit this so I post it here.
Create an issue on the documentation Github page at https://github.com/raspberrypi/documentation

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 8:57 am

It doesn't necessarily seem to be a mistake/error. The instructions do not tell you whether to create the webcam.sh file in /home/pi/ or in /home/pi/webcam/. So you've assumed that you should have the webcam.sh file located in the webcam directory (I think I agree FWIW) and the author seems to assume that the webcam.sh script should be located in /home/pi/. The instructions could be more clear.

DirkS
Posts: 10315
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 9:04 am

ktb wrote:It doesn't necessarily seem to be a mistake/error. The instructions do not tell you whether to create the webcam.sh file in /home/pi/ or in /home/pi/webcam/.
BASH SCRIPT

You can write a Bash script which takes a picture with the webcam. The script below saves the images in the /home/pi/webcam directory, so create the webcam subdirectory first with:

mkdir webcam
To create a script, open up your editor of choice and write the following example code:
I would say that's actually *does* tell you to create it in the subdir.
They should have added a 'cd webcam' command though.

User avatar
joan
Posts: 14849
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 9:06 am

DirkS wrote:
joan wrote:I think you are expected to fork the page on github, edit the page, and then submit the new page for approval.
Creating a pull request is optional. It's OK to just submit an issue for a problem.
That's much easier, but it still requires users to be familiar with github. Perhaps the View/Edit this page on GitHub button could be replaced to a link to the issues button. However don't you still need a github account? These are all barriers.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 9:08 am

DirkS wrote:
ktb wrote:It doesn't necessarily seem to be a mistake/error. The instructions do not tell you whether to create the webcam.sh file in /home/pi/ or in /home/pi/webcam/.
BASH SCRIPT

You can write a Bash script which takes a picture with the webcam. The script below saves the images in the /home/pi/webcam directory, so create the webcam subdirectory first with:

mkdir webcam
To create a script, open up your editor of choice and write the following example code:
I would say that's actually *does* tell you to create it in the subdir.
They should have added a 'cd webcam' command though.
Well, then I suppose you have a more creative mind than I do.

DirkS
Posts: 10315
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 10:27 am

ktb wrote:Well, then I suppose you have a more creative mind than I do.
Reading the instructions again, I think you're right. It's just the images that go in the subdir, not the script.

seyoung
Posts: 5
Joined: Wed Feb 18, 2015 11:22 am

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 10:51 am

Oh, that's right. the webcam.sh is supposed to be above the dir webcam.
Sorry guys :cry:

User avatar
DougieLawson
Posts: 38552
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: [Submit]Tiny code error in one tutorial

Sun Apr 12, 2015 11:09 am

If the documentation isn't 100% clear then open an issue (or an issue and a pull request) to save someone else from the same confusion you've found. The RPF can always close the issue if they think it doesn't need a re-write.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “General discussion”