Deployed e26caba with MkDocs version: 0.17.2

This commit is contained in:
Christian Schabesberger 2018-04-08 21:57:31 +01:00
parent 9f653f52bb
commit e1ac4cd051
3 changed files with 53 additions and 2 deletions

View File

@ -66,6 +66,17 @@
</ul>
<li class="toctree-l2"><a href="#inclusion-criteria-for-services">Inclusion criteria for services</a></li>
<ul>
<li><a class="toctree-l3" href="#allowed-content">Allowed Content</a></li>
<li><a class="toctree-l3" href="#not-allowed-content">NOT allowed Content</a></li>
</ul>
</ul>
</li>
@ -139,6 +150,31 @@ Next import the cloned project into your <a href="https://www.jetbrains.com/help
and <a href="https://www.jetbrains.com/help/idea/performing-tests.html">run</a> it.
If all the checks are green you did everything right, and you are good to go to move on to the next chapter.
<img alt="tests passed on idea" src="../img/prepare_tests_passed.png" /></p>
<h1 id="inclusion-criteria-for-services">Inclusion criteria for services</h1>
<p>After creating you own service you will need to submit it to our <a href="https://github.com/teamnewpipe/newpipeextractor">NewPipeExtractor</a>
repository. However in order to include your changes you need to follow certain rules.</p>
<ol>
<li>Stick to our <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/.github/CONTRIBUTING.md#code-contribution">Code contribution guidelines</a></li>
<li>Do not send services that present content we <a href="#not-allowed-content">don't allow</a> on NewPipe.</li>
<li>You need to be willing to keep on maintaining your service after submission.</li>
<li>Be patient and do the requested changes when one of our maintainers rejects your code.</li>
</ol>
<h2 id="allowed-content">Allowed Content</h2>
<ul>
<li>Basically anything except <a href="#not-allowed-content">NOT allowed content</a>.</li>
<li>Any kind of porn/NSFW that is allowed according to the <a href="https://www.justice.gov/archive/opa/pr/2003/April/03_ag_266.htm">US Porn act</a>.</li>
<li>Advertisement (may be handled specially tho)</li>
</ul>
<h2 id="not-allowed-content">NOT allowed Content</h2>
<ul>
<li>NSFL</li>
<li>Porn that is not allowed according to <a href="https://www.justice.gov/archive/opa/pr/2003/April/03_ag_266.htm">US Porn act</a>.</li>
<li>Any form of violence</li>
<li>Child pornography</li>
<li>Media that harms others</li>
<li>Media that shows the violation of human rights</li>
<li>Copyright infringement/pirated media</li>
</ul>
</div>
</div>

View File

@ -161,5 +161,5 @@ This however is an addition to our <a href="https://teamnewpipe.github.io/NewPip
<!--
MkDocs version : 0.17.2
Build Date UTC : 2018-04-08 20:02:44
Build Date UTC : 2018-04-08 20:57:31
-->

View File

@ -17,7 +17,7 @@
},
{
"location": "/00_Prepare_everything/",
"text": "Prepare everything\n\n\nWelcome to the NewPipe tutorial. This tutorial will guide you through the process of creating your own NewPipeExtractor\nservice with which NewPipe will gain support for a dedicated streaming service like YouTube, Vimeo or SournCloud. Let's\ndive right. ;D\n\n\nSetup your dev environment\n\n\nFirst and foremost you need to meet certain conditions in order to write your own service.\n\n\nWhat you need to know\n\n\n\n\nBasic understanding of \ngit\n\n\nGood \nJava\n knowledge\n\n\nGood understanding of \nweb technology\n\n\nBasic understanding about \nunit testing\n and \nJUnit\n\n\nFlawless understanding of how to \ncontribute\n to the \nNewPipe project\n\n\n\n\nWhat you need to have\n\n\n\n\nA dev environment/ide that supports:\n\n\ngit\n\n\njava 8\n\n\ngradle\n\n\nI highly recomend \nIDEA Community\n since it has everything we need.\n\n\n\n\n\n\nA \ngithub\n account\n\n\nA loot of patience and excitement ;D\n\n\n\n\nAfter making sure all these conditions are provided fork the \nNewPipeExtractor\n,\nusing the \nfork button\n.\nThis way you have your own working repository. Now clone this repository into your local folder in which you want to work in.\nNext import the cloned project into your \nide\n\nand \nrun\n it.\nIf all the checks are green you did everything right, and you are good to go to move on to the next chapter.",
"text": "Prepare everything\n\n\nWelcome to the NewPipe tutorial. This tutorial will guide you through the process of creating your own NewPipeExtractor\nservice with which NewPipe will gain support for a dedicated streaming service like YouTube, Vimeo or SournCloud. Let's\ndive right. ;D\n\n\nSetup your dev environment\n\n\nFirst and foremost you need to meet certain conditions in order to write your own service.\n\n\nWhat you need to know\n\n\n\n\nBasic understanding of \ngit\n\n\nGood \nJava\n knowledge\n\n\nGood understanding of \nweb technology\n\n\nBasic understanding about \nunit testing\n and \nJUnit\n\n\nFlawless understanding of how to \ncontribute\n to the \nNewPipe project\n\n\n\n\nWhat you need to have\n\n\n\n\nA dev environment/ide that supports:\n\n\ngit\n\n\njava 8\n\n\ngradle\n\n\nI highly recomend \nIDEA Community\n since it has everything we need.\n\n\n\n\n\n\nA \ngithub\n account\n\n\nA loot of patience and excitement ;D\n\n\n\n\nAfter making sure all these conditions are provided fork the \nNewPipeExtractor\n,\nusing the \nfork button\n.\nThis way you have your own working repository. Now clone this repository into your local folder in which you want to work in.\nNext import the cloned project into your \nide\n\nand \nrun\n it.\nIf all the checks are green you did everything right, and you are good to go to move on to the next chapter.\n\n\n\nInclusion criteria for services\n\n\nAfter creating you own service you will need to submit it to our \nNewPipeExtractor\n\n repository. However in order to include your changes you need to follow certain rules.\n\n\n\n\nStick to our \nCode contribution guidelines\n\n\nDo not send services that present content we \ndon't allow\n on NewPipe.\n\n\nYou need to be willing to keep on maintaining your service after submission.\n\n\nBe patient and do the requested changes when one of our maintainers rejects your code.\n\n\n\n\nAllowed Content\n\n\n\n\nBasically anything except \nNOT allowed content\n.\n\n\nAny kind of porn/NSFW that is allowed according to the \nUS Porn act\n.\n\n\nAdvertisement (may be handled specially tho)\n\n\n\n\nNOT allowed Content\n\n\n\n\nNSFL\n\n\nPorn that is not allowed according to \nUS Porn act\n.\n\n\nAny form of violence\n\n\nChild pornography\n\n\nMedia that harms others\n\n\nMedia that shows the violation of human rights\n\n\nCopyright infringement/pirated media",
"title": "Prepare everything"
},
{
@ -40,6 +40,21 @@
"text": "A dev environment/ide that supports: git java 8 gradle I highly recomend IDEA Community since it has everything we need. A github account A loot of patience and excitement ;D After making sure all these conditions are provided fork the NewPipeExtractor ,\nusing the fork button .\nThis way you have your own working repository. Now clone this repository into your local folder in which you want to work in.\nNext import the cloned project into your ide \nand run it.\nIf all the checks are green you did everything right, and you are good to go to move on to the next chapter.",
"title": "What you need to have"
},
{
"location": "/00_Prepare_everything/#inclusion-criteria-for-services",
"text": "After creating you own service you will need to submit it to our NewPipeExtractor \n repository. However in order to include your changes you need to follow certain rules. Stick to our Code contribution guidelines Do not send services that present content we don't allow on NewPipe. You need to be willing to keep on maintaining your service after submission. Be patient and do the requested changes when one of our maintainers rejects your code.",
"title": "Inclusion criteria for services"
},
{
"location": "/00_Prepare_everything/#allowed-content",
"text": "Basically anything except NOT allowed content . Any kind of porn/NSFW that is allowed according to the US Porn act . Advertisement (may be handled specially tho)",
"title": "Allowed Content"
},
{
"location": "/00_Prepare_everything/#not-allowed-content",
"text": "NSFL Porn that is not allowed according to US Porn act . Any form of violence Child pornography Media that harms others Media that shows the violation of human rights Copyright infringement/pirated media",
"title": "NOT allowed Content"
},
{
"location": "/01_Concept_of_the_extractor/",
"text": "Concept of the Extractor\n\n\nCollector/Extractor pattern\n\n\nBefore we can start coding our own service we need to understand the basic concept of the extractor. There is a pattern\nyou will find all over the code. It is called the \nextractor/collector\n pattern. The idea behind this pattern is that\nthe \nextractor\n\nwould produce single peaces of data, and the collector would take it and form usable data for the front end out of it.\nThe collector also controls the parsing process, and takes care about error handling. So if the extractor fails at any\npoint the collector will decide whether it should continue parsing or not. This requires the extractor to be made out of\nmany small methods. One method for every data field the collector wants to have. The collectors are provided by NewPipe.\nYou need to take care of the extractors.\n\n\nUsage in the front end\n\n\nSo typical call for retrieving data from a website would look like this:\n\n\nInfo info;\ntry {\n // Create a new Extractor with a given context provided as parameter.\n Extractor extractor = new Extractor(some_meta_info);\n // Retrieves the data form extractor and builds info package.\n info = Info.getInfo(extractor);\n} catch(Exception e) {\n // handle errors when collector decided to break up extraction\n}\n\n\n\n\nTypical implementation of a single data extractor\n\n\nThe typical implementation of a single data extractor on the other hand would look like this:\n\n\nclass MyExtractor extends FutureExtractor {\n\n public MyExtractor(RequiredInfo requiredInfo, ForExtraction forExtraction) {\n super(requiredInfo, forExtraction);\n\n ...\n }\n\n @Override\n public void fetch() {\n // Actually fetch the page data here\n }\n\n @Override\n public String someDataFiled() \n throws ExtractionException { //The exception needs to be thrown if someting failed\n // get piece of information and return it\n }\n\n ... // More datafields\n}\n\n\n\n\nCollector/Extractor pattern for lists\n\n\nSometimes information can be represented as a list. In NewPipe a list is represented by a\n\nInfoItemsCollector\n.\nA InfoItemCollector will collect and assemble a list of \nInfoItem\n.\nFor each item that should be extracted a new Extractor must be created, and given to the InfoItemCollector via \ncommit()\n.\n\n\n\n\nIf you are implementing a list for your service you need to extend InfoItem containing the extracted information,\nand implement an \nInfoItemExtractor\n\nthat will return the data of one InfoItem.\n\n\nA common Implementation would look like this:\n\n\nprivate MyInfoItemCollector collectInfoItemsFromElement(Element e) {\n MyInfoItemCollector collector = new MyInfoItemCollector(getServiceId());\n\n for(final Element li : element.children()) {\n collector.commit(new InfoItemExtractor() {\n @Override\n public String getName() throws ParsingException {\n ...\n }\n\n @Override\n public String getUrl() throws ParsingException {\n ...\n }\n\n ...\n }\n return collector;\n}\n\n\n\n\n\nInfoItems encapsulated in pages\n\n\nWhen a streaming site shows a list of items it usually offers some additional information about that list, like it's title a thumbnail\nor its creator. Such info can be called \nlist header\n.\n\n\nWhen a website shows a long list of items it usually does not load the whole list, but only a part of it. In order to get more items you may have to click on a next page button, or scroll down. \n\n\nThis is why a list in NewPipe lists are chopped down into smaller lists called \nInfoItemsPage\ns. Each page has its own URL, and needs to be extracted separately.\n\n\nAdditional metainformation about the list such as it's title a thumbnail\nor its creator, and extracting multiple pages can be handled by a\n\nListExtractor\n,\nand it's \nListExtractor.InfoItemsPage\n.\n\n\nFor extracting list header information it behaves like a regular extractor. For handling \nInfoItemsPages\n it adds methods\nsuch as:\n\n\n\n\ngetInitialPage()\n\n which will return the first page of InfoItems.\n\n\ngetNextPageUrl()\n\n If a second Page of InfoItems is available this will return the URL pointing to them.\n\n\ngetPage()\n\n returns a ListExtractor.InfoItemsPage by its URL which was retrieved by the \ngetNextPageUrl()\n method of the previous page.\n\n\n\n\nThe reason why the first page is handled speciall is because many Websites such as Youtube will load the first page of\nitems like a regular webpage, but all the others as AJAX request.",