Reimplementing (some) functionalities of italy.indymedia.org v1.0 in python
boyska 1bc25e2a08 stile | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
templates | %!s(int64=3) %!d(string=hai) anos | |
.gitignore | %!s(int64=3) %!d(string=hai) anos | |
README.md | %!s(int64=3) %!d(string=hai) anos | |
app.py | %!s(int64=3) %!d(string=hai) anos | |
composer.json | %!s(int64=3) %!d(string=hai) anos | |
composer.lock | %!s(int64=3) %!d(string=hai) anos | |
parse_comment.php | %!s(int64=3) %!d(string=hai) anos | |
parse_one.php | %!s(int64=3) %!d(string=hai) anos | |
pyproject.toml | %!s(int64=3) %!d(string=hai) anos | |
requirements.txt | %!s(int64=3) %!d(string=hai) anos |
sf-active fa un file per ogni articolo.
L'approccio di questo progetto è parsasre il vecchio PHP, trasformando tutto in un DB SQLite.
A quel punto si può riscrivere l'interfaccia.
find /path/to/sf-active/italy/website/news/ -type f -name '*_comment.php' |
php parse_comment.php italy.db
Questo comando parsa le news con tanto di commenti. C'è qualche problemino con gli orari, soprattutto dentro i commenti, per il resto sembrano andare.
pip3 install -r requirements.txt
flask run