Code Monkey home page Code Monkey logo

juttupujaripanchanga's Introduction

JuttuPujariPanchanga

A simple python script which scrapes a particular day's Pachanga from "https://www.drikpanchang.com/" ,stores it in a JSON file and sends a formatted message from the JSON file to a telegram group.

The project name "JuttuPujariPanchanga" is simply a funny name that I came with and means no disrespect to any individual or any profession.

DESCRIPTION

This main idea for the development of this program was to have a minimalist way of reading the panchanga of the day. This program uses an amazing module, called the "BeautifulSoup", which plays the major role in getting the data from the website to a normal form. Basically , for a lay man, all it does is, it parses the HTML source code and offer a handful functions to find and retrieve what is required in an easy way.

More on it can be found here : [https://realpython.com/beautiful-soup-web-scraper-python/]

The URL of the DrikPanchang site itself contains many query parameters:

So with the help of these parameters one can generate panchanga for any location and for any date you want.

Moreover the program overwrites the JSON file ,"panchangam.json" every time the program runs.

INSTALLATION

  • Clone the GitHub repository and change into the directory

    git clone https://github.com/nagarajanmolrao/JuttuPujariPanchanga

  • Copy the "telegram_details_template.json" to "telegram_details.json"

  • Put in the actual Bot token and the Telegram Group Chat ID in "telegram_details.json" file

  • Install the python dependencies

    pip install -r requirements.txt

  • Just run the "main.py" file

    python main.py

  • See the panchanga appear on your telegram group.

DOCKER INSTRUCTIONS
  • Clone the GitHub repository and change into the directory

    git clone https://github.com/nagarajanmolrao/JuttuPujariPanchanga

  • Copy the "telegram_details_template.json" to "telegram_details.json"

  • Put in the actual Bot token and the Telegram Group Chat ID in "telegram_details.json" file

  • To set at what time the message must be sent, change the time after the word "tomorrow" in the sleep command in "BotCronScript.sh" to any required time in 24HOUR format.

  • Build the docker image

    docker build . -t juttu_pujari_panchanga

  • Run the docker image

    docker run -d juttu_pujari_panchanga

juttupujaripanchanga's People

Contributors

nagarajanmolrao 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.