From fd9f7296f31d5e3a5f1d20232563b362455c8b64 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 1 Mar 2019 10:02:33 +0100 Subject: [PATCH] Deployed ccf8787 with MkDocs version: 1.0.4 --- 00_Prepare_everything/index.html | 120 +++++++------- 01_Concept_of_the_extractor/index.html | 69 ++++---- 02_Concept_of_LinkHandler/index.html | 63 +++---- 03_Implement_a_service/index.html | 115 +++++++------ 04_Run_changes_in_App/index.html | 70 ++++---- 05_releasing/index.html | 221 +++++++++++++------------ 06_documentation/index.html | 68 ++++---- 404.html | 14 +- index.html | 36 ++-- search.html | 14 +- search/search_index.json | 2 +- sitemap.xml | 16 +- sitemap.xml.gz | Bin 200 -> 200 bytes 13 files changed, 402 insertions(+), 406 deletions(-) diff --git a/00_Prepare_everything/index.html b/00_Prepare_everything/index.html index 5375034..481e9c2 100644 --- a/00_Prepare_everything/index.html +++ b/00_Prepare_everything/index.html @@ -8,7 +8,7 @@ - Prepare everything - NewPipe Documentation + Before You Start - NewPipe Documentation @@ -20,7 +20,7 @@ @@ -53,30 +53,30 @@
  • - Welcome to the NewPipe Documentation. + Welcome to NewPipe.
  • - Prepare everything + Before You Start @@ -136,7 +136,7 @@ -
  • Prepare everything
  • +
  • Before You Start
  • @@ -146,83 +146,79 @@
    -

    Prepare everything

    -

    Welcome to the NewPipeExtractor documentation. This tutorial will guide you through the process of creating your own Extractor -service with which NewPipe will gain support for a dedicated streaming service like YouTube, Vimeo or SoundCloud. +

    Before You Start

    +

    These documents will guide you through the process of creating your own Extractor +service of which will enable NewPipe to access additional streaming services, such as the currently supported YouTube and SoundCloud. The whole documentation consists of this page, which explains the general concept of the NewPipeExtractor, as well as our Jdoc setup.

    -

    IMPORTANT!!! this is likely to be the worst documentation you have ever read, so do not hesitate to +

    IMPORTANT!!! This is likely to be the worst documentation you have ever read, so do not hesitate to report if you find any spelling errors, incomplete parts or you simply don't understand something. We are an open community and are open for everyone to help :)

    -

    Setup your dev environment

    -

    First and foremost you need to meet certain conditions in order to write your own service.

    -

    What you need to know

    +

    Setting Up Your Dev Environment

    +

    First and foremost, you need to meet the following conditions in order to write your own service.

    +

    What You Need to Know:

    -

    What you need to have

    +

    Tools/Programs You Will Need:

    -

    After making sure all these conditions are provided fork the NewPipeExtractor, +

    After making sure all these conditions are provided, fork the NewPipeExtractor using the fork button. -This way you have your own working repository. Now clone this repository into your local folder in which you want to work in. -Next import the cloned project into your IDE -and run it. -If all the checks are green you did everything right, and you are good to go to move on to the next chapter.

    +This is so you have a personal repository to develop on. Next, clone this repository into your local folder in which you want to work in. +Then, import the cloned project into your IDE +and run it. +If all the checks are green, you did everything right! You can proceed to the next chapter.

    Importing the NewPipe Extractor in IntelliJ IDEA

    -

    If you use IntelliJ IDEA you might want to know how to import the NewPipe extractor painlessly. This is what you want to do.

    +

    If you use IntelliJ IDEA, you should know the easy way of importing the NewPipe extractor. If you don't, here's how to do it:

    1. git clone the extractor onto your computer locally.
    2. -
    3. Start IntelliJ Idea, and click on Import Project.
    4. +
    5. Start IntelliJ Idea and click Import Project.
    6. Select the root directory of the NewPipe Extractor
    7. -
    8. Now it's important to select "Import Project form external Model" and then choose Gradle. +
    9. Select "Import Project from external Model" and then choose Gradle. import from gradle image
    10. -
    11. In the next window make sure "Use grale 'wrapper' task configuration" is selected. +
    12. In the next window, select "Use gradle 'wrapper' task configuration". use gradle 'wrapper' task configuration checkbox
    -

    Running test in Android Studio/IntelliJ IDEA

    -

    Go to run > edit configurations > add new configuration and select "Gradle". -As Gradle Project, select NewPipeExtractor. As task add "test". Now save and you should be able to run.

    +

    Running "test" in Android Studio/IntelliJ IDEA

    +

    Go to Run > Edit Configurations > Add New Configuration and select "Gradle". +As Gradle Project, select NewPipeExtractor. As a task, add "test". Now save and you should be able to run.

    tests passed on idea

    -

    Inclusion criteria for services

    -

    After creating you own service you will need to submit it to our NewPipeExtractor - repository. However in order to include your changes you need to follow these rules:

    +

    Inclusion Criteria for Services

    +

    After creating you own service, you will need to submit it to our NewPipeExtractor + repository. However, in order to include your changes, you need to follow these rules:

    1. Stick to our Code contribution guidelines
    2. -
    3. Do not send services that present content we don't allow on NewPipe.
    4. -
    5. You need to be willing to keep on maintaining your service after submission.
    6. -
    7. Be patient and do the requested changes when one of our maintainers rejects your code.
    8. +
    9. Do not send services that present content we don't allow on NewPipe.
    10. +
    11. You must be willing to maintain your service after submission.
    12. +
    13. Be patient and make the requested changes when one of our maintainers rejects your code.
    -

    Allowed Content

    +

    Content That is Permitted:

      -
    • 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 though)
    • +
    • Any content that is not in the list of prohibited content.
    • +
    • Any kind of pornography or NSFW content that does not violate US law.
    • +
    • Advertising, which may need to be approved beforehand.
    -

    NOT allowed Content

    +

    Content That is NOT Permitted:

      -
    • NSFL (Not Safe For Life)
    • -
    • Porn that is not allowed according to US Porn act.
    • -
    • Any form of violence
    • -
    • Child pornography
    • -
    • Media that harms others
    • -
    • Media that violates human rights
    • -
    • Copyright infringement/pirated media
    • +
    • Content that is considered NSFL (Not Safe For Life)
    • +
    • Content that is prohibited by US federal law (Sexualization of minors, any form of violence, violations of human rights, etc).
    • +
    • Copyrighted media, without the consent of the copyright holder/publisher.
    @@ -234,7 +230,7 @@ As Gradle Project, select NewPipeExtractor. As task add "test". Now save and you Next - Previous + Previous
    diff --git a/01_Concept_of_the_extractor/index.html b/01_Concept_of_the_extractor/index.html index a00c078..fc37bd0 100644 --- a/01_Concept_of_the_extractor/index.html +++ b/01_Concept_of_the_extractor/index.html @@ -53,12 +53,12 @@
  • - Welcome to the NewPipe Documentation. + Welcome to NewPipe.
  • - Prepare everything + Before You Start
  • @@ -70,11 +70,11 @@ @@ -84,27 +84,27 @@
  • - Concept of LinkHandler + Concept of the LinkHandler
  • - Implement a service + Implementing a Service
  • - Run the changes in the App + Testing Your Changes in the App
  • - Releasing a new NewPipe version + Releasing a New NewPipe Version
  • - Documentation + About This Documentation
  • @@ -140,17 +140,17 @@

    Concept of the Extractor

    -

    Collector/Extractor pattern

    -

    Before we can start coding our own service we need to understand the basic concept of the extractor. There is a pattern -you will find all over the code. It is called the extractor/collector pattern. The idea behind it is that +

    The Collector/Extractor Pattern

    +

    Before you start coding your own service, you need to understand the basic concept of the extractor itself. There is a pattern +you will find all over the code, called the extractor/collector pattern. The idea behind it is that the extractor -would produce single pieces of data, and the collector would collect it to form usable data for the front end. -The collector also controls the parsing process, and takes care of error handling. So if the extractor fails at any +would produce fragments of data, and the collector would collect them and assemble that data into a readable format for the front end. +The collector also controls the parsing process, and takes care of error handling. So, if the extractor fails at any point, the collector will decide whether or not it should continue parsing. This requires the extractor to be made out of -many small methods. One method for every data field the collector wants to have. The collectors are provided by NewPipe. +multiple methods, one method for every data field the collector wants to have. The collectors are provided by NewPipe. You need to take care of the extractors.

    -

    Usage in the front end

    -

    So typical call for retrieving data from a website would look like this:

    +

    Usage in the Front End

    +

    A typical call for retrieving data from a website would look like this:

    Info info;
     try {
         // Create a new Extractor with a given context provided as parameter.
    @@ -162,8 +162,8 @@ try {
     }
     
    -

    Typical implementation of a single data extractor

    -

    The typical implementation of a single data extractor on the other hand would look like this:

    +

    Typical Implementation of a Single Data Extractor

    +

    The typical implementation of a single data extractor, on the other hand, would look like this:

    class MyExtractor extends FutureExtractor {
     
         public MyExtractor(RequiredInfo requiredInfo, ForExtraction forExtraction) {
    @@ -187,16 +187,16 @@ try {
     }
     
    -

    Collector/Extractor pattern for lists

    -

    Sometimes information can be represented as a list. In NewPipe a list is represented by a +

    Collector/Extractor Pattern for Lists

    +

    Information can be represented as a list. In NewPipe, a list is represented by a InfoItemsCollector. A InfoItemCollector will collect and assemble a list of InfoItem. -For each item that should be extracted a new Extractor must be created, and given to the InfoItemCollector via commit().

    +For each item that should be extracted, a new Extractor must be created, and given to the InfoItemCollector via commit().

    InfoItemsCollector_objectdiagram.svg

    -

    If you are implementing a list for your service you need to extend InfoItem containing the extracted information, -and implement an InfoItemExtractor +

    If you are implementing a list for your service you need to extend InfoItem containing the extracted information +and implement an InfoItemExtractor, that will return the data of one InfoItem.

    -

    A common Implementation would look like this:

    +

    A common implementation would look like this:

    private MyInfoItemCollector collectInfoItemsFromElement(Element e) {
         MyInfoItemCollector collector = new MyInfoItemCollector(getServiceId());
     
    @@ -219,15 +219,14 @@ that will return the data of one InfoItem.

    -

    InfoItems encapsulated in pages

    -

    When a streaming site shows a list of items it usually offers some additional information about that list, like it's title, a thumbnail, -or its creator. Such info can be called list header.

    +

    InfoItems Encapsulated in Pages

    +

    When a streaming site shows a list of items, it usually offers some additional information about that list like its title, a thumbnail, +and its creator. Such info can be called list header.

    When 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.

    This is why a list in NewPipe lists are chopped down into smaller lists called InfoItemsPages. Each page has its own URL, and needs to be extracted separately.

    -

    Additional metainformation about the list such as its title a thumbnail -or its creator, and extracting multiple pages can be handled by a +

    Additional metadata about the list and extracting multiple pages can be handled by a ListExtractor, -and it's ListExtractor.InfoItemsPage.

    +and its ListExtractor.InfoItemsPage.

    For extracting list header information it behaves like a regular extractor. For handling InfoItemsPages it adds methods such as:

    The reason why the first page is handled special is because many Websites such as YouTube will load the first page of -items like a regular webpage, but all the others as an AJAX request.

    +items like a regular web page, but all the others as an AJAX request.

    @@ -247,10 +246,10 @@ items like a regular webpage, but all the others as an AJAX request.

    diff --git a/02_Concept_of_LinkHandler/index.html b/02_Concept_of_LinkHandler/index.html index b382924..7e7b037 100644 --- a/02_Concept_of_LinkHandler/index.html +++ b/02_Concept_of_LinkHandler/index.html @@ -8,7 +8,7 @@ - Concept of LinkHandler - NewPipe Documentation + Concept of the LinkHandler - NewPipe Documentation @@ -20,7 +20,7 @@ @@ -53,12 +53,12 @@
  • - Welcome to the NewPipe Documentation. + Welcome to NewPipe.
  • - Prepare everything + Before You Start
  • @@ -68,10 +68,10 @@
  • - Concept of LinkHandler + Concept of the LinkHandler