Sort lines with TwoFold

This commit is contained in:
Cristi Constantin 2019-10-31 23:03:55 +00:00
parent ad3a99153a
commit e0726f4eb8
No known key found for this signature in database
GPG Key ID: 9FF83DA702447B8F
2 changed files with 6 additions and 21 deletions

View File

@ -5,7 +5,8 @@
### Applications
<div id="marker" markdown="1">
<!-- TwoFold sort lines -->
<sortLines>
* [airpaste ☠️](https://github.com/mafintosh/airpaste): A 1-1 network pipe that auto discovers other peers using mdns. Can send text, or files.
* [AKASHA](https://akasha.world): A Next-Generation Social Media Network. Powered by the Ethereum world computer. Embedded into the Inter-Planetary File System.
@ -68,14 +69,17 @@
* [YaCy](http://www.yacy.net/en): Free distributed search engine, built on principles of P2P networks.
* [ZeroNet](https://zeronet.io/): Open, free and uncensorable websites, using Bitcoin cryptography and BitTorrent network. Uncensored, no hosting costs, always accessible.
</div>
</sortLines>
### Crypto currency
<sortLines>
* [Bitcoin](https://bitcoin.org): Unless you've been living under a rock for the past 5 years, you should know about Bitcoin.
* [Ethereum](https://ethereum.org): Decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference.
* [Zcash](https://z.cash/): Permission-less financial system employing zero-knowledge security.
</sortLines>
### Other

View File

@ -1,19 +0,0 @@
#/usr/bin/python3
import re
README = 'README.md'
MARKER = '<div id="marker" markdown="1">(.+?)</div>'
readme = open(README).read()
target = re.search(MARKER, readme, flags=re.S).group(1).split('\n')
target.sort(key=str.lower)
target = '\n'.join(t.strip() for t in target if t.strip())
with open(README, 'w') as new_readme:
t = re.sub(MARKER,
'<div id="marker" markdown="1">\n\n{}\n\n</div>'.format(target),
readme, flags=re.S)
new_readme.write(t)
print('Done. Sorted {} entries.'.format(len(target.split('\n'))))