Two years blog post (!78)

Big thanks to craftyguy, PureTryOut, MartijnBraam for their
contributions, which have been merged into this patch.
parent f42fd8e1
......@@ -5,3 +5,4 @@ __pycache__
/.idea
/docs
/utils/new-devices-stats/pmaports/
This diff is collapsed.
......@@ -61,6 +61,7 @@
}
html img.border,
html video.border,
html .grid-bottom img,
html .grid-bottom video {
border: 1px solid #0b0c0c;
......
......@@ -52,7 +52,9 @@ img.w300 {
img.wfull {
width: 100%;
}
img.border {
img.border,
video.border {
border: 1px solid lightgrey;
}
......
......@@ -56,7 +56,18 @@ postmarketOS // real Linux distribution for phones
<div class="separator"></div>
<div class="content">
<h2>What others say</h2>
<div class="quote">
"postmarketOS continues to impress me."
</div>
<a href="https://cmpwn.com/@sir/102059534919824456">Drew DeVault, 2019-05-08</a>
</div>
<div class="content">
<div class="quote">
"While it may be a while before postmarketOS is your daily driver, the project is well suited to building task-specific devices that require connectivity, a touch screen, and a battery. We bet a lot of Hackaday readers have a junk drawer phone that could become a project with the help of postmarketOS."
</div>
<a href="https://hackaday.com/2019/01/17/postmarketos-turns-600-days-old/">Hackaday, 2019-01-17</a>
</div>
<div class="content">
<div class="quote">
"postmarketOS, Plasma Mobile's favorite platform, is now 1 year old! In one year, development has been astounding, and pmOS is shaping up to be THE through and through Free mobile distro of the future."
</div>
......
......@@ -37,9 +37,16 @@ def init():
command = ['git', 'clone', 'https://gitlab.com/postmarketOS/pmaports.git']
subprocess.run(command)
def get_current_commit():
command = ['git', 'rev-parse', 'HEAD']
stdout = subprocess.check_output(command)
stdout = subprocess.check_output(command, cwd='pmaports')
return stdout.decode("utf-8").rstrip()
def get_subject(commit):
command = ['git', 'log', '-1', '--pretty=%s', commit]
stdout = subprocess.check_output(command, cwd='pmaports')
return stdout.decode("utf-8").rstrip()
......@@ -103,6 +110,7 @@ def get_device_wiki_page(device):
for codename in row['Codename'].split(","):
codename = codename.strip()
pagename = row['Page'].replace(' ', '_')
pagename = row['Page'].replace("'", '&39;') # otherwise screws up markdown
url = 'https://wiki.postmarketos.org/wiki/{}'.format(pagename)
wiki_cache[codename] = url
......@@ -118,11 +126,12 @@ def get_device_wiki_page(device):
return 'https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SIII_mini_Value_Edition_(samsung-i8200)'
if device == 'semc-smultron':
return 'https://wiki.postmarketos.org/wiki/Sony_Ericsson_Xperia_mini_(semc-smultron)'
if device == 'planet-geminipda':
return 'https://wiki.postmarketos.org/wiki/Planet_Computers_Gemini_PDA_(planet-geminipda)'
if device not in wiki_cache:
print("ERROR: device " + device + " not found in wiki!")
print("NOTE: devices in wiki_cache: ")
print(str(sorted(list(wiki_cache.keys()))))
print("Edit get_device_wiki_page() in and add the link there: " + __file__)
exit(1)
return wiki_cache[device]
......@@ -156,9 +165,14 @@ def new_devices(args):
deleted = a - b
if args.md:
start = args.fromref
subject_start = get_subject(start)
master = get_current_commit()
subject_master = get_subject(master)
print("<!-- Generated with: 'pmos-stats " + " ".join(sys.argv[1:]) + "'")
print(" Current master (for next time): " + master + " -->")
print(" Start subject: " + subject_start)
print(" Current master (for next time): " + master)
print(" Current subject: " + subject_master + " -->")
print("")
for device in sorted(added):
name = get_device_name(device)
......@@ -174,6 +188,15 @@ def new_devices(args):
for device in sorted(deleted):
print(device)
print("\nSee also: https://postmarketos.org/renamed")
# In the 2 year blog post, the script printed asus-z00vd, although that
# was already mentioned in the 600 days post?! Maybe stuff was renamed,
# not really worth investigating now. I've double checked all entries,
# and all others were reported properly.
print()
print(" #### NOTE: DOUBLE CHECK THIS LIST! #### ");
print()
return
print('--added--')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment