Skip to content

Commit 2992efe

Browse files
committed
Conflicts: .gitmodules 2utf8 Makefile README.md main.sh
2 parents 57ca83f + 19a4a00 commit 2992efe

File tree

5 files changed

+114
-3
lines changed

5 files changed

+114
-3
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "2utf8"]
2+
path = 2utf8
3+
url = git://github.com/fosspulchowk/2utf8.git

AUTHORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Avinash Kundaliya <avinash@avinash.com.np>
99
Batsal Awaley <batsal.awaley@gmail.com>
1010
krazedkrish <krazedkrish@gmail.com>
1111
rho <rho.rhoit@gmail.com>
12-
Samundra Shrestha <samundra.shr@gmail.com>
12+
Samundra Shrestha <samundra.shr@gmail.com>
13+
Sujit Maharjan <mail@maharjansujit.com.np>

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SOURCES = $(wildcard *.sh)
2-
SUPPORT = "README.md AUTHORS LICENSE .version"
3-
PKG_NAME = "batti"
2+
SUPPORT = README.org AUTHORS LICENSE .version
3+
PKG_NAME = batti
44
FILE_CONFIG="${HOME}/.cache/batti.sch"
55

66
default:

README.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# batti [:link:][web]
2+
3+
load-shedding information.
4+
5+
![screenshot][screenshot]
6+
7+
![Creative Commons Attribution 3.0 Unported License](http://i.creativecommons.org/l/by/3.0/88x31.png)
8+
9+
batti Copyright © 2013 to the batti Authors.
10+
11+
___
12+
13+
14+
#### Setting up
15+
16+
##### Dependencies
17+
18+
- `poppler-utils` for pdftotext
19+
- [2utf8][2utf8] included in git [sub-module][submodule].
20+
- `sed`, don't the BSD-sed (OS X install GNU sed)
21+
- `wget`
22+
23+
`configure` will check the dependencies
24+
25+
##### Install
26+
27+
```bash
28+
$ git clone --recursive https://github.com/fosspulchowk/batti
29+
$ cd batti
30+
$ ./configure
31+
$ sudo make install
32+
```
33+
34+
**Tip**: see make recipies
35+
36+
37+
#### HOW-TO USE
38+
39+
```bash
40+
$ batti -h
41+
Usage: batti [OPTIONS] [GROUP_NO]
42+
-a | --all Show All [force]
43+
-g | --group Group number 1-7
44+
-t | --today Show today's schedule [uses with group no]
45+
-w | --week Show week's schedule
46+
-u | --update Check for update [ignores extra options]
47+
-x | --xml Dump to xml
48+
-c | --credits Display the Credits
49+
-h | --help Display this message
50+
```
51+
___
52+
53+
#### Plugin & Extension
54+
55+
##### **[charge-khattam][khattam]**:
56+
57+
Python tkinter GUI wrapper.
58+
59+
##### **[Unity Indicator][unity]**
60+
61+
The applet for unity is made by the [samundra][samundra] as
62+
[Nepal-Loadshedding-Indicator][unity]
63+
64+
##### **[conky-forever][conky-forever]**:
65+
66+
To add plugin to [conky-forever][conky-forever] after installation run
67+
do the following.
68+
69+
```bash
70+
$ echo "_conky_forever=/path/to/conky-forever" >> path.config
71+
$ ./conky_plugin.sh [GROUP_NO]
72+
```
73+
74+
##### [conky][conky]
75+
76+
This plugin makes use of [conky][conky] only. You can enable this
77+
plugin via
78+
79+
```bash
80+
$./conky_independent.sh -g 7 -m 1
81+
```
82+
83+
___
84+
85+
#### HOW-IT Works
86+
87+
* Downloads schedule form [nea][nea]
88+
* Extract schedule and put into `~/.cache/batti.sch`
89+
* Processes your query
90+
91+
#### Similar works on github we found!
92+
93+
* [nls](https://github.com/xtranophilist/nls)
94+
* [losh](https://github.com/hardfire/losh)
95+
* [nepalloadshedding](https://github.com/leosabbir/nepalloadshedding)
96+
97+
[nea]: http://www.nea.org.np/loadshedding.html
98+
[2utf8]: https://github.com/foss-np/2utf8
99+
[conky-forever]: https://github.com/rhoit/conky-forever
100+
[submodule]: http://git-scm.com/book/en/Git-Tools-Submodules
101+
[web]: http://foss-np.github.io/batti/
102+
[screenshot]: https://raw.github.com/foss-np/batti/gh-pages/images/screenshot.png
103+
[unity]: https://github.com/samundra/Nepal-Loadshedding-Indicater
104+
[samundra]: https://github.com/samundra/
105+
[conky]: http://conky.sourceforge.net/
106+
[khattam]: https://github.com/haude/charge-khattam

main.sh

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function extract {
3131
cat $TEMP/part.txt | tr '$' '4' > $TEMP/uni.txt
3232

3333
sed 's/ \+/\t/g' $TEMP/uni.txt | head -2 > $SCHEDULE
34+
3435
hash_new=$(md5sum $SCHEDULE)
3536
>&2 echo "> Schedule Extracted"
3637
if [[ "$hash_new" == "$hash_old" ]]; then

0 commit comments

Comments
 (0)