FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
plasmapy.github.io/pull_from_github.py at src · BigMuuG/plasmapy.github.io · GitHub
BigMuuG
/
plasmapy.github.io
Public
forked from
PlasmaPy/plasmapy.github.io
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
plasmapy.github.io
/
pull_from_github.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
39 lines (35 loc) · 1.2 KB
Breadcrumbs
plasmapy.github.io
/
pull_from_github.py
Copy path
File metadata and controls
executable file
·
39 lines (35 loc) · 1.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
import
requests
as
re
OUTPUT_DIR
=
"web/pages/"
BASE_URL
=
"https://raw.githubusercontent.com/PlasmaPy/PlasmaPy/master/"
WEB_BASE_URL
=
"https://raw.githubusercontent.com/PlasmaPy/plasmapy.github.io/src/"
PAGES
=
[
{
"filename"
:
OUTPUT_DIR
+
"conduct.md"
,
"url"
:
BASE_URL
+
"CODE_OF_CONDUCT.md"
,
"metadata"
: {
"title"
:
"Code of conduct"
,
"slug"
:
"conduct"
}},
{
"filename"
:
OUTPUT_DIR
+
"contribute.md"
,
"url"
:
BASE_URL
+
"CONTRIBUTING.md"
,
"metadata"
: {
"title"
:
"Contribute to PlasmaPy"
,
"slug"
:
"contribute"
}},
{
"filename"
:
OUTPUT_DIR
+
"license.md"
,
"url"
:
WEB_BASE_URL
+
"LICENSE.md"
,
"metadata"
: {
"title"
:
"License"
,
"slug"
:
"license"
}},
{
"filename"
:
OUTPUT_DIR
+
"vision.md"
,
"url"
:
BASE_URL
+
"vision_statement.md"
,
"metadata"
: {
"title"
:
"Vision statement"
,
"slug"
:
"vision"
}},
]
for
page
in
PAGES
:
content
=
""
for
field
,
tag
in
page
[
"metadata"
].
items
():
content
+=
"{}: {}
\n
"
.
format
(
field
,
tag
)
content
+=
"
\n
"
content
+=
re
.
get
(
page
[
"url"
]).
content
.
decode
(
"utf-8"
)
with
open
(
page
[
"filename"
],
"w+"
)
as
f
:
f
.
write
(
content
)
Back
|
FazBrowse Home
|
New Git URL