Daemon that notifies you of any stories that match your list of queries.
TODO!!!!!
- Create in your home folder (C:\Users\YOUR_USERNAME) a file called ".hackernewsdrc".
Replace the queries in the example below with whatever keywords you want the daemon to look for
{
"queries": [ ".NET", "C#", "Microsoft", "CLR", "F#", "Mono" ],
"host": "127.0.0.1",
"port": 5555
}
- Clone the project
- Install the dependencies
pip install -r requirements.txt
- Move the script to the startup application folder
mv hackernewsd.py C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\hackernewsd.pyw
- Create in your home folder (/home/YOUR_USERNAME) a file called ".hackernewsdrc".
Replace the queries in the example below with whatever keywords you want the daemon to look for
{
"queries": [ ".NET", "C#", "Microsoft", "CLR", "F#", "Mono" ],
"host": "127.0.0.1",
"port": 5555
}
- Download the binary
cd ~
curl -JOL "https://github.com/somegenericdev/hackernewsd/releases/download/v1.0.2/hackernewsd-v1.0.2-linux64.zip" && unzip hackernewsd-v*-linux64.zip && sudo mv hackernewsd /bin/hackernewsd
chmod +x /bin/hackernewsd
chown $USER:$USER /bin/hackernewsd
- Create a systemd service
cd /etc/systemd/system
sudo touch hackernewsd.service
sudo tee -a hackernewsd.service > /dev/null <<EOT
[Unit]
Description=hackernewsd
[Service]
WorkingDirectory=/bin
ExecStart=/bin/hackernewsd
Restart=always
# Restart service after 10 seconds if the service crashes:
RestartSec=10
User=USER_HERE
Group=USER_HERE
KillSignal=SIGINT
SyslogIdentifier=log.hackernewsd
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target
EOT
sudo sed -i -e "s/USER_HERE/$USER/g" hackernewsd.service
sudo systemctl start hackernewsd
sudo systemctl enable hackernewsd
- Install the dependency list
pip install -r requirements.txt #windows
pip install $(cat requirements.txt | grep --invert-match "win11toast") #linux
- Install pyinstaller
pip install -U pyinstaller
- Build the project with pyinstaller
pyinstaller --noconsole --onefile src/app.py
Trovare libreria con evento onclick cross platform per notifiche