Browse Source

isort and formatting clean up

main
crunk 1 year ago
parent
commit
805d5b5b2b
  1. 3
      app.py
  2. 3
      column.py
  3. 3
      parse_rss_feeds.py
  4. 2
      quick_test.py
  5. 5
      simplejsonstorage.py
  6. 9
      start.py

3
app.py

@ -1,5 +1,6 @@
import os
import json import json
import os
import flask_apscheduler import flask_apscheduler
import tomli import tomli
from flask import Flask from flask import Flask

3
column.py

@ -1,7 +1,8 @@
import random
import json import json
import random
from datetime import datetime from datetime import datetime
from time import mktime from time import mktime
from parse_rss_feeds import parse_rss_feeds from parse_rss_feeds import parse_rss_feeds

3
parse_rss_feeds.py

@ -1,6 +1,7 @@
from feedparser import parse
import random import random
from feedparser import parse
def parse_single_rss_feed(url, entries): def parse_single_rss_feed(url, entries):
feed = parse(url) feed = parse(url)

2
quick_test.py

@ -1,8 +1,8 @@
import tomli import tomli
from column import Column from column import Column
from parse_rss_feeds import parse_rss_feeds from parse_rss_feeds import parse_rss_feeds
with open("columns.toml", "rb") as f: with open("columns.toml", "rb") as f:
column_dict = tomli.load(f) column_dict = tomli.load(f)
columns_file = column_dict["column"] columns_file = column_dict["column"]

5
simplejsonstorage.py

@ -1,8 +1,9 @@
from json import dumps, loads
from logging import DEBUG, INFO, basicConfig, getLogger
from os import environ, mkdir from os import environ, mkdir
from os.path import exists from os.path import exists
from pathlib import Path from pathlib import Path
from logging import DEBUG, INFO, basicConfig, getLogger
from json import dumps, loads
class SimpleJsonStorage(dict): class SimpleJsonStorage(dict):
"""A simple json file. """A simple json file.

9
start.py

@ -1,10 +1,12 @@
import tomli
import os
import json import json
import os
import tomli
from flask import render_template from flask import render_template
from simplejsonstorage import SimpleJsonStorage
from app import create_app from app import create_app
from column import Column from column import Column
from simplejsonstorage import SimpleJsonStorage
APP = create_app() APP = create_app()
@ -27,6 +29,7 @@ def load_json_file():
) )
return json_file return json_file
if __name__ == "__main__": if __name__ == "__main__":
APP.debug = True APP.debug = True
APP.run(port=5000) APP.run(port=5000)

Loading…
Cancel
Save