Skip to content

Commit b18ff39

Browse files
Jskoboscwlinode
authored andcommitted
[Update] Reorganize nginx (#1427)
* Add script for identifying old non-deprecated guides * [UPDATE] Install Cpanel (#1399) * [UPDATE] Install Cpanel * Travis * Update requirements.txt (#1400) * Add script for identifying old non-deprecated guides (#1394) * Remove non-existent image reference * Rebuild theme * Update email-with-postfix-dovecot-and-mysql.md (#1405) Faulty DNS records * Find old guides (#1404) * Add script for identifying old non-deprecated guides * Add command line argument for number of results * Added Image (#1406) * [UPDATE] Use Authy in two-factor authentication instructions (#1401) * added authy to 2fa guide * Update linode-manager-security-controls.md * Add script for identifying old non-deprecated guides * Add og_description and minor copy edits * quick edit to line up numbers and a quick glance through at the md * Incorrect spelling on terraform description * Deprecate oracle xe (#1409) * Add script for identifying old non-deprecated guides * Deprecate Oracle XE Guide * [UPDATE] Manipulate Lists with sort and uniq (#1408) * Add script for identifying old non-deprecated guides * Update sort and uniq guide * Tech edit * Complete tech edit * Add images to separate directory
1 parent af37d1f commit b18ff39

33 files changed

+813
-546
lines changed

ci/old_guides.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
from tabulate import tabulate
2+
from operator import itemgetter
3+
import yaml
4+
import sys
5+
import regex
6+
import glob
7+
8+
def parse_yaml(filestring):
9+
"""Use the yaml module to parse a filestring."""
10+
11+
reg = regex.compile(r'^---(.*?)---',flags=regex.DOTALL)
12+
match = regex.search(reg, filestring)
13+
if not match: return {}
14+
yaml_text = match.group(1)
15+
try:
16+
return yaml.load(yaml_text)
17+
except:
18+
return {}
19+
20+
def make_record(yaml):
21+
"""Create a dictionary object from yaml front matter"""
22+
23+
if 'title' in yaml:
24+
title = yaml['title']
25+
else:
26+
title = "No title"
27+
record = {
28+
'title': title,
29+
'updated': yaml['modified']
30+
}
31+
return record
32+
33+
def find_old_guides(count=20):
34+
"""Print a list of the 20 oldest guides in the library.
35+
36+
Results are sorted by modification date (in front matter)
37+
and deprecated guides are ignored.
38+
39+
Command line arguments:
40+
count: number of guides to list (default: 20)
41+
"""
42+
old_guides = []
43+
guides_scanned = 0
44+
rootdir = 'docs'
45+
for files in glob.glob('docs/**/*.md',recursive=True):
46+
guides_scanned += 1
47+
filename = files
48+
with open(filename, 'r') as f:
49+
filestring = f.read()
50+
parsed = parse_yaml(filestring)
51+
if 'modified' in parsed and 'deprecated' not in parsed:
52+
record = make_record(parsed)
53+
record['path'] = filename
54+
old_guides.append(record)
55+
print(str(guides_scanned) + " guides scanned.")
56+
old_guides.sort(key=itemgetter('updated'))
57+
oldest_guides = old_guides[0:count]
58+
print(tabulate(oldest_guides))
59+
60+
61+
if __name__ == '__main__':
62+
if len(sys.argv) > 1:
63+
count = int(sys.argv[1])
64+
else:
65+
count = 20
66+
find_old_guides(count)

ci/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pytest>=3.3.0
55
python-dateutil>=2.6.1
66
pytest-xdist>=1.20.1
77
PyYAML>=3.12
8+
tabulate>=0.8.2

docs/applications/containers/create-tag-and-upload-your-own-docker-image.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ external_resources:
2020
- '[Docker Hub](https://hub.docker.com/)'
2121
---
2222

23-
![Create, Tag, and Upload Your Own Docker Image](/docs/assets/docker/docker-image-title.png "Create, Tag, and Upload Your Own Docker Image")
24-
2523
Docker makes it easy to develop and deploy custom and consistent environments that include specific applications and dependencies. Docker calls these compilations Images. Docker images can be hosted and retrieved from private locations or from the official repository, [Docker Hub](https://hub.docker.com/).
2624

2725
This guide is part of a series of introductions to Docker concepts. The commands to create an image in this guide build on the previous guide, [How to Install and Pull Images for Container Deployment](/docs/applications/containers/how-to-install-docker-and-pull-images-for-container-deployment). For more information about Docker and containers, visit our [guides on Containers](/docs/applications/containers).
-52.6 KB
Binary file not shown.
-39.1 KB
Binary file not shown.
-36.1 KB
Binary file not shown.
90.2 KB
Loading

docs/databases/oracle/securely-administer-oracle-xe-with-an-ssh-tunnel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ modified_by:
1111
name: Linode
1212
published: 2010-01-28
1313
title: Securely Administer Oracle XE with an SSH Tunnel
14+
deprecated: true
1415
external_resources:
1516
- '[Using PuTTY](/docs/networking/using-putty)'
1617
- '[Oracle XE Documentation](http://www.oracle.com/pls/xe102/homepage)'

0 commit comments

Comments
 (0)