Skip to content

Web Crawler for Time.ir to Retrive JSON File, jalali, qamari, miladi JSON Calendar API.

License

Notifications You must be signed in to change notification settings

HMarzban/pipe2time.ir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code style: prettier JavaScript Style Guide

Jalali, Qamari, Miladi Calendar from "time.ir", JSON API

Web Crawler for Time.ir to obtain all data as a JSON file, Jalali, Qamari, Miladi data are included.

This script has two pipes:

.ics events for google, outlook ...

One of the pipes that you can achieve when you execute the project is creating a .ics file. by default, you can download one of the files below and import in to your calendar. these files contains all events of the year by the source of time.ir

Events

1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410,

JSON API

Api schema:

https://hmarzban.github.io/pipe2time.ir/api/:year/:target

Example:

https://hmarzban.github.io/pipe2time.ir/api/1399/index.json open Link

https://hmarzban.github.io/pipe2time.ir/api/1399/events.json open Link

https://hmarzban.github.io/pipe2time.ir/api/1399/weeks.json open Link

Also, you can download all in one these years data by this link

List of available years: 1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410 Note: if you need more years, clone the project and make your custom list of years.

JSON OUTPUT SCHEMA

{
 "1398": [ ... ],
 "1394": [
  {
  "header": {
    "miladi": "March - April 2015",
    "qamari": "جمادي الاولي - جمادي الثانيه - 1436",
    "jalali": "فروردین 1394"},
  "events": [
    {
    "isHoliday": true,
    "text": "1 فروردین جشن نوروز/جشن سال نو",
    "jDate": "1394/01/01",
    "mDate": "2015/03/21",
    "jDay": "1"
    },
    ...
  ],
  "weeks": [
    {"holiday": true, "disabled": false, "day": { "j": "1", "m": "21", "q": "30" } },
    ...
  ]
  },
  ...
 ],
 "1401": [ ... ],
 "1402": [ ... ]
}

Develop and Contribute

  1. install dependecy npm i
  2. run the cli npm start

JavaScript Style Guide

About

Web Crawler for Time.ir to Retrive JSON File, jalali, qamari, miladi JSON Calendar API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published