Debian Codegraph @

terminal/هجري

raw symbols SCIP
1 #! /bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Hijri Terminal 3.2
3 # Under Waqf License
4 # By Mosaab Alzoubi ([email protected] - facebook.com/moceap)
5 # Almasa Project
6 # 1436-10-5
7 #---------------------------------------------------------------
8 #---------------------------------------------------------------
9 #---------------------------------------------------------------
10 ver=$(hijri -v)
11 arg="$@"
12 arg1="$1"
13 arg2="$2"
14 arg3="$3"
15 arg4="$4"
16 arg5="$5"
17 about="$(hijri -a arabic)"
18 nday=$(datescip-shell system . . date. +%u)
19 day=$(hijri -d)
20 month=$(hijri -m)
21 year=$(hijri -y)
22 if [scip-shell system . . `[`. "$arg1" = "معين" ]
23 then
24 nday=$arg5
25 day=$arg4
26 month=$arg3
27 year=$arg2
28 if [scip-shell system . . `[`. "$day" = "" ] ; then echoscip-shell system . . echo. "البيانات ناقصة" ; exit ; fi
29 if [scip-shell system . . `[`. "$month" = "" ] ; then echoscip-shell system . . echo. "البيانات ناقصة" ; exit ; fi
30 if [scip-shell system . . `[`. "$year" = "" ] ; then echoscip-shell system . . echo. "البيانات ناقصة" ; exit ; fi
31 con="`echoscip-shell system . . echo. "$arg" | grepscip-shell system . . grep. رسومي`"
32 if [scip-shell system . . `[`. ! "$con" = "" ] ; then arg1="رسومي" ; fi
33 fi
34 n="${#year}"
35 men="من شهر"
36 sana="سنة"
37 help="مساعدة ::
38
39 لإظهار التاريخ الهجري لهذا اليوم شغل البرنامج بدون أي كلمة بعد الأمر هجري .
40 لإظهار التاريخ بشكل رسومي أدخل كلمة رسومي مباشرة بعد الأمر هجري .
41
42 لتحويل التاريخ الهجري من النمط الرقمي إلى النمط المكتوب استعمل الصيغة التالية :
43 هجري معين <سنة> <شهر> <يوم>
44 وإضافة كلمة رسومي في الآخر في حال الرغبة بتفعيل الشكل الرسومي
45 مثال ::
46 هجري معين 1434 7 22
47 النتيجة :
48 الثاني و العشرين من شهر رجب سنة أربع وثلاثين وأربعمئة وألف
49
50 لإظهار معلومات عن البرنامج أدخل كلمة حول بعد الأمر هجري .
51 لإظهار هذه المساعدة اكتب مساعدة بعد الأمر هجري ."
52 if [scip-shell system . . `[`. "$nday" = "1" ] ; then tnday="الإثنين" ; fi
53 if [scip-shell system . . `[`. "$nday" = "2" ] ; then tnday="الثلاثاء" ; fi
54 if [scip-shell system . . `[`. "$nday" = "3" ] ; then tnday="الأربعاء" ; fi
55 if [scip-shell system . . `[`. "$nday" = "4" ] ; then tnday="الخميس" ; fi
56 if [scip-shell system . . `[`. "$nday" = "5" ] ; then tnday="الجمعة" ; fi
57 if [scip-shell system . . `[`. "$nday" = "6" ] ; then tnday="السبت" ; fi
58 if [scip-shell system . . `[`. "$nday" = "7" ] ; then tnday="الأحد" ; fi
59 if [scip-shell system . . `[`. "$day" = "1" ] ; then tday="الأول" ; fi
60 if [scip-shell system . . `[`. "$day" = "2" ] ; then tday="الثاني" ; fi
61 if [scip-shell system . . `[`. "$day" = "3" ] ; then tday="الثالث" ; fi
62 if [scip-shell system . . `[`. "$day" = "4" ] ; then tday="الرابع" ; fi
63 if [scip-shell system . . `[`. "$day" = "5" ] ; then tday="الخامس" ; fi
64 if [scip-shell system . . `[`. "$day" = "6" ] ; then tday="السادس" ; fi
65 if [scip-shell system . . `[`. "$day" = "7" ] ; then tday="السابع" ; fi
66 if [scip-shell system . . `[`. "$day" = "8" ] ; then tday="الثامن" ; fi
67 if [scip-shell system . . `[`. "$day" = "9" ] ; then tday="التاسع" ; fi
68 if [scip-shell system . . `[`. "$day" = "10" ] ; then tday="العاشر" ; fi
69 if [scip-shell system . . `[`. "$day" = "11" ] ; then tday="الحادي عشر" ; fi
70 if [scip-shell system . . `[`. "$day" = "12" ] ; then tday="الثاني عشر" ; fi
71 if [scip-shell system . . `[`. "$day" = "13" ] ; then tday="الثالث عشر" ; fi
72 if [scip-shell system . . `[`. "$day" = "14" ] ; then tday="الرابع عشر" ; fi
73 if [scip-shell system . . `[`. "$day" = "15" ] ; then tday="الخامس عشر" ; fi
74 if [scip-shell system . . `[`. "$day" = "16" ] ; then tday="السادس عشر" ; fi
75 if [scip-shell system . . `[`. "$day" = "17" ] ; then tday="السابع عشر" ; fi
76 if [scip-shell system . . `[`. "$day" = "18" ] ; then tday="الثامن عشر" ; fi
77 if [scip-shell system . . `[`. "$day" = "19" ] ; then tday="التاسع عشر" ; fi
78 if [scip-shell system . . `[`. "$day" = "20" ] ; then tday="العشرين" ; fi
79 if [scip-shell system . . `[`. "$day" = "21" ] ; then tday="الحادي و العشرين" ; fi
80 if [scip-shell system . . `[`. "$day" = "22" ] ; then tday="الثاني و العشرين" ; fi
81 if [scip-shell system . . `[`. "$day" = "23" ] ; then tday="الثالث و العشرين" ; fi
82 if [scip-shell system . . `[`. "$day" = "24" ] ; then tday="الرابع و العشرين" ; fi
83 if [scip-shell system . . `[`. "$day" = "25" ] ; then tday="الخامس و العشرين" ; fi
84 if [scip-shell system . . `[`. "$day" = "26" ] ; then tday="السادس و العشرين" ; fi
85 if [scip-shell system . . `[`. "$day" = "27" ] ; then tday="السابع و العشرين" ; fi
86 if [scip-shell system . . `[`. "$day" = "28" ] ; then tday="الثامن و العشرين" ; fi
87 if [scip-shell system . . `[`. "$day" = "29" ] ; then tday="التاسع و العشرين" ; fi
88 if [scip-shell system . . `[`. "$day" = "30" ] ; then tday="الثلاثين" ; fi
89 if [scip-shell system . . `[`. "$month" = "1" ] ; then tmonth="محرم" ; fi
90 if [scip-shell system . . `[`. "$month" = "2" ] ; then tmonth="صفر" ; fi
91 if [scip-shell system . . `[`. "$month" = "3" ] ; then tmonth="ربيع الأول" ; fi
92 if [scip-shell system . . `[`. "$month" = "4" ] ; then tmonth="ربيع الثاني" ; fi
93 if [scip-shell system . . `[`. "$month" = "5" ] ; then tmonth="جمادى الأولى" ; fi
94 if [scip-shell system . . `[`. "$month" = "6" ] ; then tmonth="جمادى الثانية" ; fi
95 if [scip-shell system . . `[`. "$month" = "7" ] ; then tmonth="رجب" ; fi
96 if [scip-shell system . . `[`. "$month" = "8" ] ; then tmonth="شعبان" ; fi
97 if [scip-shell system . . `[`. "$month" = "9" ] ; then tmonth="رمضان" ; fi
98 if [scip-shell system . . `[`. "$month" = "10" ] ; then tmonth="شوال" ; fi
99 if [scip-shell system . . `[`. "$month" = "11" ] ; then tmonth="ذي القعدة" ; fi
100 if [scip-shell system . . `[`. "$month" = "12" ] ; then tmonth="ذي الحجة" ; fi
101 if [scip-shell system . . `[`. "$n" = "1" ] ; then
102 firsty="$year" ; fi
103 if [scip-shell system . . `[`. "$n" = "2" ] ; then
104 firsty="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 2`"
105 secondy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 1`"; fi
106 if [scip-shell system . . `[`. "$n" = "3" ] ; then
107 firsty="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 3`"
108 secondy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 2`"
109 thirdy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 1`"; fi
110 if [scip-shell system . . `[`. "$n" = "4" ] ; then
111 firsty="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 4`"
112 secondy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 3`"
113 thirdy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 2`"
114 forthy="`echoscip-shell system . . echo. $year | cutscip-shell system . . cut. -c 1`"; fi
115 if [scip-shell system . . `[`. "$n" -gt "4" ] ; then
116 echoscip-shell system . . echo. "عذراً يدعم هذا البرنامج السنوات الهجرية حتى 9999 ويمكن التعديل عليه كونه مفتوح المصدر ، فلا تبخل بتطويره إن رأيت الحاجة لذلك"
117 exit ; fi
118 belscip-shell shell shell-project 0.0.0 bel().()
119 {
120 if [scip-shell system . . `[`. "$firsty" = "0" ] ; then tfirsty="عشر" ; fi
121 if [scip-shell system . . `[`. "$firsty" = "1" ] ; then tfirsty="أحد عشر" ; fi
122 if [scip-shell system . . `[`. "$firsty" = "2" ] ; then tfirsty="إثني عشر" ; fi
123 if [scip-shell system . . `[`. "$firsty" = "3" ] ; then tfirsty="ثلاث عشر" ; fi
124 if [scip-shell system . . `[`. "$firsty" = "4" ] ; then tfirsty="أربع عشر" ; fi
125 if [scip-shell system . . `[`. "$firsty" = "5" ] ; then tfirsty="خمس عشر" ; fi
126 if [scip-shell system . . `[`. "$firsty" = "6" ] ; then tfirsty="ست عشر" ; fi
127 if [scip-shell system . . `[`. "$firsty" = "7" ] ; then tfirsty="سبع عشر" ; fi
128 if [scip-shell system . . `[`. "$firsty" = "8" ] ; then tfirsty="ثمان عشر" ; fi
129 if [scip-shell system . . `[`. "$firsty" = "9" ] ; then tfirsty="تسع عشر" ; fi
130 }
131 aktharscip-shell shell shell-project 0.0.0 akthar().()
132 {
133 if [scip-shell system . . `[`. "$firsty" = "0" ] ; then tfirsty="" ; fi
134 if [scip-shell system . . `[`. "$firsty" = "1" ] ; then tfirsty="واحد" ; fi
135 if [scip-shell system . . `[`. "$firsty" = "2" ] ; then tfirsty="اثنين" ; fi
136 if [scip-shell system . . `[`. "$firsty" = "3" ] ; then tfirsty="ثلاث" ; fi
137 if [scip-shell system . . `[`. "$firsty" = "4" ] ; then tfirsty="أربع" ; fi
138 if [scip-shell system . . `[`. "$firsty" = "5" ] ; then tfirsty="خمس" ; fi
139 if [scip-shell system . . `[`. "$firsty" = "6" ] ; then tfirsty="ست" ; fi
140 if [scip-shell system . . `[`. "$firsty" = "7" ] ; then tfirsty="سبع" ; fi
141 if [scip-shell system . . `[`. "$firsty" = "8" ] ; then tfirsty="ثمان" ; fi
142 if [scip-shell system . . `[`. "$firsty" = "9" ] ; then tfirsty="تسع" ; fi
143 }
144 if [scip-shell system . . `[`. "$secondy" = "0" ] ; then tsecondy="" ; fi
145 if [scip-shell system . . `[`. "$secondy" = "1" ] ; then belscip-shell shell shell-project 0.0.0 bel(). ; else aktharscip-shell shell shell-project 0.0.0 akthar(). ; fi
146 if [scip-shell system . . `[`. "$secondy" = "2" ] ; then tsecondy="وعشرين" ; fi
147 if [scip-shell system . . `[`. "$secondy" = "3" ] ; then tsecondy="وثلاثين" ; fi
148 if [scip-shell system . . `[`. "$secondy" = "4" ] ; then tsecondy="وأربعين" ; fi
149 if [scip-shell system . . `[`. "$secondy" = "5" ] ; then tsecondy="وخمسين" ; fi
150 if [scip-shell system . . `[`. "$secondy" = "6" ] ; then tsecondy="وستين" ; fi
151 if [scip-shell system . . `[`. "$secondy" = "7" ] ; then tsecondy="وسبعين" ; fi
152 if [scip-shell system . . `[`. "$secondy" = "8" ] ; then tsecondy="وثمانين" ; fi
153 if [scip-shell system . . `[`. "$secondy" = "9" ] ; then tsecondy="وتسعين" ; fi
154 if [scip-shell system . . `[`. "$thirdy" = "0" ] ; then thirdy="" ; fi
155 if [scip-shell system . . `[`. "$thirdy" = "1" ] ; then thirdy="ومئة" ; fi
156 if [scip-shell system . . `[`. "$thirdy" = "2" ] ; then thirdy="ومئتين" ; fi
157 if [scip-shell system . . `[`. "$thirdy" = "3" ] ; then thirdy="وثلاثمئة" ; fi
158 if [scip-shell system . . `[`. "$thirdy" = "4" ] ; then thirdy="وأربعمئة" ; fi
159 if [scip-shell system . . `[`. "$thirdy" = "5" ] ; then thirdy="وخمسمئة" ; fi
160 if [scip-shell system . . `[`. "$thirdy" = "6" ] ; then thirdy="وستمئة" ; fi
161 if [scip-shell system . . `[`. "$thirdy" = "7" ] ; then thirdy="وسبعمئة" ; fi
162 if [scip-shell system . . `[`. "$thirdy" = "8" ] ; then thirdy="وثمانمئة" ; fi
163 if [scip-shell system . . `[`. "$thirdy" = "9" ] ; then thirdy="وتسعمئة" ; fi
164 if [scip-shell system . . `[`. "$forthy" = "0" ] ; then forthy="" ; fi
165 if [scip-shell system . . `[`. "$forthy" = "1" ] ; then forthy="وألف" ; fi
166 if [scip-shell system . . `[`. "$forthy" = "2" ] ; then forthy="وألفين" ; fi
167 if [scip-shell system . . `[`. "$forthy" = "3" ] ; then forthy="وثلاث آلاف" ; fi
168 if [scip-shell system . . `[`. "$forthy" = "4" ] ; then forthy="وأربع آلاف" ; fi
169 if [scip-shell system . . `[`. "$forthy" = "5" ] ; then forthy="وخمس آلاف" ; fi
170 if [scip-shell system . . `[`. "$forthy" = "6" ] ; then forthy="وست آلاف" ; fi
171 if [scip-shell system . . `[`. "$forthy" = "7" ] ; then forthy="وسبع آلاف" ; fi
172 if [scip-shell system . . `[`. "$forthy" = "8" ] ; then forthy="وثمان آلاف" ; fi
173 if [scip-shell system . . `[`. "$forthy" = "9" ] ; then forthy="وتسع آلاف" ; fi
174 hijridate="`echoscip-shell system . . echo. $tnday $tday $men $tmonth $sana $tfirsty $tsecondy $thirdy $forthy | sedscip-shell system . . sed. "s: : :g" | sedscip-shell system . . sed. "s: : :g"`"
175 h_gnomescip-shell shell shell-project 0.0.0 h_gnome().()
176 {
177 zenity --title="هجري $ver" --info --text="$hijridate"
178 }
179 h_kdescip-shell shell shell-project 0.0.0 h_kde().()
180 {
181 kdialog --title="هجري $ver" --msgbox "$hijridate"
182 }
183 h_guiscip-shell shell shell-project 0.0.0 h_gui().()
184 {
185 if testscip-shell system . . test. -x "`whichscip-shell system . . which. zenity 2>/dev/nullscip-shell filesystem . . `/dev/null`.`"
186 then
187 h_gnomescip-shell shell shell-project 0.0.0 h_gnome().
188 elif testscip-shell system . . test. -x "`whichscip-shell system . . which. kdialog 2>/dev/nullscip-shell filesystem . . `/dev/null`.`"
189 then
190 h_kdescip-shell shell shell-project 0.0.0 h_kde().
191 else echoscip-shell system . . echo. "لا تتوفر واجهة رسومية مدعومة مثبتة"
192 fi
193 }
194 if [scip-shell system . . `[`. "$arg1" = "رسومي" ]
195 then h_guiscip-shell shell shell-project 0.0.0 h_gui().
196 elif [scip-shell system . . `[`. "$arg1" = "حول" ]
197 then echoscip-shell system . . echo. "$about" ; exit
198 elif [scip-shell system . . `[`. "$arg1" = "مساعدة" ]
199 then echoscip-shell system . . echo. "$help" ; exit
200 elif [scip-shell system . . `[`. "$arg1" = "--help" ]
201 then echoscip-shell system . . echo. "$help" ; exit
202 elif [scip-shell system . . `[`. "$arg1" = "مختصر" ]
203 then echoscip-shell system . . echo. "$day $tmonth $year" ; exit
204 else echoscip-shell system . . echo. "$hijridate"
205 fi
206 #---------------------------------------------------------------
207 #----Allah-all-thanked-to-help-me-to-write-this-program---------
208 #----and-I-ask-him-to-make-the-benefit-for-you------------------
209 #----allah-can-do-that------------------------------------------
210 #---------------------------------------------------------------
211 #----With-our-best-wishes---------------------------------------
212 #----almasa-project---------------------------------------------
213 #---------------------------------------------------------------