diff --git a/00_Prepare_everything/index.html b/00_Prepare_everything/index.html index 0b38cbc..5fa3400 100644 --- a/00_Prepare_everything/index.html +++ b/00_Prepare_everything/index.html @@ -31,7 +31,6 @@ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -130,6 +129,7 @@
+
@@ -239,17 +239,18 @@ As Gradle Project, select NewPipeExtractor. As a task, add "test". Now save and
- - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
+ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -130,6 +129,7 @@
+
@@ -145,7 +145,7 @@ multiple methods, one method for every data field the collector wants to have. T You need to take care of the extractors.

Usage in the Front End

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

-
Info info;
+
Info info;
 try {
     // Create a new Extractor with a given context provided as parameter.
     Extractor extractor = new Extractor(some_meta_info);
@@ -155,10 +155,9 @@ try {
     // handle errors when collector decided to break up extraction
 }
 
-

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 {
+
class MyExtractor extends FutureExtractor {
 
     public MyExtractor(RequiredInfo requiredInfo, ForExtraction forExtraction) {
         super(requiredInfo, forExtraction);
@@ -180,7 +179,6 @@ try {
     ...                                 // More datafields
 }
 
-

Collector/Extractor Pattern for Lists

Information can be represented as a list. In NewPipe, a list is represented by an InfoItemsCollector. @@ -213,7 +211,6 @@ that will be able to retrieve data for one and only one InfoItem. This extractor }

-

ListExtractor

There is more to know about lists:

    @@ -313,17 +310,18 @@ items like a regular web page, but all the others as an AJAX request.

- - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
+ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -130,6 +129,7 @@
+
@@ -155,13 +155,12 @@ one unique ID that represents it, like this example:

Usage

The typical usage for obtaining a LinkHandler would look like this:

-
LinkHandlerFactory myLinkHandlerFactory = new MyStreamLinkHandlerFactory();
+
LinkHandlerFactory myLinkHandlerFactory = new MyStreamLinkHandlerFactory();
 LinkHandler myVideo = myLinkHandlerFactory.fromUrl("https://my.service.com/the_video");
 
-

Implementation

In order to use LinkHandler for your service, you must override the appropriate LinkHandlerFactory. eg:

-
class MyStreamLinkHandlerFactory extends LinkHandlerFactory {
+
class MyStreamLinkHandlerFactory extends LinkHandlerFactory {
 
     @Override
     public String getId(String url) throws ParsingException {
@@ -179,7 +178,6 @@ LinkHandler myVideo = myLinkHandlerFactory.fromUrl("https://my.service.com/
     }
 }
 
-

ListLinkHandler and SearchQueryHandler

List based resources, like channels and playlists, can be sorted and filtered. Therefore these type of resources don't just use a LinkHandler, but a class called @@ -234,17 +232,18 @@ and getId() when overriding - - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +

+ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -138,6 +137,7 @@
+
@@ -259,7 +259,7 @@ through the KioskList.KioskExtractorFactory.

An example implementation of the getKioskList() could look like this:

-
@Override
+
@Override
 public KioskList getKioskList() throws ExtractionException {
     KioskList list = new KioskList(getServiceId());
 
@@ -280,7 +280,6 @@ public KioskList getKioskList() throws ExtractionException {
 }
 
 
-

Parts Required to be Implemented:

- - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
+ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -132,6 +131,7 @@
+
@@ -161,7 +161,6 @@ sometimes have to adjust the udev rules in order to } } -

includeBuild should have the relative path as argument. ../NewPipeExtractor means one folder up in hierarchy, and the folder is exactly named NewPipeExtractor. If that's not the case, edit this part.

Using JitPack

@@ -219,17 +218,18 @@ click on that little paper symbol next to the GET IT button. If it'
- - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
+ - @@ -45,7 +44,7 @@ NewPipe Documentation
- +
@@ -102,15 +101,21 @@ +
  • Extractor releases +
  • Version Nomenclature
  • Release Notes + +
  • +
  • Publish on F-Droid
  • @@ -152,6 +157,7 @@
    +
    @@ -159,82 +165,120 @@

    This site is meant for those who want to maintain NewPipe, or just want to know how releasing works.

    one does not simply push to master

    Differences Between Regular and Hotfix Releases

    -

    NewPipe is a web crawler. That means it does not use a web API, but instead tries to scrape the data from the website, -this however has the disadvantage of the app to break instantly when YouTube changes something. -We do not know when this happen. Therefore, maintainers need to act quickly when it happens, and reduce our downtime as +

    Depending on the service, NewPipe Extractor uses web crawling or internal APIs. +Both are subject to arbitrary changes by the service providers, like YouTube, SoundCloud or PeerTube. +When they change something, NewPipe Extractor and thus NewPipe break instantly. +Therefore, maintainers need to act quickly when it happens, and reduce our downtime as much as possible. The entire release cycle is therefore designed around this issue.

    There is a difference between a release that introduces new features -and a release that fixes an issue that occurred because YouTube, or some other service, changed their website (typically called a shutdown). -Lets have a look at the characteristics of a regular release, and then the characteristics of a hotfix release.

    +and a release that fixes an issue that occurred because YouTube, or some other service, +changed their website (typically called a shutdown). +Let's have a look at the characteristics of a regular release, +and then the characteristics of a hotfix release.

    Regular Releases

    -

    Regular releases are normal releases like they are done in any other app. Releases are always stored on master branch. The latest commit on -master is always equal to the currently released version. No development is done on master. This ensures that we always have one -branch with a stable/releasable version.

    +

    Regular releases are normal releases as they are done in any other app. +Releases are always stored and tagged on master branch. The latest commit on +master is always equal to the currently released version. No development is done on master. +This ensures that we always have one branch with a stable/releasable version.

    Feature Branching

    -

    When developing, the dev branch is used. Pushing to dev directly, however, is not allowed, since QA and testing should be done first before adding something to it. -This ensures that the dev version works as stable a possible. -In order to change something on the app, one may want to fork the dev branch and develop the changes in their own branch (this is called feature branching).

    +

    The dev branch is used for development. Pushing to dev directly, however, is not allowed, +since QA and testing should be done before adding something to the branch. +This ensures that the development version works as stable a possible. +In order to change something on the app, one may want to fork the dev branch +and develop the changes in their own branch (this is called feature branching).

    feature_branching

    -

    Make sure that both the dev branches, as well as the master branches of the extractor and the frontend, are compatible with each other. -If a change is done on the API to the extractor, make sure that frontend is compatible, or changed to become compatible, with these changes. If the PR that should make the frontend compatible -again can not be merged, please do not merge the corresponding PR on the extractor either. This should make sure that any developer can run his changes -on the fronted at any time.

    +

    Make sure that both the dev branches, as well as the master branches of the extractor +and the frontend, are compatible with each other. +If the extractor's API is modified, make sure that frontend is compatible, +or changed to become compatible, with these changes. +If the PR that should make the frontend compatible +again can not be merged, please do not merge the corresponding PR on the extractor either. +This should make sure that any developer can run his changes on the fronted at any time.

    Merging Features/Bugfixes

    -

    After finishing a feature, one should open up a Pull Request to the dev branch. From here, a maintainer can do Code review and Quality Assurance (QA). -If you are a maintainer, please take care about the code architecture so corrosion or code shifting can be prevented. Please also prioritize code quality over functionality. -In short: cool function but bad code = no merge. Focus on leaving the code as clean as possible.

    +

    After finishing a feature, one should open up a Pull Request to the dev branch. +From here, a maintainer can do Code review and Quality Assurance (QA). +If you are a maintainer, please take care about the code architecture +so corrosion or code shifting can be prevented. +Please also prioritize code quality over functionality.
    +In short: cool function but bad code = no merge. Focus on keeping the code as clean as possible.

    merge_feature_into_dev

    -

    You, as a maintainer, should build the app and put the signed APK into the description of that new pull request. This way, other people can test the feature/bugfix and help with QA. You may not need to do this every time. It is enough to do it on bigger pull requests.

    -

    After the maintainer merges the new feature into the dev branch, he should add the title of the pull request or a summary of the changes into the release notes.

    +

    An APK for testing is provided by GitHub Actions for every PR. +Please ensure that this APK is tested thoroughly to prevent introducing regressions. +Testing features needs to take into account that NewPipe is used on a brought variety +of Android versions from KitKat to the latest, on custom ROMs like Lineage OS, CalyxOS or /e/ +and different devices like phones, tablets and TVs.

    +

    Sometimes, the content of a PR changes over the time. +Modify the PR's title if it does not represent the introduced changes anymore. +After a maintainer merged the new feature into the dev branch, +they should add the PR's title or a summary of the changes into the release notes.

    Creating a New Release

    -

    Once there are enough features together, and the maintainers believe that NewPipe is ready for a new release, they should create a new release. -Be aware of the rule that a release should never be done on a Friday. For NewPipe, this means: Don't do a release if you don't have time for it!!! -Below is a list of things you will want to do:

    +

    Once there are enough changes, and the maintainers believe that NewPipe is ready +for a new version, they should prepare a new release.
    +Be aware of the rule that a release should never be done on a Friday. +For NewPipe, this means: Don't do a release if you don't have time for it!!!

    +

    By following the steps listed below, you can publish a stable version of NewPipe:

      -
    1. Fork the dev branch into a new release_x.y.z branch.
    2. -
    3. Increase the version number
    4. -
    5. Merge Weblate changes from the dev branch at https://hosted.weblate.org/git/newpipe/strings/.
    6. -
    7. Copy the release notes from the GitHub version draft into the corresponding fastlane file (see release notes).
    8. -
    9. Open up a pull request form the new release_x.y.z branch into the master branch.
    10. -
    11. Create an issue pointing to the new pull request. The reason for opening an issue is that from my perception, people read issues more than pull requests. Put the release-note into this pull request.
    12. -
    13. Build a signed release version of NewPipe using schabis signing keys. This is a release candidate (RC). Name the build apk file NewPipe_<versionNumber>_RC1.apk. - Zip it and post it to the head of the release issue. This way, others can test the release candidate.
    14. -
    15. Test and QA the new version with the help of others.
    16. -
    17. Leave the PR open for a few days and advertise it to help testing.
    18. +
    19. Merge the translations from Weblate into NewPipe.
    20. +
    21. Update your local dev branch and create a changelog file. + Make sure to push the changes and update Weblate.
    22. +
    23. In your local NewPipe repo, fork the dev branch into a new release/x.y.z branch.
    24. +
    25. Increase the version number and update the version code in the build.gradle file.
    26. +
    27. Open a pull request form the new release/x.y.z branch into the master branch.
    28. +
    29. Create an issue pointing to the new pull request. + The reason for opening an issue is that from my perception, people read issues more than pull requests. + You can also pin this issue to draw more attention to it. + Ensure that the discussion about regressions take place in this issue.
    30. +
    31. Create signed release and debug APKs of the release branch using the releaseCandidate and debug build types. + Name the build apk files NewPipe_<versionCode>_RC1.apk and NewPipe_<versionCode>_debug_RC1.apk. + Zip and post them to the head of the pull request and issue. This way, others can test the release candidate. + Release (candidate) and debug APKs of the latest published NewPipe version + should also be provided to allow testing the upgrade process.
    32. +
    33. Test and QA the new version with the help of others. Keep the PR and issue open for a few days
    -

    While being in release phase no new pull requests must be merged into dev branch.

    -

    This procedure does not have to be done for the extractor as extractor will be tested together with the fronted.

    +

    New features can be merged into dev while the release candidate is tested. +PRs which aim to fix regressions of the upcoming release need to target the release/x.y.z branch. +Read Quickfixes for more info.

    +

    The changelogs are translated during the test phase. +Therefore, the translations need to be merged from Weblate once more. +The translation commit is cherry-picked into the release branch.

    +

    Once testing is done and the release branch does not contain critical regressions, and you think the update is ready, +proceed with releasing the new version.

    Quickfixes

    -

    When issuing a new release, you will most likely encounter bugs that might not have existed in previous versions. These are called regressions. -If you find a regression during release phase, you are allowed to push fixes directly into the release branch without having to fork a branch away from it. -All maintainers have to be aware that they might be required to fix regressions, so plan your release at a time when -you are available. Do not introduce new features during the release phase.

    -

    When you have pushed a quickfix, you will want to update the release candidate you put into the issue corresponding to the release pull request. -Increment the version number in the filename of the release candidate. e.g. NewPipe_<versionNumber>_RC2.apk etc. Don't update the actual version number. :P

    +

    When issuing a new release, you will most likely encounter bugs +that might not have existed in previous versions. +These are called regressions. +If you find a regression during release phase, +you are allowed to push fixes directly into the release branch +without having to fork a branch away from it. +Maintainers have to be aware that they might be required to fix regressions, +so plan your release at a time when you are available.

    +

    When you have pushed a quickfix, you need to provide an updated release candidate. +Increment the version number in the filename of the release candidate. e.g. NewPipe_<versionNumber>_RC2.apk etc. +Don't update the actual version number. :P

    release_branch

    Releasing

    Once the glorious day of all days has come, and you fulfill the ceremony of releasing. -After going through the release procedure of creating a new release and maybe a few quickfixes on the new release, +After going through the release procedure of creating a new release +and maybe a few quickfixes on the new release, this is what you should do when releasing:

    1. Click "Merge Pull Request".
    2. -
    3. Create a GPG signed tag with the name v0.x.y.
    4. -
    5. Merge dev into master on the extractor.
    6. -
    7. Create a GPG signed tag with the name v0.x.y on the extractor.
    8. -
    9. Make sure the draft name equals the tag name. draft_name
    10. +
    11. Checkout the master branch locally and create an unsigned APK.
    12. +
    13. Send this APK to TheAssassin for signing and publishing in an encrypted and signed E-Mail. He'll check your APK, too.
    14. +
    15. Once you received a signed APK, upgrade the version on your device and look for any crashes and regressions.
    16. +
    17. In the GitHub releases section, make sure the draft name equals the tag name. draft_name
    18. +
    19. Add the signed APK to the draft.
    20. Make sure to not have forgotten anything.
    21. Click "Publish Release".
    22. -
    23. Clone F-Droid / Data.
    24. -
    25. Add the new version in metadata/org.schabi.newpipe.yml.
    26. -
    27. Run fdroid signatures /path/to/newpipe.apk.
    28. -
    29. Create a MR.
    30. -
    31. Rebase quickfix changes back into dev if quickfixes were made.
    32. -
    33. Temporarily: Update the changelog for the website.
    34. +
    35. Publish the new version on F-Droid.
    36. +
    37. Merge master into dev or fast-forward if possible. Push.
    38. +
    39. Update the changelog for the website.

    rebase_back

    Hotfix Releases

    this_is_fine

    -

    As aforementioned, NewPipe is a web crawler and could break at any moment. In order to keep the downtime of NewPipe as low as possible, when such a shutdown happens, +

    As aforementioned, NewPipe heavily relies on external components and might break at a random point of time. +In order to keep the NewPipe's downtime as low as possible, when such a shutdown happens, we allow hotfixes.

    • A hotfix allows work on the master branch instead of the dev branch.
    • @@ -242,56 +286,141 @@ we allow hotfixes.

    • A hotfix may only focus on fixing what caused the shutdown.

    Hotfix Branch

    -

    Hotfixes work on the master branch. The dev branch has experimental changes that might have not been tested properly enough to be released, if at all. The master branch should always be the latest stable version of NewPipe. If the master branch breaks due to a shutdown, you should fix the master branch. -Of course you are not allowed to push to master directly so you will have to open up a hotfix branch. If someone else is pushing a hotfix into master, and it works this can be considered as hotfix branch as well.

    +

    Hotfixes work on the master branch. +The dev branch has experimental changes that might have not been tested properly enough to be released, +if at all. The master branch should always be the latest stable version of NewPipe. +If the master branch breaks due to a shutdown, you should fix the master branch. +Of course, you are not allowed to push to master directly, +so you need to create a hotfix branch. +If someone else is pushing a hotfix into master, and it works this can be considered as hotfix branch as well.

    hotfix_branch

    Releasing

    -

    If you fixed the issue and found it to be tested and reviewed well enough, you may release it. You don't need to undergo the full release procedure of a regular release, which takes more time to release. +

    If you fixed the issue and found it to be tested and reviewed well enough, you may publish a new version. +You don't need to undergo the full release procedure of a regular release, which takes too much time. Keep in mind that if the hotfix might turn out to be broken after release, you should release another hotfix. -It is important to release quickly for the sake of keeping NewPipe alive, and after all, a slightly broken version of NewPipe is better then a non-functional version ¯\_(ツ)_/¯. +It is important to release quickly for the sake of keeping NewPipe alive, and after all, +a slightly broken version of NewPipe is better than a non-functional version ¯\_(ツ)_/¯. Here's what you do when releasing a hotfix:

      -
    1. Click "Merge Pull Request"
    2. -
    3. Create a GPG signed tag with the name v0.x.y.
    4. -
    5. Merge dev into master on the extractor.
    6. -
    7. Create a GPG signed tag with the name v0.x.y on the extractor.
    8. -
    9. Create a new release draft and write the down the fix into the release notes.
    10. -
    11. Copy the release note into the fastlane directory of releases.
    12. +
    13. Merge the corresponding pull request in the extractor.
    14. +
    15. Publish the new extractor version.
    16. +
    17. Update the extractor version in the app's build.gradle file.
    18. +
    19. Create a new release draft and put some info on the fix into the release note.
    20. +
    21. Copy the release notes into the fastlane directory to create a changelog file.
    22. Increment the small minor version number and the versionCode.
    23. -
    24. Click "Publish Release".
    25. -
    26. Clone F-Droid / Data.
    27. -
    28. Add the new version in metadata/org.schabi.newpipe.yml.
    29. -
    30. Run fdroid signatures /path/to/newpipe.apk.
    31. -
    32. Create a MR.
    33. -
    34. Rebase the hotfix back into dev branch.
    35. -
    36. Temporarily: Update the changelog for the website.
    37. +
    38. Generate a release APK (gradlew assembleRelease) and sign it (or get it signed by one of the other maintainers).
    39. +
    40. Add the signed APK to the GitHub release notes.
    41. +
    42. Click "Publish Release" .
    43. +
    44. Publish the new version on F-Droid.
    45. +
    46. Merge the changes from master into dev.
    47. +
    48. Update the changelog for the website.

    rebase_back_hotfix

    +

    Extractor releases

    +

    In general, the release process for extractor versions is not that complicated compared to app releases. +The extractor has (in difference to the app) a decent test coverage. +Additionally, the latest extractor version is typically tested in the app's latest dev version. +Therefore, a long test phase is not needed when creating extractor releases.

    +

    To create a new extractor version, update the version in the extractor's build.gradle file +as well as the version names in the README. +Merge the dev branch into master. +The same that applies the app's release notes also applies to the extractor's release notes.

    +

    When publishing an extractor release via GitHub on the master branch, +a new JavaDoc version +is generated and published automatically. +Pleas keep an eye on the GitHub Action which is responsible for that. +If changes in that release introduced invalid JavaDoc, the build fails and needs to be fixed. +For this reason, you should check locally if there are any problems with the JavaDoc generation before publishing the new version.

    Version Nomenclature

    The version nomenclature of NewPipe is simple.

      -
    • Major: The major version number (the number before the first dot) was 0 for years. The reason for this changed over time. First, I wanted this number to - switch to 1 once NewPipe was feature complete. Now, I rather think of incrementing this number to 1 once we can ensure that NewPipe runs stable (part of which this documentation should help). After this, well, God knows what happens if we ever reach 1. ¯\_(ツ)_/¯
    • -
    • Minor: The minor version number (the number after the first dot) will be incremented if there is a major feature added to the app.
    • -
    • Small Minor: The small minor (the number after the second dot) will be incremented if there are bug fixes or minor features added to the app.
    • +
    • Major: The major version number (the number before the first dot) was 0 for years. + The reason for this changed over time. First, I wanted this number to + switch to 1 once NewPipe was feature complete. + Now, I rather think of incrementing this number to 1 once we can ensure that NewPipe runs stable + (part of which this documentation should help). + After this, well, God knows what happens if we ever reach 1. ¯\_(ツ)_/¯
    • +
    • Minor: The minor version number (the number after the first dot) + will be incremented if there is a major feature added to the app.
    • +
    • Small Minor: The small minor (the number after the second dot) + is incremented when bug fixes or minor features are added to the app.

    Version Nomenclature of the Extractor

    -

    The extractor is always released together with the app, therefore the version number of the extractor is identical to the one of NewPipe itself.

    -

    Version Code

    -

    In Android, an app can also have a versionCode. This code is a long integer and can be incremented by any value to show a device that a new version is there. -For NewPipe, the version code will be incremented by 10 regardless of the change of the major or minor version number. The version codes between the 10 steps -are reserved for our internal F-Droid build server.

    +

    Previously, the extractor was released together with the app, +therefore the version number of the extractor was identical to the one of NewPipe itself.

    +

    We try to combine efforts to make NewPipe Extractor more independent of the app. +The extractor is used by multiple other applications +and therefore releasing extractor updates should not be coupled to app releases. +However, maintainers need to keep an eye on making the app compatible with extractor changes.

    Release Notes

    -

    Release notes should tell what was changed in the new version of the app. The release nodes for NewPipe are stored in the GitHub draft for a new release. When a maintainer wants to add changes to the release note, but there is no draft for a new version, they should create one.

    -

    Changes can be categorized into three types:

    +

    Release notes should tell what was changed in the new version of the app. +The release notes for NewPipe are stored in the +GitHub draft for a new release. +When a maintainer wants to add changes to the release notes, +but there is no draft for a new version, they should create one.

    +

    Changes can be categorized into five basic types:

    • New: New features that got added to the app.
    • Improved: Improvements to the app or existing features
    • -
    • Fixes: Bugfixes
    • +
    • Fixed: Bugfixes
    • +
    • Translation: New translations
    • +
    • Development: Changes which address things "under the hood", + which do not have any recognizable effect to the user; e.g. dependency updates or changes to the build process
    -

    When releasing a new version of NewPipe, before actually clicking "Release", the maintainer should copy the release notes from the draft and put it into a file called -<versionCode>.txt (whereas <versionCode> needs to be the version code of the incoming release). This file must be stored in the directory /fastlane/metadata/android/en-US/changelogs. This way, F-Droid will be able to show the -changes done to the app.

    +

    When adding a PR to the release notes, increase the PR counter at the top of the draft +and put the number before the PR summary / title. +This helps the blog post authors to keep easily track of new PRs. +Remove the numbers before publishing a new version :)

    +

    If there is a blog post covering the changes in more detail, +make sure to link it on the top of the release notes. +It would be a pity, if only a few people read the blog post +after our wonderful writers put so much effort into creating it.

    +

    Changelog file

    +

    Maintainers need to provide a changelog file for each release. +A changelog file is used by F-Droid to give a quick summary of the most important changes for a release. +This file is placed in the +/fastlane/metadata/android/en-US/changelogs +directory and named <versionCode>.txt (whereas <versionCode> is the version code of the incoming release). +Changelog files must not exceed 500 bytes. +Be aware that the changelog is translated into multiple languages. +A changelog written in English which almost hits 500 bytes can hardly be translated completely within this limit. +This causes troubles for translators, because Weblate enforces the 500 bytes limit, too. +For this reason it is recommended to keep the changelog at 400 bytes.

    +

    When creating the changelog file be aware of changes which were done in the extractor as well.
    +Before pushing the changelog to NewPipe's repo, ask other maintainers to review it.
    +After pushing the changelog to NewPipe's GitHub repo, updating Weblate is necessary. +This enables translators to work on localized versions of the changelog before a release is tagged and published.

    +

    Publish on F-Droid

    +

    NewPipe is and supports open source software. +For this reason, the preferred way to distribute the app is F-Droid. +F-Droid is a catalogue of FOSS apps and also comes with an Android client which handles app updates. +There are two ways to install NewPipe via F-Droid.

    +
      +
    1. Through the main F-Droid repository
      + NewPipe's metadata file can be found in F-Droid's data repository on GitLab: + https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/org.schabi.newpipe.yml
      + This file is automatically updated by a bot when a new release is published on GitHub. + It can take a few days until all new apps on F-Droid are built, signed and published.
      +F-Droid also supports reproducible builds. + Reproducible builds or deterministic builds allow someone else to retrieve the exact same binary + as we get when building the app (except the signing of course).
      + When the reproducible build feature is enabled for an app in F-Droid, they compare their binary to one provided by the author. + If both are identical, F-Droid does not only publish the binary signed by themselves, but also the one signed by the author.
      + Currently, NewPipe's builds are not deterministic, and we therefore cannot use that feature. + Once the builds are deterministic again, the following steps need to be done to publish a new version on F-Droid:
        +
      1. Install fdroidserver on your device.
      2. +
      3. Clone the F-Droid Data repo from https://gitlab.com/fdroid/fdroiddata
      4. +
      5. Add the new version to metadata/org.schabi.newpipe.yml
      6. +
      7. Run fdroid signatures /path/to/newpipe.apk on the signed APK from within the repo.
      8. +
      9. Create a MR on GitLab. +An example commit containing all required changes can be found here.
      10. +
      +
    2. +
    3. Through NewPipe's F-Droid repository
      + F-Droid needs + NewPipe's own F-Droid repo is available at https://archive.newpipe.net/fdroid/repo + It is updated and maintained by @TheAssassin.
    4. +
    @@ -325,17 +454,18 @@ changes done to the app.

    - - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
    + - @@ -45,7 +44,7 @@ NewPipe Documentation
    - +
    @@ -134,6 +133,7 @@
    +
    @@ -222,17 +222,18 @@ or run sudo pip3 install mkdocs to install mkdocs systemwide. Last
    - - - - « Previous - - - Next » - - + + + + « Previous + + + Next » + +
    + - @@ -45,7 +44,7 @@ NewPipe Documentation
    - +
    @@ -96,6 +95,14 @@
  • Community
  • +
  • Managing translations via Weblate + +
  • @@ -128,6 +135,7 @@
    +
    @@ -190,6 +198,43 @@ There also might be things that seem to not have any issues, but other things wi

    Community

    When you talk to the community, stay friendly and respectful with good etiquette. When you have a bad day, just don't go to GitHub (advice from our experience ;D ).

    +

    Managing translations via Weblate

    +

    NewPipe is translated via Weblate. +There are two different components which are open for translation:

    +
      +
    • The app strings.
    • +
    • The fastlane metadata; + this includes the F-Droid store description and changelogs.
    • +
    +

    Maintainers can access more options to handle Weblate via the +Manage > Repository Maintenance button +or via the Weblate CLI. These options include +basic access to Git operations like commit and rebase +as well as locking Weblate to prevent further changes to translations.

    +

    Weblate Web Interface +HINT: When updating Weblate via the web interface, please use the "Update > Rebase" option.

    +

    Update Weblate

    +

    Weblate is based on NewPipe's dev branch and is configured to automatically update its repository to be in sync with NewPipe. +However, Weblate does not update its branch often, therefore it is better to update it manually after changing strings in NewPipe.

    +

    To do thus manually, commit the Weblate changes and rebase the repository. +Sometimes conflicts need to be resoled while rebasing the repository. +Conflicts need to be addressed ASAP, because Weblate is automatically locked once conflicts occur. +To do so, merge the changes from Weblate into NewPipe. +If Weblate does not recognize the new commit by itself, ask Weblate to rebase once more. +Weblate unlocks the translations when all conflicts are resolved and no errors are detected.

    +

    Merge changes from Weblate into NewPipe

    +

    Weblate does not push the translation changes to NewPipe automatically. +Doing this manually, allows the maintainers to do a quick review of the changes.

    +

    Before merging weblate changes into NewPipe, make sure to commit all Weblate changes and +lock the Weblate to prevent modifications while you update Weblate. +To merge the changes into NewPipe, checkout Weblate's dev branch. +You have read access to Weblate's repository via https://hosted.weblate.org/git/newpipe/strings/. +If there are conflicts when rebasing weblate, resolve them.

    +

    Check the following things: +- Is there a translation for a new language? If yes, register the language with the app's langauge selector +- Use Analyse > Inspect Code in Android Studio to find unused strings and potential bugs introduced by Weblate. + Pay attention to plurals in Asian languages. They are broken by Weblate on a regular basis.

    +

    Push the changes to NewPipe's dev branch, update Weblate and unlock it.

    @@ -221,15 +266,16 @@ When you have a bad day, just don't go to GitHub (advice from our experience ;D
    - - - - « Previous - - - + + + + « Previous + + +
    + - + - @@ -34,7 +33,7 @@ NewPipe Documentation
    - +
    @@ -103,6 +102,7 @@
    +
    @@ -135,13 +135,14 @@
    - - - - - + + + + +
    + - @@ -45,7 +44,7 @@ NewPipe Documentation
    - +
    @@ -120,6 +119,7 @@
    +
    @@ -163,15 +163,16 @@ It focuses on making it possible for the creator of a scraper for a streaming se
    - - - - - Next » - - + + + + + Next » + +
    + - @@ -38,7 +37,7 @@ NewPipe Documentation
    - +
    @@ -107,6 +106,7 @@
    +
    @@ -118,7 +118,7 @@ -
    +
    Searching...
    @@ -146,13 +146,14 @@
    - - - - - + + + + +
    +