5
36
Fork
You've already forked AAA
2

Please share the method used to create Privacy.md #38

Closed
opened 2022年07月04日 04:56:02 +02:00 by rahulduhan · 13 comments
rahulduhan commented 2022年07月04日 04:56:02 +02:00 (Migrated from github.com)
Copy link

Was that a vim macro or a vim script?
Please share so that I could update the list as per new apps!

Was that a vim macro or a vim script? Please share so that I could update the list as per new apps!
Psyhackological commented 2022年07月05日 12:09:04 +02:00 (Migrated from github.com)
Copy link

Yeah... that is an embarrassment. I have not made any script or macro yet. That is why it is very outdated. But I'm going to to it somehow. Love to hear your thoughts or ideas about it. Maybe a regex might help?

Yeah... that is an embarrassment. I have not made any script or macro yet. That is why it is very outdated. But I'm going to to it somehow. Love to hear your thoughts or ideas about it. Maybe a regex might help?
rahulduhan commented 2022年07月05日 21:33:17 +02:00 (Migrated from github.com)
Copy link

Ok

Ok
rahulduhan commented 2022年07月06日 16:52:57 +02:00 (Migrated from github.com)
Copy link

To delete all the links for app link
I used a Ex mode commands
:g/- \[.\]/d

To delete all the links for app link I used a Ex mode commands `:g/- \[.\]/d`
rahulduhan commented 2022年07月06日 16:54:31 +02:00 (Migrated from github.com)
Copy link

Everything else could be manually deleted , I guess

Everything else could be manually deleted , I guess
Psyhackological commented 2022年07月06日 18:48:21 +02:00 (Migrated from github.com)
Copy link

I think about doing some Python regex script and some separate files + merging with commands. However maybe someone has a better idea.

I think about doing some Python regex script and some separate files + merging with commands. However maybe someone has a better idea.
rahulduhan commented 2022年07月06日 19:01:07 +02:00 (Migrated from github.com)
Copy link

Sorry I don't know python

Sorry I don't know python
rahulduhan commented 2022年07月06日 19:03:16 +02:00 (Migrated from github.com)
Copy link

vim scipt?
execute "normal! /### Contents\<ESC>kdgg" and then furthermore I don't know how to add that ex command in vim script... I will learn more about it and update you about the same

vim scipt? `execute "normal! /### Contents\<ESC>kdgg"` and then furthermore I don't know how to add that ex command in vim script... I will learn more about it and update you about the same
Psyhackological commented 2022年07月06日 19:34:36 +02:00 (Migrated from github.com)
Copy link

Well I do not know Vim Script haha

Well I do not know Vim Script haha
Psyhackological commented 2022年07月06日 19:34:46 +02:00 (Migrated from github.com)
Copy link

I've only learnt macros.

I've only learnt macros.
Psyhackological commented 2022年07月06日 19:37:28 +02:00 (Migrated from github.com)
Copy link

I've written this Python code for now. Not much time for the rest of the day, I'm going to relax and come back to it tomorrow.

import re 
from pprint import pprint as pp
with open("README.md", "rt") as README:
 README_text = README.read()
 header_template = """
 # Privacy Report
 See [example](#music-player-go):
 ## Trackers
 The only [trackers](https://reports.exodus-privacy.eu.org/en/trackers/) that the app can have is with `crash reporting` label.
 ## F-Droid Anti-Features
 WIP
 """
 examined = 3
 total_match = re.search(r" __\d{3}__ ", README_text)
 total_str = total_match.group()
 total_int = int(total_str[3:6])
 examined_apps_template = f"Examined apps: __{examined}/{total_int}__ 🕵️\n"
 header_template += examined_apps_template
 contents_index = README_text.find(r"### Contents:")
 special_thanks_index = README_text.find(r"### [Special Thanks](#special-thanks-to)")
 delete_special_thanks = """
 ## Special thanks to:
 ### AWESOME PEOPLE that developed or still develops this AWESOME SOFTWARE.
 ### LinuxCafeFederation/[awesome-android](https://github.com/LinuxCafeFederation/awesome-android)
 <img alt="LinuxCafeFederation/awesome-android" height="64" src="https://avatars.githubusercontent.com/u/66378202?s=200&v=4">
 ### pluja/[awesome-privacy](https://github.com/pluja/awesome-privacy)
 <img alt="pluja/awesome-privacy" width="256" src="https://github.com/pluja/awesome-privacy/raw/main/misc/logo.png">
 ### JStumpp/[awesome-android](https://github.com/JStumpp/awesome-android)
 <img alt="JStumpp/awesome-android" width="256" src="https://raw.githubusercontent.com/jstumpp/awesome-android/master/awesome-android.png">
 ### [AlternativeTo.net](https://alternativeto.net/)
 <img alt="AlternativeTo.net" width="256" src="https://alternativeto.net/static/logo.svg">
 ### [IzzyOnDroid](https://android.izzysoft.de/applists.php)
 <img alt="IzzyOnDroid" height="64" src="https://android.izzysoft.de/images/site_logo.png">
 ### [DivestOS](https://divestos.org/index.php?page=recommended_apps)
 <img alt="DivestOS" width="256" src="https://repository-images.githubusercontent.com/268886326/71242700-7c98-11eb-9864-7f64920e3e16">
 ### [PRISM Break](https://prism-break.org/en/categories/android/)
 <img alt="PRISMBreak" height="64" src="https://gitlab.com/uploads/-/system/project/avatar/7100936/apple-touch-icon-144-precomposed.png">
 ### [Privacy Friendly Apps](https://secuso.aifb.kit.edu/english/105.php)
 <img alt="PrivacyFriendlyApps" width="256" src="https://secuso.aifb.kit.edu/img/csm_PrivacyFriendlyApps_Logo_dadc6afdff.png">
 """
	# Idk why but it does not work yet
 README_text = README_text.replace(delete_special_thanks, '', 1)
 apps_re_compiled = re.compile(r"(##[a-zA-Z\- &2]{3,}\n### .+\n<img alt=.+|### .+\n<img alt=.+)")
 pp(re.findall(apps_re_compiled, README_text))
I've written this Python code for now. Not much time for the rest of the day, I'm going to relax and come back to it tomorrow. ``` python import re from pprint import pprint as pp with open("README.md", "rt") as README: README_text = README.read() header_template = """ # Privacy Report See [example](#music-player-go): ## Trackers The only [trackers](https://reports.exodus-privacy.eu.org/en/trackers/) that the app can have is with `crash reporting` label. ## F-Droid Anti-Features WIP """ examined = 3 total_match = re.search(r" __\d{3}__ ", README_text) total_str = total_match.group() total_int = int(total_str[3:6]) examined_apps_template = f"Examined apps: __{examined}/{total_int}__ 🕵️\n" header_template += examined_apps_template contents_index = README_text.find(r"### Contents:") special_thanks_index = README_text.find(r"### [Special Thanks](#special-thanks-to)") delete_special_thanks = """ ## Special thanks to: ### AWESOME PEOPLE that developed or still develops this AWESOME SOFTWARE. ### LinuxCafeFederation/[awesome-android](https://github.com/LinuxCafeFederation/awesome-android) <img alt="LinuxCafeFederation/awesome-android" height="64" src="https://avatars.githubusercontent.com/u/66378202?s=200&v=4"> ### pluja/[awesome-privacy](https://github.com/pluja/awesome-privacy) <img alt="pluja/awesome-privacy" width="256" src="https://github.com/pluja/awesome-privacy/raw/main/misc/logo.png"> ### JStumpp/[awesome-android](https://github.com/JStumpp/awesome-android) <img alt="JStumpp/awesome-android" width="256" src="https://raw.githubusercontent.com/jstumpp/awesome-android/master/awesome-android.png"> ### [AlternativeTo.net](https://alternativeto.net/) <img alt="AlternativeTo.net" width="256" src="https://alternativeto.net/static/logo.svg"> ### [IzzyOnDroid](https://android.izzysoft.de/applists.php) <img alt="IzzyOnDroid" height="64" src="https://android.izzysoft.de/images/site_logo.png"> ### [DivestOS](https://divestos.org/index.php?page=recommended_apps) <img alt="DivestOS" width="256" src="https://repository-images.githubusercontent.com/268886326/71242700-7c98-11eb-9864-7f64920e3e16"> ### [PRISM Break](https://prism-break.org/en/categories/android/) <img alt="PRISMBreak" height="64" src="https://gitlab.com/uploads/-/system/project/avatar/7100936/apple-touch-icon-144-precomposed.png"> ### [Privacy Friendly Apps](https://secuso.aifb.kit.edu/english/105.php) <img alt="PrivacyFriendlyApps" width="256" src="https://secuso.aifb.kit.edu/img/csm_PrivacyFriendlyApps_Logo_dadc6afdff.png"> """ # Idk why but it does not work yet README_text = README_text.replace(delete_special_thanks, '', 1) apps_re_compiled = re.compile(r"(##[a-zA-Z\- &2]{3,}\n### .+\n<img alt=.+|### .+\n<img alt=.+)") pp(re.findall(apps_re_compiled, README_text)) ```
Psyhackological commented 2022年07月06日 19:38:59 +02:00 (Migrated from github.com)
Copy link

Of course this is a nasty code, however my 1 step is always 🍝 code then some refactoring or something.

Of course this is a nasty code, however my 1 step is always 🍝 __code__ then some refactoring or something.
rahulduhan commented 2022年07月08日 21:06:45 +02:00 (Migrated from github.com)
Copy link

.

.
Psyhackological commented 2022年07月08日 21:48:55 +02:00 (Migrated from github.com)
Copy link

Why not planned?

Why not planned?
Sign in to join this conversation.
No Branch/Tag specified
main
240v2
240
230
220
210
200
190
180
170
160
150
140
130
120
110
100
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Psyhackological/AAA#38
Reference in a new issue
Psyhackological/AAA
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?