diff options
Diffstat (limited to 'subprojects')
23 files changed, 0 insertions, 2072 deletions
diff --git a/subprojects/freeamo/freeamo.conf~ b/subprojects/freeamo/freeamo.conf~ deleted file mode 100644 index 51d4992..0000000 --- a/subprojects/freeamo/freeamo.conf~ +++ /dev/null @@ -1,4 +0,0 @@ -latest_trisquel_icecat_version="$(wget -qO- "http://archive.trisquel.info/trisquel/pool/main/i/icecat/?C=N;O=D" | grep icecat_ | head -n 1 | sed "s|\"|\\n|g; s|-|\\n|g" | grep icecat_ | sed "s|icecat_||" | head -n 1)" -firefox_compatibility="$latest_trisquel_icecat_version" -minimum_average_daily_users="10000" - diff --git a/subprojects/freeamo/freeamo~ b/subprojects/freeamo/freeamo~ deleted file mode 100755 index bd28ff8..0000000 --- a/subprojects/freeamo/freeamo~ +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/env bash -# This file is part of FreeAMO -# Copyright (C) 2017, 2018 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -if [ "$1" == "--debug" ] || [ "$2" == "--debug" ]; then - - debug=true - debug_arg="--debug"; - -else - - debug=false; - unset debug_arg; - -fi - -scriptsrc=$(readlink -f -- "${BASH_SOURCE[0]}") -run_path=$(dirname "${scriptsrc}" || echo .) -filename=$(basename "$0"); - -output_file_1="$run_path/build/index-search-pages.txt"; -output_file_2="$run_path/build/index-search-pages--free-licenses.txt" - -latest_trisquel_icecat_version="$(wget -qO- "http://archive.trisquel.info/trisquel/pool/main/i/icecat/?C=N;O=D" | grep icecat_ | head -n 1 | sed "s|\"|\\n|g; s|-|\\n|g" | grep icecat_ | sed "s|icecat_||" | head -n 1)" - -minimum_average_daily_users="10000" - -# source "$run_path/build/err" - -# Delete empty files to re-generate them -- Typical case scenario: 1) wget tried to download a file 2) The script is interupted 3) The script is run again -if [ -d "$run_path/build" ]; then - - find "$run_path/build" -type f -empty -delete - -fi - -export -p debug - -if [ ! -f /usr/bin/jq ]; then echo "/usr/bin/jq not found!"; exit=true; fi -if [ ! -f /usr/bin/wget ]; then echo "/usr/bin/wget not found!"; exit=true; fi - -if [[ $exit == true ]]; then exit 1; fi - -case "$1" in - - ""|--debug) - - $0 --disclaimer "$debug_arg" - $0 --remove-build "$debug_arg" - $0 --search-pages "$debug_arg" - $0 --get-licenses "$debug_arg" - $0 --make-directory.fsf.org-wiki "$debug_arg" - - ;; - - -help) - - [ "$1" = "" ] && echo "Usage: $filename [--option] [--debug] - -OPTIONS - $0 --disclaimer - Display which icecat version the add-on will be compatible with. - $0 --remove-build - Remove the build directory if it exists. - $0 --search-pages - Downloads the most popular WebExtensions from https://addons.mozilla.org/en-US/firefox/search/... - $0 --get-licenses - The licenses are not added to the general JSON file. This option will download the neccesary license JSON files for all add-ons. - $0 --make-directory.fsf.org-wiki - Generates .wiki files specifically for https://directory.fsf.org/wiki/ - -Disabled options due to limited development time - $0 --make-repository-list - Required file: FreeAMO-collections - File content syntax: https://addons.mozilla.org/en-US/firefox/collections/<user>/ - $0 --make-collection-list - Required file: FreeAMO-collections - File content syntax: https://addons.mozilla.org/en-US/firefox/collections/<user>/<collection name> - $0 --make-custom-list - Required file: FreeAMO-custom - File content syntax: https://addons.mozilla.org/en-US/firefox/addon/<add-on name>/ - $0 --download-licenses-json - $0 --download-free-webextensions - Downloads the latest version of the free WebExtensions. - $0 --verify-license-copy - Search for license files in the root directory in the downloaded WebExtensions (.xpi files) -" && exit 1 - - ;; - - --disclaimer) - - bold=$(tput bold) - normal=$(tput sgr0) - - echo "${bold}icecat-$latest_trisquel_icecat_version${normal} is the latest package version for Trisquel GNU/Linux. -This program will download meta-data that is compatible with that version." - - ;; - - --remove-build) - - rm -fr "$run_path/build" - - ;; - - --search-pages) - - # This option is named after named after https://addons.mozilla.org/en-US/firefox/search/ - $0 --search-pages--download "$debug_arg" - $0 --search-pages--filter "$debug_arg" - - ;; - - --search-pages--download) - - mkdir -p "$run_path/build/json/search-pages" - source src/search-pages - search-pages--download - - ;; - - --search-pages--filter) - - mkdir -p "$run_path/build/json/search-pages" - source src/search-pages - search-pages--filter - - ;; - - --get-licenses) - - $0 --get-licenses--download "$debug_arg" - $0 --get-licenses--filter "$debug_arg" - - ;; - - --get-licenses--download) - - mkdir -p "$run_path/build/json/current_versions"; - source src/get-licenses - get-licenses--download - - ;; - - --get-licenses--filter) - - source src/get-licenses - get-licenses--filter - - ;; - - --make-directory.fsf.org-wiki) - - mkdir -p "$run_path/build/wiki"; - source src/make-wiki - - ;; - -esac diff --git a/subprojects/freeamo/src/get-licenses~ b/subprojects/freeamo/src/get-licenses~ deleted file mode 100644 index 0c1494b..0000000 --- a/subprojects/freeamo/src/get-licenses~ +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash -# This file is part of FreeAMO -# Copyright (C) 2018 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# API: Please adopt SPDX - https://github.com/mozilla/addons-server/issues/8706 -# Allow GNU [L]GPL x.x or later - https://github.com/mozilla/addons-server/issues/8707 - -cd "build/json/search-pages" - -function get-licenses--download { - - echo -e "\\nDownloading license pages:" - - -output_file="$output_file_1"; -source "$run_path/src/main_functions" - - while IFS= read -r table; do - - ((++line)) - - if [ "$debug" = true ] && [ "$line" -le "3" ] || [ "$debug" = false ] ; then - - file=$(echo $table | awk '{print $1}'); - entry=$(echo $table | awk '{print $2}'); - - source "$run_path/src/main_functions" - amo_variables - - total=$(wc -l < "$output_file_1") -# echo -e "#================== -#Entry $line (of $total): $name\n" - - # Do now download the same license files over and over - wget -nc -q "https://addons.mozilla.org/api/v3/addons/addon/$slug/versions/$current_version__id/" -O "$run_path/build/json/current_versions/$current_version__id.json" - - fi - - - echo "foo" # Must be here to work with pv - done < "$output_file_1" | progress - -} - -function get-licenses--filter { - - echo -e "\\nFilter license pages:" - - output_file="$output_file_1"; - source "$run_path/src/main_functions" - rm -f "$run_path/build/index-search-pages--free-licenses.txt" - - - while IFS= read -r table; do - - ((++line)) - - if [ "$debug" = true ] && [ "$line" -le "3" ] || [ "$debug" = false ] ; then - - file=$(echo $table | awk '{print $1}'); - entry=$(echo $table | awk '{print $2}'); - - source "$run_path/src/main_functions" - amo_variables - amo_variables__licenses - -# license="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;")" - -# echo "$run_path/build/json/current_versions/$(jq ".results[$entry].current_version.id" "$file")" - - # This is the complete list of pre-defined licenses listed on AMO. Apache License 2.0 is not on the list so its not easy to detect because it has to be released under a "Custom License". - # Make a drop-down menu with all SPDX licenses - https://github.com/mozilla/addons-server/issues/8866 - # See https://addons.mozilla.org/en-US/developers/addon/<your add-on>/ownership for the current add-on list. Note that not all licenses are added to the list. - # DuckDuckGo Privacy Essentials is distributed under Apache License 2.0. - # Apache License, version 2.0 is not on the add-on license list - https://github.com/mozilla/addons-server/issues/8545 - if - [ "$license__amo_full_name" == "BSD License" ] || - [ "$license__amo_full_name" == "GNU General Public License, version 3.0" ] || - [ "$license__amo_full_name" == "GNU General Public License, version 2.0" ] || - [ "$license__amo_full_name" == "GNU Lesser General Public License, version 3.0" ] || - [ "$license__amo_full_name" == "GNU Lesser General Public License, version 2.1" ] || - [ "$license__amo_full_name" == "MIT/X11 License" ] || - [ "$license__amo_full_name" == "Mozilla Public License, version 2.0" ] || - [ "$license__amo_full_name" == "Mozilla Public License Version 1.1" ] - then - - # The nonfree add-ons should not be removed since the line number must correspond with the entry number in the search result JSON files. -# echo "$name: $license__amo_full_name" - echo "$file $entry" >> "$output_file_2" - - freedom_status="free"; - - elif [ "$license__amo_full_name" == "All Rights Reserved" ]; then - - freedom_status="nonfree"; - - else - - freedom_status="unknown"; - fi - - - - fi - - echo "foo" # Must be here to work with pv - - done < "$output_file_1" | progress - -} diff --git a/subprojects/freeamo/src/main_functions~ b/subprojects/freeamo/src/main_functions~ deleted file mode 100644 index 7aec7e8..0000000 --- a/subprojects/freeamo/src/main_functions~ +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash -# This file is part of FreeAMO -# Copyright (C) 2018 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -function check_files { - - if [ ! -f "$run_path/FreeAMO-$check_type" ]; then - - echo "$run_path/FreeAMO-$check_type doesn't exist."; - echo "Exiting" && exit - - else - - - # Make sure all links are using SSL - if grep -q "http://addons.mozilla.org/" $run_path/FreeAMO-$check_type; then - - echo "Change http://addons.mozilla.org/ to https://addons.mozilla.org/ (https)." - echo "Exiting" && exit - - fi - - fi - -} - -function line_status { - - - if [ "$file" == "$previous_file" ]; then - - ((++line)) - - else - - line="0"; # Should not be 1 - - fi - -} - -function amo_variables() { - id="$(jq ".results[$entry].id" "$file")"; - average_daily_users="$(jq ".results[$entry].average_daily_users" "$file")"; - has_eula="$(jq ".results[$entry].has_eula" "$file")"; - slug="$(jq ".results[$entry].slug" "$file" | sed "s|^\"||; s|\"$||;")"; - current_version__id=$(jq ".results[$entry].current_version.id" "$file"); - - # Names - name__enUS=$(jq ".results[$entry].name" "$file" | sed "s|-||;" | jq .enUS | sed "s|^\"||; s|\"$||;" ) - name__enGB=$(jq ".results[$entry].name" "$file" | sed "s|-||;" | jq .enGB | sed "s|^\"||; s|\"$||;" ) - if [ "$name__enUS" != "null" ]; then name="$name__enUS"; - elif [ "$name__enGB" != "null" ]; then name="$name__enGB"; - else name=$(jq ".results[$entry].name[]" "$file" | sed "s|-||;" | jq . | sed "s|^\"||; s|\"$||;"); # Use the first avalible name if English is not avaliable - fi - - - if jq .results[$entry].current_version.files[0].permissions "$file" | grep -q "nativeMessaging"; then - - nativeMessaging__pass=false; - - else - - nativeMessaging__pass=true; - - fi - -} - -function amo_variables__licenses { - - license__amo_full_name="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;")" - -} - -function essential_addon { - - if [ "$has_eula" = false ] && [ "$nativeMessaging__pass" = true ] && [ "$average_daily_users" -ge "$minimum_average_daily_users" ]; then - - essential_addon=true; - - else - - essential_addon=false; - - fi - -} - -#function hard_to_evaluate_addon { - - # curl "https://addons.mozilla.org/api/v3/addons/addon/nemid-nøglefilsprogram/" | jq .current_version.files[0].permissions | grep "nativeMessaging - - - # API data: Add software dependencies - https://github.com/mozilla/addons-server/issues/8668 - # The API should be fixed. there are to many add-ons to keep track on if they have or not have software dependencies. - - # Old solution: - - # 1: Add this to FreeAMO-dependencies: - #belgium-eid eid-mw - - # 2: Uncomment this code: - # depends_on_external_program=false; - # while IFS= read -r dependencies; do - # - # dependency_slug=$(echo $dependencies | awk '{print $1}'); - # dependency=$(echo "$dependencies" | cut -f 2); - # - # if [ "$dependency_slug" == "$slug" ]; then - # - # depends_on_external_program=true; - # - # fi - # - # done < $run_path/FreeAMO-dependencies - -#} - -function progress { - - (>&2 echo -en "\r"; pv --progress --line-mode --size $pv__size --eta --timer) > /dev/null - -} diff --git a/subprojects/freeamo/src/make-wiki~ b/subprojects/freeamo/src/make-wiki~ deleted file mode 100644 index d5aeb51..0000000 --- a/subprojects/freeamo/src/make-wiki~ +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash -# This file is part of FreeAMO -# Copyright (C) 2018 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cd "build/json/search-pages" - -echo -e "\\nGenerating .wiki files for https://directory.fsf.org/wiki/:" - -echo "{| class=\"wikitable sortable\" border=\"1\" style=\"font-size:smaller\" -! WebExtension -! Description -! Claimed license -! Users -! Rating -! Updated" > "$run_path/build/wiki/IceCat WebExtensions (proposed).wiki" - - -pv__size=$(ls . | wc -l) -output_file="$output_file_2"; -source "$run_path/src/main_functions" - -while IFS= read -r table; do - - ((++line)) - - if [ "$debug" = true ] && [ "$line" -le "3" ] || [ "$debug" = false ] ; then - - file=$(echo $table | awk '{print $1}'); - entry=$(echo $table | awk '{print $2}'); - - source "$run_path/src/main_functions" - amo_variables - amo_variables__licenses - - if [ "$license__amo_full_name" == "BSD License" ]; then license__fsd_short_name="BSD 2Clause"; - elif [ "$license__amo_full_name" == "GNU General Public License, version 3.0" ]; then license__fsd_short_name="GPLv3"; - elif [ "$license__amo_full_name" == "GNU General Public License, version 2.0" ]; then license__fsd_short_name="GPLv2"; - elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 3.0" ]; then license__fsd_short_name="LGPLv3"; - elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 2.1" ]; then license__fsd_short_name="LGPLv2.1"; - elif [ "$license__amo_full_name" == "MIT/X11 License" ]; then license__fsd_short_name="X11"; - elif [ "$license__amo_full_name" == "Mozilla Public License, version 2.0" ]; then license__fsd_short_name="MPLv2.0"; - elif [ "$license__amo_full_name" == "Mozilla Public License Version 1.1" ]; then license__fsd_short_name="MPLv1.1"; - fi - - short_description_raw=$(jq .results[$line].summary $file | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;" | sed "s|\\\n|\n|g; s|\\\||g; -s|<a rel=\"nofollow\" href=\"|[|g; s|\">| |g; s|</a>|]|g; # URL issues -s|http|\nhttp|g; -"); - short_description_again=$(echo "$short_description_raw" | sed "/outgoing.prod.mozaws.net/d;"); - - short_description=$(echo "$short_description_again" | sed ':a;N;$!ba;s/\nhttp/http/g'); - - full_description_raw=$(jq .results[$line].description $file | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||; -s|<a rel=\"nofollow\" href=\"|[|g; s|\">| |g; s|</a>|]|g; # URL issues -"); - full_description_again=$(echo "$full_description_raw" | sed "/outgoing.prod.mozaws.net/d;"); - - full_description=$(echo "$full_description_again" | sed ':a;N;$!ba;s/\nhttp/http/g'); - - - - - homepage_url=$(jq .results[$line].homepage $file | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;"); - version=$(jq .results[$line].current_version.version $file | sed "s|^\"||; s|\"$||;"); - version_date=$(jq .results[$line].last_updated $file | sed "s|^\"||; s|\"$||;" | sed "s|T|\n|" | head -n 1 | sed "s|-|/|g"); - version_id=$(jq .results[$line].current_version.id $file); - license_copyright=$(jq .results[$line].authors[].name $file | sed "s|^\"||; s|\"$||;"); - bayesian_average=$(jq .results[$line].ratings.bayesian_average $file); - bayesian_average__simple=$(printf "%.1f" "$(echo "$bayesian_average" | sed "s|\.|,|")"); - - last_review_date=$(date +"%Y/%m/%d"); - last_review_by="wikisysbot"; - submitted_by="wikisysbot"; - - if [[ "$(jq .results[$line].current_version.compatibility.seamonkey $file)" != "null" ]]; then - set_seamonkey="Iceape,"; - fi - - if [[ "$(jq .results[$line].current_version.compatibility.firefox $file)" != "null" ]]; then - set_icecat="IceCat,"; - fi - - # if [[ "$(jq .results[$line].current_version.compatibility.android $file)" != "null" ]] || [[ "$(jq .results[$line].current_version.compatibility.mobile $file)" != "null" ]]; then - # set_icecatmobile="IceCatMobile,"; - # fi - - if [[ "$(jq .results[$line].current_version.compatibility.thunderbird $file)" != "null" ]]; then - set_thunderbird="Icedove,"; - fi - - # Do not list IceCatMobile - extension_of=$(echo "$set_seamonkey$set_icecat$set_thunderbird" | sed "s|,$||;"); - - - - github_true=$(echo "$homepage_url" | grep "github.com"); - - if [[ $github_true != "" ]]; then - - # Always use https, and remove anchors - homepage_url__for__vcs_checkout_command="https://github.com$(echo $github_true | sed "s|https://github.com||; s|http://github.com||; s|#|\n|;" | head -n 1)"; - # Remove trailing slash - homepage_url__for__vcs_checkout_command="${homepage_url__for__vcs_checkout_command%/}" - vcs_checkout_command="git clone $homepage_url__for__vcs_checkout_command.git"; - - fi - - if [ "$name" == "GNU LibreJS" ]; then - - is_gnu="Yes"; - - else - - is_gnu="No"; - - fi - - support_url=$(jq .results[$line].support_url $file | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;"); - - # List JSON structure: cat json/$file | js '.' - # XML value "homepage" is not always set in AMO API, but the XML require "Homepage URL" to be set: Therfore we use the AMO page itself in Homepage URL to complete the build of the repo automatically. - echo "{{Entry" > $run_path/build/wiki/$slug.wiki - - # Dash have to be removed in jq 1.3: https://github.com/stedolan/jq/issues/341 - # Avoid specific versions since it's not compatible with all IceCat versions: - # |Version download=https://addons.mozilla.org/firefox/downloads/latest/$id/addon-$version_id-latest.xpi - # |Version identifier=$version - # |Version date=$version_date - - - echo "|Name=$name -|Short description=$short_description -|Full description=$full_description -|Homepage URL=$homepage_url -|Extension of=$extension_of -|VCS checkout command=$vcs_checkout_command -|Version download=https://addons.mozilla.org/en-US/firefox/addon/$slug/versions/ -|Last review by=$last_review_by -|Last review date=$last_review_date -|Submitted by=$submitted_by -|Submitted date=2018/06/20 -|Is GNU=$is_gnu -}}" >> $run_path/build/wiki/$slug.wiki - - - - # https://addons.mozilla.org/api/v3/addons/addon/noscript/versions/1910123/ - echo "{{Project license -|License=$license__fsd_short_name -|License copyright=$license_copyright -|License note=\"License: $license__amo_full_name\" listed -at https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/ -}}" >> $run_path/build/wiki/$slug.wiki - - if [[ "$support_url" != "" ]]; - then - - echo "{{Resource -|Resource audience=Users -|Resource kind=Support -|Resource URL=$support_url -}}" >> "$run_path/build/wiki/$slug.wiki" - - fi - - - echo "|- -| [[$name]] -| $short_description -| [[License:$license__fsd_short_name|$license__fsd_short_name]] -| $average_daily_users -| $bayesian_average__simple -| $version_date" >> "$run_path/build/wiki/IceCat WebExtensions (proposed).wiki" - - - - fi - - echo "foo" # Must be here to work with pv -done < "$output_file_2" | progress -# End template - -echo "|}" >> "$run_path/build/wiki/IceCat WebExtensions (proposed).wiki" diff --git a/subprojects/freeamo/src/search-pages~ b/subprojects/freeamo/src/search-pages~ deleted file mode 100644 index 3ffa9dd..0000000 --- a/subprojects/freeamo/src/search-pages~ +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env bash -# This file is part of FreeAMO -# Copyright (C) 2017 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cd "$run_path/build/json/search-pages" || exit - -function search-pages--download() { - - echo "$debug" - - echo -e "\\nDownloading search pages:" - - echo "This file is used to describe the settings that were used to generate the files. - -build/json/search-pages/ -$wget_uri" > "$run_path/build/declared_settings.txt" - # indicate that the page page variable are the page files - sed -i "s|page=1|page=\$page|g" "$run_path/build/declared_settings.txt" - - - - ##################################################### - - function wget_page { - - base_uri="https://addons.mozilla.org/api/v3/addons/search/?platform=linux&sort=users&type=extension&app=firefox&appversion=$latest_trisquel_icecat_version&page_size=50&page="; - # sort=users. sort=name not working yet - https://github.com/mozilla/addons-server/issues/7600 - # page_size=50 -- this is the maximum accepted number, it makes the download much faster: 20 seconds for 10 x page_size=50, 35 seconds for 20 x page_size=25 (default) - # page. Add this dynamic variable as the last variable to make it easy to read - wget_uri="$base_uri$page"; - - wget -q "$wget_uri" --no-verbose -O "$page.json" - - average_daily_users="$(jq ".results[].average_daily_users" "$page.json" | tail -n 1)" - - } - - page="1"; - wget_page - - page_count="$(jq ".page_count" "$page.json")"; - pv__size="$page_count" - source "$run_path/src/main_functions" - - - if [ "$debug" = true ]; then - - pv__size="2"; - - else - - pv__size="$page_count" - - fi - - - while [ "$page" -lt "$page_count" ]; do - - ((++page)) - - if ( [ "$debug" = true ] && [ "$page" -le "3" ] || [ "$debug" = false ] ) && ( [ "$average_daily_users" -ge "$minimum_average_daily_users" ] ); then - - echo "$page" - wget_page - - else - - exit 0 - - fi - - echo "foo" # Must be here to work with pv - done | progress - -} - -function search-pages--filter() { - - - echo -e "\\nFilter search pages:" - - # source "$run_path/src/main_functions" - # amo_variables - echo " -build/index-search-pages.txt -has_eula=false -nativeMessaging__pass=true -minimum_average_daily_users=$minimum_average_daily_users" >> "$run_path/build/declared_settings.txt" - - pv__size=$(ls . | wc -l) - output_file="$output_file_1"; - source "$run_path/src/main_functions" - - rm -f $output_file_1 - - # Sort by file modification time stamp for the downloaded JSON files - find . -type f | sort -n | while read -r file; do - - - filename="$(echo $(basename "$file"))"; - - entry="0"; # Should not be 1 - - for id in $(jq ".results[].average_daily_users" "$file"); do - - source "$run_path/src/main_functions" - amo_variables - - essential_addon - if [ "$essential_addon" = true ]; then - - echo -e "$filename\\t$entry" >> "$output_file_1" - - fi - - ((++entry)) - - done - - echo "$filename" - - - echo "foo" # Must be here to work with pv - done | progress - -} diff --git a/subprojects/freeamo/src/unmaintained/TODO~ b/subprojects/freeamo/src/unmaintained/TODO~ deleted file mode 100644 index 5bb2611..0000000 --- a/subprojects/freeamo/src/unmaintained/TODO~ +++ /dev/null @@ -1,5 +0,0 @@ -The author of the package, licenseutils, has implemented an option per request that make it possible to use detect licenses, its evoked with: -$ licensing detect * - -I cannot install licenseutils for the moment because I held broken packages in my system. - diff --git a/subprojects/freeamo/src/unmaintained/bad_names~ b/subprojects/freeamo/src/unmaintained/bad_names~ deleted file mode 100644 index 065ca82..0000000 --- a/subprojects/freeamo/src/unmaintained/bad_names~ +++ /dev/null @@ -1,31 +0,0 @@ - - -function search-pages--filter__bad_names() { - -name=$(jq .results[$entry].name "$run_path/build/json/$file" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;"); - -if [ "$name" == "null" ]; then - -name=$(jq .results[$entry].name "$run_path/build/json/$file" | sed "s|en-GB|enGB|;" | jq .enGB | sed "s|^\"||; s|\"$||;"); - -fi - -# Warn about clutter in Name - https://github.com/mozilla/addons-server/issues/8790 -# Clean titles. Example of bad titles: "Ghostery – Privacy Ad Blocker" - -# - -# Hard to filter out "-" since many add-ons use it, see for example https://addons.mozilla.org/en-US/firefox/search/?platform=linux&q=1-click -# Flash Video Downloader - YouTube HD Download [4K] - -# Find all names that don't contain Aa-Zz 0-9 and white spaces should be much more reliable than this: -name=$(echo "$name" | sed ' -s/ — /\n/g; -s/ – /\n/g; -s/ - /\n/g; # looks identical to the prevoius line but is unique -s/: /\n/g; -s/(/\n/g; -s/,/\n/g; -s/™/\n/g; -' | head -n 1 | sed 's/ $//'); - -} diff --git a/subprojects/freeamo/src/unmaintained/conf/license-reporter-custom~ b/subprojects/freeamo/src/unmaintained/conf/license-reporter-custom~ deleted file mode 100644 index 6927339..0000000 --- a/subprojects/freeamo/src/unmaintained/conf/license-reporter-custom~ +++ /dev/null @@ -1,53 +0,0 @@ -https://addons.mozilla.org/en-US/firefox/addon/bookmarks-tab/ -https://addons.mozilla.org/en-US/firefox/addon/capture-reverse-image-search/ -https://addons.mozilla.org/en-US/firefox/addon/country-flags-ip-whois/ -https://addons.mozilla.org/en-US/firefox/addon/dynamichistory/ -https://addons.mozilla.org/en-US/firefox/addon/foxytab/ -https://addons.mozilla.org/en-US/firefox/addon/fraudscore/ -https://addons.mozilla.org/en-US/firefox/addon/ghosttext/ -https://addons.mozilla.org/en-US/firefox/addon/laboratory-by-mozilla/ -https://addons.mozilla.org/en-US/firefox/addon/lesspass/ -https://addons.mozilla.org/en-US/firefox/addon/mute-all-inactive-tabs/ -https://addons.mozilla.org/en-US/firefox/addon/nemid-nøglefilsprogram/ -https://addons.mozilla.org/en-US/firefox/addon/noflash/ -https://addons.mozilla.org/en-US/firefox/addon/org-capture/ -https://addons.mozilla.org/en-US/firefox/addon/porn-site-blocker/ -https://addons.mozilla.org/en-US/firefox/addon/print-edit-we/ -https://addons.mozilla.org/en-US/firefox/addon/save-all-images-webextension/ -https://addons.mozilla.org/en-US/firefox/addon/sky-timer/ -https://addons.mozilla.org/en-US/firefox/addon/smart-https-revived/ -https://addons.mozilla.org/en-US/firefox/addon/speed-dial-lite/ -https://addons.mozilla.org/en-US/firefox/addon/stop-autoplay-next-for-youtube/ -https://addons.mozilla.org/en-US/firefox/addon/tab-notifier/ -https://addons.mozilla.org/en-US/firefox/addon/tab-reloader/ -https://addons.mozilla.org/en-US/firefox/addon/textern/ -https://addons.mozilla.org/en-US/firefox/addon/tile-tabs-we/ -https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ -https://addons.mozilla.org/en-US/firefox/addon/ubo-scope/ -https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher-revived/ -https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/ -https://addons.mozilla.org/en-US/firefox/addon/webrtc-control/ -https://addons.mozilla.org/en-US/firefox/addon/wikipedia-peek/ -https://addons.mozilla.org/en-US/firefox/addon/withexeditor/ -https://addons.mozilla.org/en-US/firefox/addon/yass-we/ -https://addons.mozilla.org/en-US/firefox/addon/youtube-dark-mode/ -https://addons.mozilla.org/en-US/firefox/addon/youtube-hd-1/ -https://addons.mozilla.org/en-US/firefox/addon/zoom-page-we/ - - -https://addons.mozilla.org/en-US/firefox/addon/canvasblocker/ -https://addons.mozilla.org/en-US/firefox/addon/a-cookie-manager/ -https://addons.mozilla.org/en-US/firefox/addon/javascript-warning/ -https://addons.mozilla.org/en-US/firefox/addon/modify-header-value/ -https://addons.mozilla.org/en-US/firefox/addon/webrtc-control/ -https://addons.mozilla.org/en-US/firefox/addon/flash-debugger/ -https://addons.mozilla.org/en-US/firefox/addon/real-nano-defender/ -https://addons.mozilla.org/en-US/firefox/addon/bookmarks-manager-and-viewer/ -https://addons.mozilla.org/en-US/firefox/addon/simple-tab-groups/ -https://addons.mozilla.org/en-US/firefox/addon/try-xpath/ -https://addons.mozilla.org/en-US/firefox/addon/save-image-2-downloads/ -https://addons.mozilla.org/en-US/firefox/addon/history-cleaner/ -https://addons.mozilla.org/en-US/firefox/addon/copy-all-links/ -https://addons.mozilla.org/en-US/firefox/addon/new-hackbar/ -https://addons.mozilla.org/en-US/firefox/addon/new-tab-from-location-bar/ - diff --git a/subprojects/freeamo/src/unmaintained/conf/license-reporter-log~ b/subprojects/freeamo/src/unmaintained/conf/license-reporter-log~ deleted file mode 100644 index 7c65a97..0000000 --- a/subprojects/freeamo/src/unmaintained/conf/license-reporter-log~ +++ /dev/null @@ -1,2 +0,0 @@ -2017-09-19 03:54 Custom list Link rot https://addons.mozilla.org/en-US/firefox/addon/dynamichistory/ -2017-09-19 03:56 Custom list Already in the main repository https://addons.mozilla.org/en-US/firefox/addon// diff --git a/subprojects/freeamo/src/unmaintained/download-custom~ b/subprojects/freeamo/src/unmaintained/download-custom~ deleted file mode 100755 index 3724aba..0000000 --- a/subprojects/freeamo/src/unmaintained/download-custom~ +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash - -# This file is part of FreeAMO -# Copyright (C) 2017 David Hedlund -# -# FreeAMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# FreeAMO is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cd build || exit -mkdir json - -cp -a "$run_path/FreeAMO-custom" custom_addons.txt - -# Sanitize a copy from empty lines, they use to occur at the end of the file -sed -i '/^\s*$/d' FreeAMO-custom - - -sed -i "s|https://addons.mozilla.org/en-US/firefox/addon/||g; s|/||" custom_addons.txt - -rm -fr \ - custom_addons-json-source.txt \ - custom_addons-average_daily_users.txt \ - custom_addons-id.txt custom_addons-slug.txt \ - custom_addons-merged.txt \ - custom_addons-report-expired_links.txt \ - custom_addons-merged-sorted.txt - -cd json || exit - -lines="1"; - -while IFS= read -r slug; do - - - if [ "$debug" == false ] || [ "$debug" == true ] && [ "$lines" -le 3 ]; then - - wget "https://addons.mozilla.org/api/v3/addons/addon/$slug/" -O "$slug.json"; - [ -s "$slug.json" ] || rm -f "$slug.json" # Delete empty files saved by wget, tis is much faster than using wget options to first validate the links. - - # Ignore expired URLs - if [ -f "$slug.json" ]; then - - id="$(jq ".id" "$slug.json")"; - mv "$slug.json" "$id.json" - - if [ "$(jq ".average_daily_users" "$id.json")" -gt "$minimum_average_daily_users" ]; then - - echo -e "$(date +%Y-%m-%d" "%H:%M)\tCustom list\tAlready in the main repository\thttps://addons.mozilla.org/en-US/firefox/addon/$slug/" >> "$run_path/FreeAMO-log" - - else - - jq ".average_daily_users" "$id.json" >> ../custom_addons-average_daily_users.txt - - # We need the JSON source because they are different for search indexed add-ons (they are store in index.html*) - jq ".id" "$id.json" >> ../custom_addons-id.txt - echo "$(jq ".id" "$id.json").json" >> ../custom_addons-json-source.txt - - ((lines++)) - - - fi - - - else - - echo -e "$(date +%Y-%m-%d" "%H:%M)\tCustom list\tLink rot\t\t\thttps://addons.mozilla.org/en-US/firefox/addon/$slug/" >> "$run_path/FreeAMO-log" - - fi - - fi - -done < ../custom_addons.txt - -# Sort by average_daily_users -paste ../custom_addons-average_daily_users.txt ../custom_addons-id.txt ../custom_addons-json-source.txt > ../custom_addons-merged.txt -sort -k1,1nr ../custom_addons-merged.txt > ../merged-custom.txt diff --git a/subprojects/freeamo/src/unmaintained/download-free-webextensions~ b/subprojects/freeamo/src/unmaintained/download-free-webextensions~ deleted file mode 100644 index dd02d52..0000000 --- a/subprojects/freeamo/src/unmaintained/download-free-webextensions~ +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -cd build || exit -rm -fr free_webextensions -mkdir free_webextensions -cd free_webextensions || exit - - - -# Begin template -unset file -while IFS= read -r table; do - - verify_variables "$1" - - if [ "$approved_program" = true ]; then - - # End template - - id=$(echo $table | awk '{print $2}'); - file=$(echo $table | awk '{print $3}'); - slug=$(echo $table | awk '{print $4}'); - - # Add-ons not avalible for GNU/Linux will be ignored (used to be very few dough). - wget -nc "https://addons.mozilla.org/firefox/downloads/latest/$slug/addon-$id-latest.xpi" || wget -nc "https://addons.mozilla.org/firefox/downloads/latest/$slug/platform:2/addon-$id-latest.xpi" - - - - # Begin template - fi - - ((line++)) - -done < $run_path/build/MERGED-ALL-freedom_status.txt -# End template diff --git a/subprojects/freeamo/src/unmaintained/make-collection-list~ b/subprojects/freeamo/src/unmaintained/make-collection-list~ deleted file mode 100644 index 2e65310..0000000 --- a/subprojects/freeamo/src/unmaintained/make-collection-list~ +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -cd build/ || exit -for i in $(cat ../FreeAMO-collections); do - - # https://addons.mozilla.org/en-US/firefox/collections/DavidHedlund/webextensions/format%3Ajson - collection_name=$(echo $i | sed "s|https://addons.mozilla.org/en-US/firefox/collections/||; s|/|-|; s|/$||"); - wget $i"format%3Ajson" -O "collection-$collection_name.json" - -done diff --git a/subprojects/freeamo/src/unmaintained/make-repository-list~ b/subprojects/freeamo/src/unmaintained/make-repository-list~ deleted file mode 100644 index 97dc82d..0000000 --- a/subprojects/freeamo/src/unmaintained/make-repository-list~ +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -# It is ok to distribute only-free programs on addons.mozilla.org even if they distribute nonfree programs. -# This function requires _much_ less maintainance for custom add-on's, you don't need to manually sync -# your addons.mozilla.org collection list with a separate text file. - -# https://github.com/mozilla/addons/issues/722 -# Cannot list collections in desired formats -# Cannot get a list of names of Collections from other users like https://addons.mozilla.org/collections/mozilla/ without authenication (see https://addons-server.readthedocs.io/en/latest/topics/api/collections.html#list). -# So we have to parse it from HTML. - - -# Get the links to the collections - -function get_repositories { - - check_type="repositories"; - check_files - - cd build/ || exit - - for i in $(cat ../FreeAMO-repositories); do - - user=$(echo $i | sed "s|https://addons.mozilla.org/en-US/firefox/collections/||; s|/||;"); - rm -f repository-$user - - - function wget_repository { - - match="^ <a href=\"/en-US/firefox/collections/" - wget -qO- $i$wget_repository__page_extension | grep "$match" | sed "s|$match|https://addons.mozilla.org/en-US/firefox/collections/|; s|\">||" >> repository-$user - - } - - # Figure out if there are several pages - number_of_pages=$(wget -qO- $i | grep "?page=" | tail -n 2 | head -n 1 | sed "s|page=|\npage=|g; s|\"|\n\"|g" | grep "page=" | sed "s|page=||"); - - if [ -z "$number_of_pages" ]; then - - echo "$i doesn't have any sub pages"; - wget_repository - - else - - echo "$i has sub pages"; - - page_number=1; - - while [ $page_number -le $number_of_pages ] - do - - wget_repository__page_extension="?page=$page_number"; - echo "$wget_repository__page_extension" - wget_repository - page_number=$(( $page_number + 1 )) - - done - - fi - - done -} -get_repositories - - -# Download the JSON files from the collections - -cd .. -for x in $(find build/ -name repository* | sort); do - - for i in $(cat $x); do - - collection_name=$(echo $i | sed "s|https://addons.mozilla.org/en-US/firefox/collections/||; s|/|-|; s|/$||"); - wget $i"format%3Ajson" -O "build/collection-$collection_name.json" - - done - -done diff --git a/subprojects/freeamo/src/unmaintained/make-xml~ b/subprojects/freeamo/src/unmaintained/make-xml~ deleted file mode 100644 index 557c7e4..0000000 --- a/subprojects/freeamo/src/unmaintained/make-xml~ +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Deprecated. - - - # XML pages look like this: - #... - # <sha1>tlybh1k9mnxz92kccg46hqv9jvyrkp0</sha1> - # </revision> - # </page> - #</mediawiki> - # - # However. It's not possible to insert the checsum in <sha1> for the page since it will break the checksum itself. - - # Get number of edits: - revid="$(wget -qO- "https://directory.fsf.org/w/api.php?action=query&list=recentchanges&rclimit=1&format=json" | jq .query.recentchanges[0].revid)"; - xml_header="$(wget -qO- "https://directory.fsf.org/wiki/Special:Export/Main_Page" | head -n 42)"; diff --git a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__intro.txt~ b/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__intro.txt~ deleted file mode 100644 index 4b526c9..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__intro.txt~ +++ /dev/null @@ -1,12 +0,0 @@ -I'm working as a volunteer for the Free Software Directory as an administrator. Your program -is free software so in principle it should be listed there, and I'd like to -add it. But it has some problems in showing what its license is. -Would you please fix them, for the sake of users and other developers? - -Once your version with fixed license issues is public available on addons.mozilla.org_ENTRY we will review it, and if it meet our requirement I will approve http://directory.fsf.org/wiki/FSD_FULL_SOFTWARE_NAME. Once approved it will be listed on the official GNU IceCat add-on list at https://directory.fsf.org/wiki/IceCat. GNU IceCat is the GNU variant of Firefox. - -See https://addons.mozilla.org/en-US/firefox/addon/librejs/ if you want to study a well licensed add-on. - -# Issues - - diff --git a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__license_copy.txt~ b/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__license_copy.txt~ deleted file mode 100644 index 5419295..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue__license_copy.txt~ +++ /dev/null @@ -1,8 +0,0 @@ -## No full copy of the license file included - -There are no full copy of the license file - -The root directory don't have a COPYING file with a copy of the software license. A plain text version of LICENSE LICENSE_VERSION -can be found here: LICENSE_LINK - - diff --git a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue_intro.txt~ b/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue_intro.txt~ deleted file mode 100644 index 123d39e..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/issue_intro.txt~ +++ /dev/null @@ -1,99 +0,0 @@ -I'm working as a volunteer for the Free Software Directory. Your program -is free software so in principle it should be listed there, and I'd like to -add it. But it has some problems in showing what its license is. -Would you please fix them, for the sake of users and other developers? - -Once your version with fixed license issues is public available on addons.mozilla.org_ENTRY we will review it, and if it meet our requirement I will approve http://directory.fsf.org/wiki/FSD_FULL_SOFTWARE_NAME. Once approved it will be listed on the official GNU IceCat add-on list at https://directory.fsf.org/wiki/IceCat. GNU IceCat is the GNU variant of Firefox. - -See https://addons.mozilla.org/en-US/firefox/addon/librejs/ if you want to study a well licensed add-on. - -# Issues - -## License not displayed -addons.mozilla.org_ENTRY do not list "Released under". - -## No full copy of the license file included - -There are no full copy of the license file - -The root directory don't have a COPYING file with a copy of the software license. A plain text version of LICENSE LICENSE_VERSION -can be found here: LICENSE_LINK - -## Lack of full license headers in each file - -There are no (full) license notices in the non-trivial source files - -The source files in FULL_SOFTWARE_NAME don't have notices saying you are the copyright -holder and/or that they are released under LICENSE LICENSE_VERSION. -I'm writing to ask you to please put a notice on each nontrivial source file. - -Selecting a license on a website that hosts the add-on (like addons.mozilla.org), will only show it there, the source files won't be modified. - -First, here's why license notices are needed. - -The purpose of a license notice is to state formally that a certain -file may be used under the terms of a particular license. - -The LICENSE, like most free software licenses, applies to whatever -material is released under that license. It does not say anything -about which programs are released that way. - -Therefore, simply including a copy of the LICENSE with some code -does not release the code under the terms of the LICENSE. -To do that, you need a license notice, which says, more or less, -"We the copyright holders release this code under the LICENSE." - -The source files should be accompanied by a copyright notice, which says who -"we" copyright holders are. That takes the form "Copyright YEAR NAME". - -For the LICENSE, there are two other reasons for a license notice: to say -which version of the LICENSE applies, and (for LICENSE LICENSE_VERSION), to say whether the -LICENSE's option of GPL compatibility applies. It is enabled by default -in LICENSE LICENSE_VERSION, but users should have an explicit statement of where things -stand for any particular code. The license notice is where you -specify this. - -Why should the license notice be on _each_ source file? -Because doing it at the package level is error-prone. - -In the free software community, it is not unusual to copy a file from -a free program into some other context. If the source file doesn't -have its own license notice, then its licensing comes from the -original context. In the other context, its licensing may not be -clear. It may not be stated at all, or it could be stated wrong. For -instance, what if the other program says, "This program is released -under Apache 2.0", or "This program is released under GNU GPL, version -3 or any later version published by the Free Software Foundation." - -The result would be to misinform users about the file's licensing. - -People sometimes copy part of a file, too. If the file has a license -notice, people know to preserve that notice when copying part of the -file's code. Otherwise, the licensing will probably get lost. - -A different problem can happen if you copy code _into_ FULL_SOFTWARE_NAME from -some other package. Your package-level license notice would say it is -under LICENSE LICENSE_VERSION, but what if it actually carries some other license, -such as Apache 2.0, or GPL Version 3 or later? - -Keeping a license notice in each file is the way to reliably show -users what their rights are. Please don't let uncertainty creep in. - -You've made a decision about the license -- would you please announce -it in a way that won't get forgotten? - -Other people can use your work with bad intentions, even if the mistake were honestly -unintentional. That is why, unfortunately, we have to take lots of time with verifying -the legality of everything. - -See https://www.gnu.org/licenses/gpl-howto.en.html for how to apply license notices. - - -# Licenseutils -* sudo apt-get install licenseutils -* Licenseutils [0.0.8 can edit .js](https://savannah.nongnu.org/bugs/index.php?49441#comment24) files (see [patch](http://git.savannah.gnu.org/cgit/licenseutils.git/commit/?id=0d365160cc0fb6d0ed5eb26cf6e762278867e653)). If you use a earlier version you need to temporary rename your .js files to .cpp (Javascript comments are the same as c++) until JS have been implemented (see [fix](https://savannah.nongnu.org/bugs/?49441)) and then rename them back to .js. -* Run this but with your name/copyright year/license: licensing notice -c 'Yoyodyne,\ Inc.\ 2001' -l gpl -s c -n *.cpp - -# References -These issues are compatible with the policy listed in [Free Software Directory, Requirements](https://directory.fsf.org/wiki?title=Free_Software_Directory:Requirements). - diff --git a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/outro.txt~ b/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/outro.txt~ deleted file mode 100644 index 123d39e..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/outro.txt~ +++ /dev/null @@ -1,99 +0,0 @@ -I'm working as a volunteer for the Free Software Directory. Your program -is free software so in principle it should be listed there, and I'd like to -add it. But it has some problems in showing what its license is. -Would you please fix them, for the sake of users and other developers? - -Once your version with fixed license issues is public available on addons.mozilla.org_ENTRY we will review it, and if it meet our requirement I will approve http://directory.fsf.org/wiki/FSD_FULL_SOFTWARE_NAME. Once approved it will be listed on the official GNU IceCat add-on list at https://directory.fsf.org/wiki/IceCat. GNU IceCat is the GNU variant of Firefox. - -See https://addons.mozilla.org/en-US/firefox/addon/librejs/ if you want to study a well licensed add-on. - -# Issues - -## License not displayed -addons.mozilla.org_ENTRY do not list "Released under". - -## No full copy of the license file included - -There are no full copy of the license file - -The root directory don't have a COPYING file with a copy of the software license. A plain text version of LICENSE LICENSE_VERSION -can be found here: LICENSE_LINK - -## Lack of full license headers in each file - -There are no (full) license notices in the non-trivial source files - -The source files in FULL_SOFTWARE_NAME don't have notices saying you are the copyright -holder and/or that they are released under LICENSE LICENSE_VERSION. -I'm writing to ask you to please put a notice on each nontrivial source file. - -Selecting a license on a website that hosts the add-on (like addons.mozilla.org), will only show it there, the source files won't be modified. - -First, here's why license notices are needed. - -The purpose of a license notice is to state formally that a certain -file may be used under the terms of a particular license. - -The LICENSE, like most free software licenses, applies to whatever -material is released under that license. It does not say anything -about which programs are released that way. - -Therefore, simply including a copy of the LICENSE with some code -does not release the code under the terms of the LICENSE. -To do that, you need a license notice, which says, more or less, -"We the copyright holders release this code under the LICENSE." - -The source files should be accompanied by a copyright notice, which says who -"we" copyright holders are. That takes the form "Copyright YEAR NAME". - -For the LICENSE, there are two other reasons for a license notice: to say -which version of the LICENSE applies, and (for LICENSE LICENSE_VERSION), to say whether the -LICENSE's option of GPL compatibility applies. It is enabled by default -in LICENSE LICENSE_VERSION, but users should have an explicit statement of where things -stand for any particular code. The license notice is where you -specify this. - -Why should the license notice be on _each_ source file? -Because doing it at the package level is error-prone. - -In the free software community, it is not unusual to copy a file from -a free program into some other context. If the source file doesn't -have its own license notice, then its licensing comes from the -original context. In the other context, its licensing may not be -clear. It may not be stated at all, or it could be stated wrong. For -instance, what if the other program says, "This program is released -under Apache 2.0", or "This program is released under GNU GPL, version -3 or any later version published by the Free Software Foundation." - -The result would be to misinform users about the file's licensing. - -People sometimes copy part of a file, too. If the file has a license -notice, people know to preserve that notice when copying part of the -file's code. Otherwise, the licensing will probably get lost. - -A different problem can happen if you copy code _into_ FULL_SOFTWARE_NAME from -some other package. Your package-level license notice would say it is -under LICENSE LICENSE_VERSION, but what if it actually carries some other license, -such as Apache 2.0, or GPL Version 3 or later? - -Keeping a license notice in each file is the way to reliably show -users what their rights are. Please don't let uncertainty creep in. - -You've made a decision about the license -- would you please announce -it in a way that won't get forgotten? - -Other people can use your work with bad intentions, even if the mistake were honestly -unintentional. That is why, unfortunately, we have to take lots of time with verifying -the legality of everything. - -See https://www.gnu.org/licenses/gpl-howto.en.html for how to apply license notices. - - -# Licenseutils -* sudo apt-get install licenseutils -* Licenseutils [0.0.8 can edit .js](https://savannah.nongnu.org/bugs/index.php?49441#comment24) files (see [patch](http://git.savannah.gnu.org/cgit/licenseutils.git/commit/?id=0d365160cc0fb6d0ed5eb26cf6e762278867e653)). If you use a earlier version you need to temporary rename your .js files to .cpp (Javascript comments are the same as c++) until JS have been implemented (see [fix](https://savannah.nongnu.org/bugs/?49441)) and then rename them back to .js. -* Run this but with your name/copyright year/license: licensing notice -c 'Yoyodyne,\ Inc.\ 2001' -l gpl -s c -n *.cpp - -# References -These issues are compatible with the policy listed in [Free Software Directory, Requirements](https://directory.fsf.org/wiki?title=Free_Software_Directory:Requirements). - diff --git a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/request~ b/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/request~ deleted file mode 100755 index 76dbaa4..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/Text_templates/request~ +++ /dev/null @@ -1,314 +0,0 @@ -#!/bin/bash - -function request() { - - if [ "$sent_to" != "" ]; then - - echo " -{{Checkme item -|Package=$FULL_SOFTWARE_NAME -|Package note=$sent_to -}}"; - - else - - - echo "########################################################################################## -$FULL_SOFTWARE_NAME -"; - - - cat issue__intro.txt > output.txt - - if [ "$issue__license_copy" = "Yes" ]; then - - cat issue__license_copy.txt >> output.txt - - fi - - if [ "$issue__license_not_displayed_on_AMO" = "Yes" ]; then - - cat issue__license_not_displayed_on_AMO.txt >> output.txt - - fi - - - if [ "$issue__lack_of_full_license_headers_in_each_file" = "Yes" ]; then - - cat issue__lack_of_full_license_headers_in_each_file.txt >> output.txt - - fi - - - sed -i " -s|FSD_FULL_SOFTWARE_NAME|$FSD_FULL_SOFTWARE_NAME| -s|FULL_SOFTWARE_NAME|$FULL_SOFTWARE_NAME| -s|addons.mozilla.org_ENTRY|$addons_mozilla_org_ENTRY| -s|LICENSE_VERSION|$LICENSE_VERSION| -s|LICENSE_LINK|$LICENSE_LINK| -s|LICENSE|$LICENSE| -" output.txt - - cat outro.txt >> output.txt - cat output.txt - - fi - -} - - - - - -#TEMPLATE -FULL_SOFTWARE_NAME=""; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY=""; -LICENSE=""; -LICENSE_VERSION=""; -LICENSE_LINK=""; -issue__license_not_displayed_on_AMO=""; -issue__license_copy=""; -issue__lack_of_full_license_headers_in_each_file=""; -sent_to=""; - - -FULL_SOFTWARE_NAME="Bookmarks Manager and Viewer"; -FSD_FULL_SOFTWARE_NAME="Bookmarks_Manager_and_Viewer"; -addons_mozilla_org_ENTRY="bookmarks-manager-and-viewer/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/inbasic/bookmarks-manager/issues/6"; -request - -FULL_SOFTWARE_NAME="Cookie AutoDelete"; -FSD_FULL_SOFTWARE_NAME="Cookie_AutoDelete"; -addons_mozilla_org_ENTRY="cookie-autodelete/"; -LICENSE="MIT/X11"; -LICENSE_VERSION=""; -LICENSE_LINK="http://www.opensource.org/licenses/mit-license.php"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="No"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/mrdokenny/Cookie-AutoDelete/issues/129"; -request - -FULL_SOFTWARE_NAME="Ageless for YouTube"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/ageless/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/ageless/reviews/914361/"; -request - -FULL_SOFTWARE_NAME="Bloody Vikings!"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/bloody-vikings/"; -LICENSE="GPL"; -LICENSE_VERSION="3.0"; -LICENSE_LINK="https://www.gnu.org/licenses/gpl-3.0.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="No"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/bloody-vikings/reviews/914363/, florian+amo@florianfieber.de"; -request - -FULL_SOFTWARE_NAME="Bulk Media Downloader"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/bulk-media-downloader/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/inbasic/bulk-media-downloader/issues/12"; -request - -FULL_SOFTWARE_NAME="DynamicHistory"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/dynamichistory/"; -LICENSE="MIT/X11"; -LICENSE_VERSION=""; -LICENSE_LINK="http://www.opensource.org/licenses/mit-license.php"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="No"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/dynamichistory/reviews/914375/, me@nulldev.xyz"; -request - -FULL_SOFTWARE_NAME="Easy Youtube Video Downloader Express"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/easy-youtube-video-download/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/easy-youtube-video-download/reviews/914406/"; -request - -FULL_SOFTWARE_NAME="Flash Block (Plus)"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/noflash/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/noflash/reviews/914401/, arl1232smg@yahoo.com"; -request - -FULL_SOFTWARE_NAME="Forecastfox (fix version)"; -FSD_FULL_SOFTWARE_NAME="Forecastfox_(fix_version)"; -addons_mozilla_org_ENTRY="forecastfox-fix-version/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/forecastfox-fix-version/reviews/913786/, senselius@gmail.com"; -request - -FULL_SOFTWARE_NAME="Mute all inactive tabs"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/mute-all-inactive-tabs/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/evilpie/mute-all-inactive-tabs/issues/1"; -request - -FULL_SOFTWARE_NAME="Org Capture"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/org-capture/"; -LICENSE="MIT/X11"; -LICENSE_VERSION=""; -LICENSE_LINK="http://www.opensource.org/licenses/mit-license.php"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="No"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/sprig/org-capture-extension/issues/34"; -request - -FULL_SOFTWARE_NAME="Popup Blocker (strict)"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/popup-blocker/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/schomery/popup-blocker/issues/55"; -request - -FULL_SOFTWARE_NAME="Session Manager"; -FSD_FULL_SOFTWARE_NAME="Session_Manager"; -addons_mozilla_org_ENTRY="session-manager/"; -LICENSE="MPL"; -LICENSE_VERSION="1.1"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/1.1/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/yass-we/reviews/913742/, morac99-firefox2@yahoo.com"; -request - -FULL_SOFTWARE_NAME="Simple Form Fill"; -FSD_FULL_SOFTWARE_NAME="Simple_Form_Fill"; -addons_mozilla_org_ENTRY="simple-form-fill/"; -LICENSE="MIT/X11"; -LICENSE_VERSION=""; -LICENSE_LINK="http://opensource.org/licenses/MIT"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/sblask/webextension-simple-form-fill/issues/14"; -request - -FULL_SOFTWARE_NAME="Sky Timer"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/sky-timer/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/sky-timer/reviews/914414/, easyappdeveloper1@gmail.com"; -request - -FULL_SOFTWARE_NAME="To Google Translate"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/to-google-translate/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="No"; -sent_to="https://github.com/itseco/to-google-translate/issues/7"; -request - -FULL_SOFTWARE_NAME="Wayback Machine"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY=""; -LICENSE="GPL"; -LICENSE_VERSION="3.0"; -LICENSE_LINK="https://www.gnu.org/licenses/gpl-3.0.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="No"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/wayback-machine_new/reviews/914416/, info@archive.org"; -request - -FULL_SOFTWARE_NAME="WebRTC Control"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/webrtc-control/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/webrtc-control/reviews/914382/, dlinBernard@yahoo.com"; -request - -FULL_SOFTWARE_NAME="Yet Another Smooth Scrolling WE"; -FSD_FULL_SOFTWARE_NAME="Simple_Form_Fill"; -addons_mozilla_org_ENTRY="simple-form-fill/"; -LICENSE="BSD License"; -LICENSE_VERSION="(2-Clause)"; -LICENSE_LINK="http://www.opensource.org/licenses/bsd-license.php"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://addons.mozilla.org/en-US/firefox/addon/yass-we/reviews/913742/, kataho.mail@gmail.com"; -request - -FULL_SOFTWARE_NAME="YouTube in HD (720p, 1080p, 1440p, 2160p)"; -FSD_FULL_SOFTWARE_NAME=$(echo "$FULL_SOFTWARE_NAME" | sed -e "s| |_|g"); -addons_mozilla_org_ENTRY="https://addons.mozilla.org/en-US/firefox/addon/youtube-hd-1/"; -LICENSE="MPL"; -LICENSE_VERSION="2.0"; -LICENSE_LINK="https://www.mozilla.org/media/MPL/2.0/index.txt"; -issue__license_not_displayed_on_AMO="No"; -issue__license_copy="Yes"; -issue__lack_of_full_license_headers_in_each_file="Yes"; -sent_to="https://github.com/james-fray/YouTube-HD/issues/6"; -request diff --git a/subprojects/freeamo/src/unmaintained/sync-data/fsd-amo-bot~ b/subprojects/freeamo/src/unmaintained/sync-data/fsd-amo-bot~ deleted file mode 100755 index 8f1d6f3..0000000 --- a/subprojects/freeamo/src/unmaintained/sync-data/fsd-amo-bot~ +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/bash - -# Copyright 2016, 2017 David Hedlund -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# https://addons-server.readthedocs.io/en/latest/topics/api/addons.html -# Add to wiki and remove: echo "|Name=$(xmlstarlet sel -t -v "addon/name" test.xml)" - -SCRIPTSRC=$(readlink -f "$0" || echo "$0") -RUN_PATH=$(dirname "${SCRIPTSRC}" || echo .) - -if [ ! -f /usr/bin/jq ]; then echo "/usr/bin/jq not found!"; exit=true; fi -if [ ! -f /usr/bin/wget ]; then echo "/usr/bin/wget not found!"; exit=true; fi - -if [[ $exit == true ]]; then exit 1; fi - - -if [ ! -d "build" ]; then mkdir -p build; fi - -retrive () { -api="$(echo $url | sed "s|https://addons.mozilla.org/en-US/firefox/addon/|https://addons.mozilla.org/api/v3/addons/addon/|g;")"; -slug="$(echo $url | sed "s|https://addons.mozilla.org/en-US/firefox/addon/||g; s|/||g")"; -} - -xpi () { - cd build/ - echo "$download" > tmp.txt - sed -i "s|/addon-|\naddon-|" tmp.txt - xpi=$(grep ".xpi" tmp.txt); - fbname=$(basename "$xpi" | cut -d. -f1); -} - - -case "$1" in - --get-json) - - if [ ! -d "build/amo/json" ]; then mkdir -p build/amo/json; fi - if [ ! -d "build/amo/json.versions" ]; then mkdir -p build/amo/json.versions; fi - cd build/amo/ - - while read url; do - - retrive - wget $api -O json/$slug.json - wget $api\versions/$(cat json/$slug.json | jq '.current_version.id')/ -O json.versions/$slug.json - - done < ../../amo-repo.txt - - # List obsoleted projects - find json/ -size 0 -print - - ;; - --get-xpi-url) - - cd build/ - rm -f amo_repo-latest_download.txt - for i in $(find amo/json/ -maxdepth 1 -type f); do echo "https://addons.mozilla.org/firefox/downloads/latest/$(basename $i | sed "s|.json||")/addon-$(cat $i | jq '.current_version.id').xpi" >> amo_repo-latest_download.txt; done - - ;; - - --get-xpi) - - if [ ! -d "build/amo/xpi" ]; then mkdir -p build/amo/xpi; fi - - while read download; do - - xpi - - if [ ! -f amo/xpi/$xpi ]; then - - cd amo/xpi/ - wget $download - cd .. - - fi - - cd .. - - - done < build/amo_repo-latest_download.txt - - ;; - - --xpi-extract) - - if [ ! -d "build/amo/xpi.extracted" ]; then mkdir -p build/amo/xpi.extracted; fi - - while read download; do - - xpi - - if [ ! -d amo/xpi.extracted/$fbname ]; then - - mkdir -p amo/xpi.extracted/$fbname - cd amo/xpi.extracted/$fbname - unzip ../../xpi/$xpi - cd ../../ - - fi - - cd .. - - done < build/amo_repo-latest_download.txt - - ;; - - --make-xml) - - if [ ! -d "build/fsd" ]; then mkdir -p build/fsd; fi - - # Get number of edits: - wget "https://directory.fsf.org/w/api.php?action=query&list=recentchanges&rclimit=1" -O fsdedits.xml - oldrevid="$(grep revid fsdedits.xml | sed "s|"||g; s|revid|\nrevid|; s|old_revid|\n|" | grep revid | sed "s|revid=||")" - newrevid=$(expr 1 + $oldrevid) - - cd build/ - - while read url; do - - retrive - # List JSON structure: cat amo/json/$slug.json | js '.' - # XML value "homepage" is not always set in AMO API, but the FSD require "Homepage URL" to be set: Therfore we use the AMO page itself in Homepage URL to complete the build of the repo automatically. - echo "<mediawiki xmlns=\"http://www.mediawiki.org/xml/export-0.7/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd\" version=\"0.7\" xml:lang=\"en\"> - <siteinfo> - <sitename>Free Software Directory</sitename> - <base>https://directory.fsf.org/wiki/Main_Page</base> - <generator>MediaWiki 1.20.2</generator> - <case>first-letter</case> - <namespaces> - <namespace key=\"-2\" case=\"first-letter\">Media</namespace> - <namespace key=\"-1\" case=\"first-letter\">Special</namespace> - <namespace key=\"0\" case=\"first-letter\" /> - <namespace key=\"1\" case=\"first-letter\">Talk</namespace> - <namespace key=\"2\" case=\"first-letter\">User</namespace> - <namespace key=\"3\" case=\"first-letter\">User talk</namespace> - <namespace key=\"4\" case=\"first-letter\">Free Software Directory</namespace> - <namespace key=\"5\" case=\"first-letter\">Free Software Directory talk</namespace> - <namespace key=\"6\" case=\"first-letter\">File</namespace> - <namespace key=\"7\" case=\"first-letter\">File talk</namespace> - <namespace key=\"8\" case=\"first-letter\">MediaWiki</namespace> - <namespace key=\"9\" case=\"first-letter\">MediaWiki talk</namespace> - <namespace key=\"10\" case=\"first-letter\">Template</namespace> - <namespace key=\"11\" case=\"first-letter\">Template talk</namespace> - <namespace key=\"12\" case=\"first-letter\">Help</namespace> - <namespace key=\"13\" case=\"first-letter\">Help talk</namespace> - <namespace key=\"14\" case=\"first-letter\">Category</namespace> - <namespace key=\"15\" case=\"first-letter\">Category talk</namespace> - <namespace key=\"102\" case=\"first-letter\">Property</namespace> - <namespace key=\"103\" case=\"first-letter\">Property talk</namespace> - <namespace key=\"106\" case=\"first-letter\">Form</namespace> - <namespace key=\"107\" case=\"first-letter\">Form talk</namespace> - <namespace key=\"108\" case=\"first-letter\">Concept</namespace> - <namespace key=\"109\" case=\"first-letter\">Concept talk</namespace> - <namespace key=\"170\" case=\"first-letter\">Filter</namespace> - <namespace key=\"171\" case=\"first-letter\">Filter talk</namespace> - <namespace key=\"500\" case=\"first-letter\">Review</namespace> - <namespace key=\"501\" case=\"first-letter\">Review talk</namespace> - <namespace key=\"502\" case=\"first-letter\">License</namespace> - <namespace key=\"503\" case=\"first-letter\">License talk</namespace> - <namespace key=\"510\" case=\"first-letter\">Collection</namespace> - <namespace key=\"511\" case=\"first-letter\">Collection talk</namespace> - <namespace key=\"520\" case=\"first-letter\">Org</namespace> - <namespace key=\"521\" case=\"first-letter\">Org talk</namespace> - </namespaces> - </siteinfo> - <page> - <title>IceCat/$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.name.enUS' | sed "s|^\"||; s|\"$||;")</title> - <revision> - <id>$newrevid</id> - <timestamp>$(date -u +%Y-%m-%dT%H:%M:%SZ)</timestamp> - <contributor> - <username>amo-import</username> - <id>1501</id> - </contributor> - <sha1>kj1p9nd2p15bqr2tb7jkihshlxow11y</sha1> - <text xml:space=\"preserve\" bytes=\"2687\">{{Entry" > fsd/$slug.xml - - # Dash have to be removed in jq 1.3: https://github.com/stedolan/jq/issues/341 - echo "|Name=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.name.enUS' | sed "s|^\"||; s|\"$||;") -|Short description=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.summary.enUS' | sed "s|^\"||; s|\"$||; s|\\\n|\n|g; s|\\\\\"|\"|g;") -|Full description=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.description.enUS' | sed "s|^\"||; s|\"$||; s|\\\n|\n|g; s|\\\\\"|\"|g;") -|Homepage URL=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.homepage.enUS' | sed "s|^\"||; s|\"$||;")" >> fsd/$slug.xml - - - if [[ "$(cat amo/json/$slug.json | jq '.current_version.compatibility.seamonkey')" != "null" ]]; then - set_seamonkey="SeaMonkey,"; - fi - - if [[ "$(cat amo/json/$slug.json | jq '.current_version.compatibility.firefox')" != "null" ]]; then - set_icecat="IceCat,"; - fi - - if [[ "$(cat amo/json/$slug.json | jq '.current_version.compatibility.android')" != "null" ]]; then - set_icecatmobile="IceCatMobile,"; - fi - - if [[ "$(cat amo/json/$slug.json | jq '.current_version.compatibility.mobile')" != "null" ]]; then - set_icecatmobile="IceCatMobile,"; - fi - - if [[ "$(cat amo/json/$slug.json | jq '.current_version.compatibility.thunderbird')" != "null" ]]; then - set_thunderbird="Thunderbird,"; - fi - - echo "|Extension of=$(echo "$set_seamonkey$set_icecat$set_icecatmobile$set_thunderbird" | sed "s|,$||;")" >> fsd/$slug.xml - - - if [[ "$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.homepage.enUS' | grep "github.com")" != "null" ]]; then - echo "|VCS checkout command=git clone $(cat amo/json/$slug.json | sed "s|-||g;" | jq '.homepage.enUS' | sed "s|^\"||; s|\"$||;")" >> fsd/$slug.xml - fi - -echo "|VCS checkout command=git clone $(cat amo/json/$slug.json | sed "s|-||g;" | jq '.homepage.enUS' | sed "s|^\"||; s|\"$||;")"; - echo "|Version identifier=$(cat amo/json/$slug.json | jq '.current_version.version' | sed "s|^\"||; s|\"$||;") -|Version date=$(cat amo/json/$slug.json | jq '.last_updated' | sed "s|^\"||; s|\"$||;") -|Version download=https://addons.mozilla.org/firefox/downloads/latest/$slug/addon-$(cat amo/json/$slug.json | jq '.current_version.id')-latest.xpi -|Last review by=FSDbot -|Last review date=$(date +"%Y/%m/%d") -|Submitted by=FSDbot -|Submitted date=2017/02/01 -|Is GNU=No -}}" >> fsd/$slug.xml - - - # https://addons.mozilla.org/api/v3/addons/addon/noscript/versions/1910123/ - echo "{{Project license - -# Stuck here (have to use old API until this have been fixed): https://github.com/mozilla/addons-server/issues/3936 - -|License=$(cat amo/json.versions/$slug.json | sed "s|-||g;" | jq '.license.name.enUS' | sed "s|^\"||; s|\"$||;") -|License copyright=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.authors[].name' | sed "s|^\"||; s|\"$||;") -}}" >> fsd/$slug.xml - - # Homepage URL can be changed by the community so lets do a backup here - echo "{{Resource -|Resource audience=amo-import -|Resource kind=General -|Resource URL=$url -}}" >> fsd/$slug.xml - - - if [[ "$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.support_url[]' | sed "s|^\"||; s|\"$||;")" != "" ]]; - then - - echo "{{Resource -|Resource audience=Users -|Resource kind=Support -|Resource URL=$(cat amo/json/$slug.json | sed "s|-||g;" | jq '.support_url[]' | sed "s|^\"||; s|\"$||;") -}}" >> fsd/$slug.xml - - fi - - # Add "E-mail" here when "Support E-mail" have been added to the API: https://github.com/mozilla/addons-server/issues/3901 - - - echo "{{Featured}}</text> - </revision> - </page> -</mediawiki>" >> fsd/$slug.xml - - cat fsd/$slug.xml - - - - done < ../amo-repo.txt - - - ;; - - - --all) - - $0 --get-json - $0 --get-xpi-url - $0 --get-xpi - $0 --xpi-extract - $0 --make-xml - - ;; - - *) - - echo $"$0 [OPTION] - -OPTIONS - --all - --get-json - --get-xpi-url - --get-xpi - --xpi-extract - --make-xml" - exit 1 - -esac - -exit 0 diff --git a/subprojects/freeamo/src/unmaintained/verify-license-copy-old~ b/subprojects/freeamo/src/unmaintained/verify-license-copy-old~ deleted file mode 100644 index 75d9509..0000000 --- a/subprojects/freeamo/src/unmaintained/verify-license-copy-old~ +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash - -while IFS= read -r id; do - - - - - if [ ! -f "addon-$id-latest.xpi" ]; then - - echo "Nonfree" >> ../VERIFY-LICENSE-COPY.txt - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^LICENSE$"; then - - echo "LICENSE" >> ../VERIFY-LICENSE-COPY.txt - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^LICENSE.txt$"; then - - echo "LICENSE.txt" >> ../VERIFY-LICENSE-COPY.txt - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^LICENSE.md$"; then - - echo "LICENSE.md" >> ../VERIFY-LICENSE-COPY.txt - - - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^COPYING$"; then - - echo "COPYING" >> ../VERIFY-LICENSE-COPY.txt - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^COPYING.txt$"; then - - echo "COPYING.txt" >> ../VERIFY-LICENSE-COPY.txt - - elif unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep -q "^COPYING.md$"; then - - echo "COPYING.md" >> ../VERIFY-LICENSE-COPY.txt - - else - - echo "Request" >> ../VERIFY-LICENSE-COPY.txt - - fi - -done < ../id.txt - - - -line="0"; - -while IFS= read -r status; do - - - ((line++)) - - average_daily_users="$(sed -n ${line}p ../average_daily_users.txt)"; - id="$(sed -n ${line}p ../id.txt)"; - slug="$(sed -n ${line}p ../slug.txt)"; - license_name_en_US="$(sed -n ${line}p ../license.name.enUS.txt)"; - homepage_en_US="$(sed -n ${line}p ../homepage.en-US.txt | sed "s|3A\\/\\/|\n|" | tail -n 1)"; - support_email_en_US="$(sed -n ${line}p ../support_email.en-US.txt)"; - support_url_en_US="$(sed -n ${line}p ../support_url.en-US.txt | sed "s|3A\\/\\/|\n|" | tail -n 1)"; - - - - if [ "$license_name_en_US" == "GNU General Public License, version 3.0" ]; then license_txt="https://www.gnu.org/licenses/gpl-3.0.txt"; license_file_name="COPYING"; - elif [ "$license_name_en_US" == "GNU General Public License, version 2.0" ]; then license_txt="https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt"; license_file_name="COPYING"; - elif [ "$license_name_en_US" == "GNU Lesser General Public License, version 3.0" ]; then license_txt="https://www.gnu.org/licenses/lgpl-3.0.txt"; license_file_name="COPYING"; - elif [ "$license_name_en_US" == "GNU Lesser General Public License, version 2.1" ]; then license_txt="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt"; license_file_name="COPYING"; - elif [ "$license_name_en_US" == "Mozilla Public License, version 2.0" ]; then license_txt="https://www.mozilla.org/media/MPL/2.0/index.txt"; license_file_name="LICENSE"; - elif [ "$license_name_en_US" == "Mozilla Public License Version 1.1" ]; then license_txt="https://www.mozilla.org/media/MPL/1.1/index.txt"; license_file_name="LICENSE"; - elif [ "$license_name_en_US" == "BSD License" ]; then license_txt="https://directory.fsf.org/wiki?title=License:FreeBSD"; license_file_name="LICENSE"; - elif [ "$license_name_en_US" == "MIT/X11 License" ]; then license_txt="https://directory.fsf.org/wiki/License:X11"; license_file_name="LICENSE"; - fi - - - if [ "$(sed -n ${line}p ../name.en-US.txt)" != "null" ]; then name="$(sed -n ${line}p ../name.en-US.txt)"; - elif [ "$(sed -n ${line}p ../name.en-GB.txt)" != "null" ]; then name="$(sed -n ${line}p ../name.en-GB.txt)"; - else name="$slug"; - fi - - - if [ "$status" = "Request" ]; then - - ((count_reports++)) - - # Authors that don't provide contact information will be ignored, its impossible to track conversations in Reviews anyway, because they will be deleted. - - if [ "$homepage_en_US" != "null" ] || [ "$support_url_en_US" != "null" ] || [ "$support_email_en_US" != "null" ]; then - - decimals="$(echo "$average_daily_users" | sed -r ':L;s=\b([0-9]+)([0-9]{3})\b=\1,\2=g;t L')"; - - echo " -$decimals average daily users: $name - https://addons.mozilla.org/en-US/firefox/addon/$slug/ - Request: \"You have distributed $name under $license_name_en_US on https://addons.mozilla.org/en-US/firefox/addon/$slug/, but you have not added a copy of the license. can you please download the text of the license from $license_txt and add save it to file name $license_file_name and put it in the root directory of you program?\" by contacting:"; - - if [ "$homepage_en_US" != "null" ]; then echo " * Homepage (please submit Pull Request for $license_file_name if possible): $homepage_en_US"; fi - if [ "$support_url_en_US" != "null" ]; then echo " * Support URL (please submit Pull Request for $license_file_name if possible): $support_url_en_US"; fi - if [ "$support_email_en_US" != "null" ]; then echo " * Support E-mail: $support_email_en_US"; fi - - fi - - fi - -done < ../VERIFY-LICENSE-COPY.txt - -echo " -######################### -$count_reports reports to submit"; diff --git a/subprojects/freeamo/src/unmaintained/verify-license-copy~ b/subprojects/freeamo/src/unmaintained/verify-license-copy~ deleted file mode 100644 index a77340b..0000000 --- a/subprojects/freeamo/src/unmaintained/verify-license-copy~ +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -cd build || exit -rm -fr VERIFY-LICENSE-COPY.txt -cd free_webextensions || exit - - - -# Begin template -unset file -while IFS= read -r table; do - - verify_variables "$1" - - if [ "$approved_program" = true ]; then - # End template - - id=$(echo $table | awk '{print $2}'); - file=$(echo $table | awk '{print $3}'); - slug=$(echo $table | awk '{print $4}'); - - echo "-------------------------- -$name ($id): $license"; - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "COPYING" - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "COPYING.txt" - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "COPYING.md" - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "LICENSE" - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "LICENSE.txt" - unzip -l "addon-$id-latest.xpi" | awk '{ print $4 }' | grep "LICENSE.md" - - # Begin template - fi - - ((line++)) - -done < $run_path/build/MERGED-ALL-freedom_status.txt -# End template |