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

Rephrase image pipeline documentation #4034

Closed
samLozier opened this issue Sep 24, 2019 · 0 comments · Fixed by #4252
Closed

Rephrase image pipeline documentation #4034

samLozier opened this issue Sep 24, 2019 · 0 comments · Fixed by #4252

Comments

@samLozier
Copy link

Summary

Clarity of the pipeline documentation could be improved by more clearly calling out the steps that need to be taken to enable a custom pipeline. I was encouraged to issue this request in my Reddit thread where I was struggling to resolve this issue: thread.

Existing documentation:
https://docs.scrapy.org/en/latest/topics/media-pipeline.html

To enable your media pipeline you must first add it to your project item pipeline setting.
For Images Pipeline, use:
ITEM_PIPELINES = {'scrapy.pipelines.images.ImagesPipeline': 1}

To me, it reads like "to use this custom pipeline, just add this line to your settings.py file". If the doc maintainers wanted to be more clear, it could have read "add this line to your item pipeline settings and replace these fields with the appropriate fields from your project", like I do below:

ITEM_PIPELINES = {f'{your_scrapername}.pipelines.{your_item_pipeline_class_name}: 1*}*

Motivation

Improve clarity/readability, help newer users get up to speed more quickly.

Describe alternatives you've considered

on reddit /u/Gallaecio/ suggested the following as an alternative:

I think you might have a point. I bet something as simple as changing
scrapy.pipelines.images.ImagesPipeline to something like
my_project.pipelines.MyImagesPipeline would make things more obvious.

Either solution would help to show that 'scrapy' references the specific project you're working on, and 'ImagesPipeline' is the custom class you setup for your project.

Additional context

In my attempts to resolve my own problem I found many threads going back years on stack overflow and reddit that highlighted the same issue. I believe that the change would help new users avoid a potentially frustrating issue.

kmike pushed a commit that referenced this issue Dec 29, 2019
* #4034 Clarify documentation for image and file pipelines

* #4034 Clarify documentation for file pipeline

* #4034 Simplify documentation for pipeline

* #4034 Simplify documentation for pipeline

* #4034 Clarify documentation for image and file pipelines

* #4034 Clarify documentation for file pipeline

* #4034 Simplify documentation for pipeline

* #4034 Simplify documentation for pipeline

* #4034 Revert image, file pipeline docs. Enhance custom media pipeline docs.

* #4034 rebase master

* #4034 Clarify documentation for image and file pipelines

* #4034 Clarify documentation for file pipeline

* #4034 Simplify documentation for pipeline

* #4034 Simplify documentation for pipeline

* #4034 Clarify documentation for image and file pipelines

* #4034 Clarify documentation for file pipeline

* #4034 Simplify documentation for pipeline

* #4034 Simplify documentation for pipeline

* #4034 Revert image, file pipeline docs. Enhance custom media pipeline docs.

* #4034 rebase master

* Rebase master

* Add class to media pipeline docs

Co-Authored-By: elacuesta <elacuesta@users.noreply.github.com>

Co-authored-by: elacuesta <elacuesta@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants