Was that a vim macro or a vim script?
Please share so that I could update the list as per new apps!
Please share the method used to create Privacy.md #38
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?
Ok
To delete all the links for app link
I used a Ex mode commands
:g/- \[.\]/d
Everything else could be manually deleted , I guess
I think about doing some Python regex script and some separate files + merging with commands. However maybe someone has a better idea.
Sorry I don't know python
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
Well I do not know Vim Script haha
I've only learnt macros.
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))
Of course this is a nasty code, however my 1 step is always 🍝 code then some refactoring or something.
.
Why not planned?
No due date set.
No dependencies set.
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?