Giter VIP home page Giter VIP logo

songbird's Introduction

songbird

A network protocol that enables communication between two programs.The Nightswatch application serves as a TCP server,using inotify to monitor file modifications.Song acts as a TCP client,establishing a connection with Nightswatch to receive notifications about file modifications

How it works

Before the communication begin,both applications agree on the structure defined by the songbird protocol by specifying fields i.e. actions, status, data

The file watcher application,nightswatch, utilizes inotify to monitor the files for modifications. Upon detecting file modifications, it sends a message to the user facing application 'song' by serializing and trasmitting over the network

And when song recieves the message from nightswatch ,it deserializes to extract the information, interprets it based on its action and option fields.So if the action indicates a file deletion, song processes the messagee and displays a desktop notification to the user

Installation

Clone the songbird repository

git clone https://github.com/HelixY2J/songbird.git

Compile the core source code

cd core
make

Compile the nightswatch source code

cd nightswatch
make

Usage

To start nightwatch,run the commnad

./build/nightswatchh

And then to start song in different terminal

./build/songg 127.0.0.1 nightswatch.c

Song will establish a TCP connection with Nightswatch and begin receiving file modification notifications.

And then fire up another terminal,make some modification in a file to recieve the notifications

Dependencies

libnotify: A library for sending desktop notifications.

We can either build with gcc -o songg pkg-config --cflags --libs libnotify song.c

For more information please check https://wiki.archlinux.org/title/Desktop_notifications

If you get error related to <glib.h> then we need to install *-dev packages.

 sudo apt-get install libnotify-dev

Still if error persists we might need to manually specify the information about glib2.0 in our makefile. Run following command -

 pkg-config --cflags --libs glib-2.0

Include the output in makefile.

songbird's People

Contributors

helixy2j avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.