-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add index, licence.tldr, linter pipeline and build pipeline
- Loading branch information
Showing
4 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# .github/workflows/build.yml | ||
|
||
name: Build and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.20.0' | ||
|
||
- name: Install and run minify | ||
run: | | ||
go install github.com/tdewolff/minify/v2/cmd/minify@latest | ||
mkdir -p ./pages | ||
minify -r -o ./pages/ ./*.html | ||
cp ./LICENSE* ./pages/ | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
# If you're changing the branch from main, | ||
# also change the `main` in `refs/heads/main` | ||
# below accordingly. | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
checks: write | ||
contents: write | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run htmltest | ||
uses: wjdp/htmltest-action@master | ||
with: | ||
path: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# GNU General Public License v3 (GPL-3) | ||
|
||
You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions. | ||
|
||
## Can | ||
|
||
- Commercial Use | ||
- Modify | ||
- Distribute | ||
- Place Warranty | ||
- Use Patent Claims | ||
|
||
## Cannot | ||
|
||
- Sublicense | ||
- Hold Liable | ||
|
||
## Must | ||
|
||
- Include Original | ||
- State Changes | ||
- Disclose Source | ||
- Include License | ||
- Include Copyright | ||
- Include lnstall Instructions | ||
|
||
--- | ||
|
||
**Disclaimer:** This TL;DR summary is provided for convenience and informational | ||
purposes only. It is not a substitute for the | ||
[full text of the GNU General Public License v3 (GPL-3)](LICENSE). The full license should be | ||
consulted for a comprehensive understanding of your rights and obligations. | ||
In the event of any discrepancies or legal questions, the full license text | ||
takes precedence. | ||
|
||
TL;DR for this licence was taken from | ||
[TLDRLegal](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>5mdt Android Debloat packages Explainer</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 20px; | ||
text-align: center; | ||
} | ||
|
||
h1 { | ||
color: #333; | ||
} | ||
|
||
form { | ||
margin-top: 20px; | ||
} | ||
|
||
label { | ||
display: block; | ||
margin-bottom: 5px; | ||
font-weight: bold; | ||
} | ||
|
||
textarea { | ||
width: 100%; | ||
padding: 10px; | ||
margin-bottom: 10px; | ||
resize: vertical; | ||
} | ||
|
||
button { | ||
padding: 10px; | ||
background-color: #4caf50; | ||
color: white; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
button:hover { | ||
background-color: #45a049; | ||
} | ||
|
||
#resultTable { | ||
margin-top: 20px; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-top: 10px; | ||
} | ||
|
||
th, td { | ||
border: 1px solid #ddd; | ||
padding: 8px; | ||
text-align: left; | ||
} | ||
|
||
th { | ||
background-color: #4caf50; | ||
color: white; | ||
} | ||
|
||
.copyButton { | ||
padding: 5px; | ||
background-color: #008CBA; | ||
color: white; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
.copyButton:hover { | ||
background-color: #007BAA; | ||
} | ||
|
||
.codeBlock { | ||
background-color: #f9f9f9; | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
margin-top: 10px; | ||
white-space: pre-wrap; | ||
} | ||
|
||
.webLinks { | ||
color: #008CBA; | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} | ||
|
||
/* Alternating row colors */ | ||
tr:nth-child(even) { | ||
background-color: #dbdbdb; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>5mdt Android Debloat packages Explainer</h1> | ||
<p>Paste here the result of <b>pm list packages</b> command:</p> | ||
<form id="debloatForm"> | ||
<label for="packagesList">Packages List:</label> | ||
<textarea id="packagesList" name="packagesList" rows="4" cols="50"></textarea> | ||
<br> | ||
<button type="button" onclick="analyzePackages()">Analyze</button> | ||
</form> | ||
|
||
<div id="resultTable"></div> | ||
|
||
<script> | ||
async function fetchJsonData(url) { | ||
const response = await fetch(url); | ||
const data = await response.json(); | ||
return data; | ||
} | ||
|
||
function copyToClipboard(text) { | ||
const tempInput = document.createElement("textarea"); | ||
tempInput.value = text; | ||
document.body.appendChild(tempInput); | ||
tempInput.select(); | ||
document.execCommand("copy"); | ||
document.body.removeChild(tempInput); | ||
} | ||
|
||
async function analyzePackages() { | ||
const packagesList = document.getElementById("packagesList").value; | ||
const packagesArray = packagesList.split('\n').map(line => line.replace(/^package:/, '').trim()); | ||
|
||
const aospData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/aosp.json'); | ||
const carrierData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/carrier.json'); | ||
const googleData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/google.json'); | ||
const miscData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/misc.json'); | ||
const oemData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/oem.json'); | ||
const pendingData = await fetchJsonData('https://raw.githubusercontent.com/MuntashirAkon/android-debloat-list/master/pending.json'); | ||
|
||
const allData = [...aospData, ...carrierData, ...googleData, ...miscData, ...oemData, ...pendingData]; | ||
|
||
const resultTable = document.getElementById("resultTable"); | ||
resultTable.innerHTML = ""; // Clear previous results | ||
|
||
const table = document.createElement("table"); | ||
table.border = "1"; | ||
|
||
const headerRow = table.insertRow(); | ||
for (const key in allData[0]) { | ||
headerRow.insertCell().innerHTML = `<b>${key}</b>`; | ||
} | ||
headerRow.insertCell().innerHTML = "<b>Command</b>"; | ||
|
||
for (const packageName of packagesArray) { | ||
const appInfo = allData.find(data => data.id === packageName); | ||
|
||
const row = table.insertRow(); | ||
if (appInfo) { | ||
for (const key in allData[0]) { | ||
if (key === "web") { | ||
row.insertCell().innerHTML = createWebLinks(appInfo[key]); | ||
} else { | ||
row.insertCell().innerHTML = appInfo[key] !== undefined ? appInfo[key] : ""; | ||
} | ||
} | ||
const commandCell = row.insertCell(); | ||
const command = `pm disable-user --user 0 ${packageName}`; | ||
commandCell.innerHTML = `<button class="copyButton" onclick="copyCommand('${command}')">Copy</button>`; | ||
} else { | ||
row.insertCell().innerHTML = packageName; | ||
for (let i = 1; i < Object.keys(allData[0]).length; i++) { | ||
row.insertCell().innerHTML = ""; | ||
} | ||
const commandCell = row.insertCell(); | ||
const command = `pm disable-user --user 0 ${packageName}`; | ||
commandCell.innerHTML = `<button class="copyButton" onclick="copyCommand('${command}')">Copy</button>`; | ||
} | ||
} | ||
|
||
resultTable.appendChild(table); | ||
} | ||
|
||
function createWebLinks(links) { | ||
if (links && links.length > 0) { | ||
return links.map(link => `<a class="webLinks" href="${link}" target="_blank">${link}</a>`).join('<br>'); | ||
} else { | ||
return ""; | ||
} | ||
} | ||
|
||
function copyCommand(command) { | ||
const resultTable = document.getElementById("resultTable"); | ||
const codeBlock = document.createElement("div"); | ||
codeBlock.className = "codeBlock"; | ||
codeBlock.textContent = command; | ||
resultTable.appendChild(codeBlock); | ||
|
||
copyToClipboard(command); | ||
} | ||
</script> | ||
<p>This page uses data from <a href="https://github.com/MuntashirAkon/android-debloat-list">MuntashirAkon/android-debloat-list</a> repository</p> | ||
</body> | ||
</html> |