openzim / librechef

Sushi Chef script for importing sushi-chef-libretext content
MIT License
1 stars 0 forks source link

Clarify channel-id option #7

Closed rgaudin closed 3 years ago

rgaudin commented 4 years ago

Running the scraper requires a channel id but it is apparently not being used when uploading ; creting a new channel.

Please clarify what's going on, whether this is used and for what and remove it if not required

satyamtg commented 3 years ago

The channel-id option in the scraper, finally translates to "CHANNEL_SOUURCE_ID" in ricecooker. This is a unique string which is partially responsible for the unique channel ID (the one which appears in the kolibri studio URL). The actually Channel ID is a unique identifier for a channel and depends on two things -

  1. Channel source domain (in this case depends on the subject)
  2. Channel source ID, which is the --channel-id option in this scraper

So, given the subject is kept same, the scraper will upload to the same channel if you supply the same string in the --channel-id option . More can be read here - https://ricecooker.readthedocs.io/en/latest/developer/ids.html?highlight=source_id#channel-id

I think we shall rename the option to --channel-source-id instead. I used --channel-id as that precisely was the variable name which was hardcoded in the original version.

rgaudin commented 3 years ago

Agrees.