Skip to content

mahdiahmadi87/hodhod

Repository files navigation

HodKhan، Khabar Khan Solomon(Solomon's Newsreader)

  • This is FastLoad version HodHod is a website for displaying news according to people's interests

Installation

  • download from Github
git clone https://github.com/mahdiahmadi87/hodhod.git
  • download Persian Fasttext Model Download

  • Install requirements

pip install -r requirements.txt
  • Migrate django
cd hodhoddjango
python3 manage.py migrate
  • Create a superuser
python3 manage.py createsuperuser
  • Create the Database
import sqlite3
conn = sqlite3.connect('./Database.db')

conn.execute("""
CREATE TABLE IF NOT EXISTS News (
    id TEXT PRIMARY KEY NOT NULL,
    siteId TEXT NOT NULL,
    newsAgency TEXT NOT NULL,
    title TEXT NOT NULL,
    abstract TEXT NOT NULL,
    topic TEXT NOT NULL,
    link TEXT NOT NULL,
    published TEXT NOT NULL,
    image TEXT NOT NULL,
    vector TEXT NOT NULL
);
""")

conn.execute("""
CREATE TABLE IF NOT EXISTS Viewed (
    username TEXT NOT NULL,
    newsId TEXT NOT NULL,
    star INTEGER NOT NULL,
    isTrained INTEGER NOT NULL
);
""")

conn.execute("""
CREATE TABLE IF NOT EXISTS Users (
    username TEXT NOT NULL,
    accuracy INTEGER NOT NULL
);
""")
conn.commit()
conn.close()

Usage

  • WebSite:
cd hodhoddjango
python3 manage.py runserver
  • Crawler:
cd crawlers
python3 crawler.py
  • Regressos:
cd newsSelection
python3 regressor.py

Download for Android

you can download APK from this link:

Download

License

Apache