Skip to content

Commit 3431ef9

Browse files
Added instructions on how this repository was created
1 parent 6acc034 commit 3431ef9

File tree

2 files changed

+168
-1
lines changed

2 files changed

+168
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Assets include PNG, JPG, SVG, GIF, WEBP files for now.
2525

2626
The repository was created to see the entire catalog of Android Assets used in the official documentation. There are some few many hidden gems.
2727

28-
Tools that helped in the process: [Wget](https://www.gnu.org/software/wget/), [regex](https://en.wikipedia.org/wiki/Regular_expression), [git](https://git-scm.com/), [Visual Studio Code](https://code.visualstudio.com/), [paste](https://www.gnu.org/software/coreutils/manual/html_node/paste-invocation.html#:~:text=paste%20writes%20to%20standard%20output,no%20input%20files%20are%20given.&text=The%20program%20accepts%20the%20following,Also%20see%20Common%20options.)
28+
Tools that helped in the process: [Wget](https://www.gnu.org/software/wget/), [regex](https://en.wikipedia.org/wiki/Regular_expression), [git](https://git-scm.com/), [Everything](https://www.voidtools.com/), [Visual Studio Code](https://code.visualstudio.com/), [paste](https://www.gnu.org/software/coreutils/manual/html_node/paste-invocation.html#:~:text=paste%20writes%20to%20standard%20output,no%20input%20files%20are%20given.&text=The%20program%20accepts%20the%20following,Also%20see%20Common%20options.)
2929

3030
[**Download Assets**](https://drive.google.com/drive/folders/1X6AAoaiI9jqDXz7E3UDr_cHB76XzIivE?usp=sharing)
3131

instructions.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# THIS IS FOR EDUCATION PURPOSE ONLY.
2+
3+
<br>
4+
5+
# Steps
6+
7+
<br>
8+
9+
## Command-line
10+
11+
Recommended to use [Cmder](https://cmder.net/) or [Windows terminal with WSL](hhttps://docs.microsoft.com/en-us/windows/terminal/get-started) if you are on Windows.
12+
13+
<br>
14+
15+
## Copying site
16+
17+
Tools that helped in the process: [Wget](https://www.gnu.org/software/wget/)
18+
19+
Run on command-line:
20+
21+
```
22+
23+
wget --mirror --page-requisites --adjust-extension --convert-links -e robots=off https://example.com
24+
25+
```
26+
or
27+
28+
```
29+
wget -m -p -E -k -e robot=off https://example.com
30+
31+
```
32+
33+
<br>
34+
35+
![](https://i.imgur.com/hiJ2RXQ.png)
36+
37+
<br>
38+
39+
## Filtering Assets (PNG, JPG, SVG, GIF, WEBP)
40+
41+
Tools that helped in the process: [Everything](https://www.voidtools.com/)
42+
43+
- Go to the path where you copied the website earlier using Wget and filter by .png, .jpg, ...
44+
45+
- Select all, right-click and click on `Copy Full Name to Clipboard` - This will copy the absolute path of files.
46+
47+
<br>
48+
49+
![](https://i.imgur.com/HJ2kark.png)
50+
51+
<br>
52+
53+
## VSCode arranging content
54+
55+
Tools that helped in the process: [Visual Studio Code](https://code.visualstudio.com/)
56+
57+
- Create a new file with any extension like `.md` and paste the earlier copied content from Everything and name it as `path.md` for example.
58+
59+
<br>
60+
61+
![](https://i.imgur.com/NmxrJEO.png)
62+
63+
<br>
64+
65+
- Replace the path till `../developer.android.com` with `https://developer.android.com/`
66+
67+
<br>
68+
69+
![](https://i.imgur.com/VGp9fDx.png)
70+
71+
<br>
72+
73+
- Replace `\` with `/`
74+
75+
- Create a new file called `title.md`, `image.md` in the same directory as `path.md`
76+
77+
- Copy contents of `path.md` in `title.md`
78+
79+
- Click on regex mode in VSCode and enter `.*/` in the field and replace all - This will remove all the content from the string until the last `/`
80+
81+
<br>
82+
83+
![](https://i.imgur.com/L17npSJ.png)
84+
85+
<br>
86+
87+
- Enter `.png` and replace it with an empty string to get the title.
88+
89+
<br>
90+
91+
![](https://i.imgur.com/UAyo9ub.png)
92+
93+
<br>
94+
95+
- Enter regex `^` and replace with `#### ` to get a nice heading.
96+
97+
<br>
98+
99+
![](https://i.imgur.com/jnOkDlj.png)
100+
101+
<br>
102+
103+
- Go to command-line and Merge `title.md` and `path.md` with `paste -d "^" title.md path.md > tp.md`
104+
105+
<br>
106+
107+
![](https://i.imgur.com/lC20aA4.png)
108+
109+
<br>
110+
111+
- Perform regex: `$(?<!\.png)(?<!\.gif)(?<!\.svg)(?<!\.jpg)(?<!\.webp)(\n)` on `tp.md` and replace with empty string - This will select all lines that do not end with .png, .gif, .svg, .jpg, .webp and remove their line breaks.
112+
113+
<br>
114+
115+
![](https://i.imgur.com/6qDn9ir.png)
116+
117+
<br>
118+
119+
- Copy contents in `path.md` and paste in `image.md`
120+
121+
- Replace `https:` with `![](https:` and Replace `.png` with `.png)` - This will make the image render in markdown.
122+
123+
<br>
124+
125+
![](https://i.imgur.com/eLyIHNT.png)
126+
127+
![](https://i.imgur.com/6jo2NbY.png)
128+
129+
<br>
130+
131+
- Go to command-line and Merge `tp.md` and `image.md` with `paste -d \n tp.md image.md > tpi.md`
132+
133+
<br>
134+
135+
![](blob:https://imgur.com/49c05947-9807-49f8-aee3-74aa4873cd1a)
136+
137+
<br>
138+
139+
- In `tpi.md` perform Regex `\^` to replace ^ with Ctrl+Enter (line break)
140+
141+
<br>
142+
143+
![](https://i.imgur.com/mu8DBj2.png)
144+
145+
<br>
146+
147+
- Perform regex `^https:` to replace `https:` with `Source: https:` - This will only replace the `https:` at the beginning of the line.
148+
149+
<br>
150+
151+
![](https://i.imgur.com/GbIbND3.png)
152+
153+
<br>
154+
155+
- Replace `####` with `<br> {Ctrl+Enter} ####` - Press {Ctrl + Enter} to give line break.
156+
157+
<br>
158+
159+
![](blob:https://imgur.com/fa96f2f4-b8fa-4c8d-830a-5751cf943d0c)
160+
161+
<br>
162+
163+
- Done. This will produce the same output as in the repository.
164+
165+
<br>
166+
167+
![](https://i.imgur.com/7ZgDRd4.png)

0 commit comments

Comments
 (0)