Skip to content
This repository was archived by the owner on Nov 9, 2018. It is now read-only.

Commit ef5c833

Browse files
Updated documentation and added contributing guide
1 parent 61de236 commit ef5c833

2 files changed

Lines changed: 62 additions & 19 deletions

File tree

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing
2+
3+
First off, thank you for considering contributing to USB Canary.
4+
5+
### 1. Where do I go from here?
6+
7+
If you've noticed a bug or have a question [search the issue tracker](https://github.com/probablynotablog/usb-canary/issues?q=something)
8+
to see if someone else in the community has already created a ticket. If not, go ahead and [make one](https://github.com/probablynotablog/usb-canary/issues/new)!
9+
10+
### 2. Fork & create a branch
11+
12+
If this is something you think you can fix, then [fork USB Canary](https://help.github.com/articles/fork-a-repo)
13+
and create a branch with a descriptive name.
14+
15+
A good branch name would be (where issue #325 is the ticket you're working on):
16+
17+
```sh
18+
git checkout -b 325-add-windows-support
19+
```
20+
21+
#### 3. Did you find a bug?
22+
23+
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/probablynotablog/usb-canary/issues).
24+
25+
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/probablynotablog/usb-canary/issues/new).
26+
Be sure to include a **title and clear description**, as much relevant information as possible - use the relevant bug report templates to create the issue.
27+
28+
### 5. Implement your fix or feature
29+
30+
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first.
31+
32+
### 6. Test your changes
33+
34+
We don't currently have an automated test suite, so it's up to you to test your bug fix or feature to ensure it does not impact exsisting features, unless that feature was really a bug and you're fixing it. If you're unable to test your new feature, reach out to one of the maintainers who will be happy to help. (It may take longer to be accepted)
35+
36+
### 7. Make a Pull Request
37+
38+
At this point, you should switch back to your master branch and make sure it's
39+
up to date with USB Canary's master branch.
40+
41+
Push it!
42+
43+
Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request).
44+
45+

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ There are a couple of 3rd party libraries to get USB canary running - for some t
1010
- [slackclient](https://github.com/slackapi/python-slackclient) - A basic client for Slack.com, which can optionally connect to the Slack Real Time Messaging (RTM) API.
1111
- [twilio](https://github.com/twilio/twilio-python) - A Python module for communicating with the Twilio API and generating TwiML
1212
- [pyudev](https://github.com/pyudev/pyudev) - Python bindings to libudev (with support for PyQt4, PySide, pygobject and wx)
13+
- [sander-daemon](https://github.com/serverdensity/python-daemon) - Jejik daemon class improved by Server Density
1314

1415
These can all be installed via `pip`, in some cases you may need to use `pip` with `sudo`. You can install the packages as follows:
1516

1617
```
1718
pip install slackclient
1819
pip install twilio
1920
pip install pyudev
21+
pip install sander-daemon
2022
```
2123

2224
Otherwise you can just run `pip install -r requirements.txt`
@@ -61,23 +63,23 @@ An example `settings.json` file:
6163

6264
Note that `paranoid`, `slack`, and `twilio` are boolean values and should be set to `true` or `false`. If the file is formatted incorrectly and it cannot be parsed, you will get a `ValueError`, you can use [JSONLint](http://jsonlint.com/) if you find yourself having issues with this.
6365

64-
USB Canary, is sort of smart and can 'detect' if you are running `XScreenSaver` or `gnome-screensaver` on your
65-
computer, this is done by just checking which packages are installed via the `apt` library, if both of them are
66-
installed though, it will leave you to determine which one you are using - if you have an unsupported
67-
screensaver, don't fret, you can still run it in paranoid mode.
66+
USB Canary, is sort of smart and can 'detect' if you are running `XScreenSaver` or `gnome-screensaver` on your
67+
computer, this is done by just checking which packages are installed via the `apt` library, if both of them are
68+
installed though, it will leave you to determine which one you are using - if you have an unsupported
69+
screensaver, don't fret, you can still run it in paranoid mode.
6870

69-
Paranoid mode is also suitable for people who want to monitor if their servers have had USB's plugged into them,
70-
although I haven't tested them on Linode, Amazon Web Services, or Digital Ocean it is suitable for those with
71-
physical servers that may need this sort of monitoring.
71+
Paranoid mode is also suitable for people who want to monitor if their servers have had USB's plugged into them,
72+
although I haven't tested them on Linode, Amazon Web Services, or Digital Ocean it is suitable for those with
73+
physical servers that may need this sort of monitoring.
7274

73-
To start the application:
74-
```shell
75+
To start the application:
76+
```shell
7577
./usb_canary.py start | stop | restart
7678
```
7779

7880
## Deployment
7981
The following will outline the basic steps to deploying USB Canary to Slack and Twilio. As extra services are
80-
supported, please ensure you add appropriate documentation.
82+
added, please ensure you add appropriate documentation with your PR.
8183

8284
### Twilio
8385
To use the Twilio intergration you will need to get an:
@@ -107,9 +109,6 @@ usb-canary
107109
├──LICENSE.txt
108110
├──settings.json
109111
├──canary
110-
│ ├──daemon
111-
│ │ ├──__init__.py
112-
│ │ └──daemon.py
113112
│ ├──slack
114113
│ │ ├──slack.py
115114
│ │ ├──slack_bot.py
@@ -128,6 +127,8 @@ usb-canary
128127
│ └──__init__.py
129128
├──README.md <---------------------------------- YOU ARE HERE
130129
├──requirements.txt
130+
├──ISSUE_TEMPLATE.md
131+
├──PULL_REQUEST_TEMPLATE.md
131132
└──usb_canary.py
132133
```
133134
Under the main `canary` directory you will find folders for different services such as Twilio which is named `twilleo`
@@ -141,14 +142,11 @@ Screensaver having their own file, just to keep things tidy.
141142
- [slackclient](https://github.com/slackapi/python-slackclient) - A basic client for Slack.com, which can optionally connect to the Slack Real Time Messaging (RTM) API.
142143
- [twilio](https://github.com/twilio/twilio-python) - A Python module for communicating with the Twilio API and generating TwiML
143144
- [python-apt](https://apt.alioth.debian.org/python-apt-doc/library/index.html) - A library that provides access to almost every functionality supported by the underlying apt-pkg and apt-inst libraries
145+
- [sander-daemon](https://github.com/serverdensity/python-daemon) - Jejik daemon class improved by Server Density
144146

145147
## Contributing
146148

147-
1. Fork it!
148-
2. Create your feature branch: `git checkout -b my-new-feature`
149-
3. Commit your changes: `git commit -am 'Add some feature'`
150-
4. Push to the branch: `git push origin my-new-feature`
151-
5. Submit a pull request
149+
See the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.
152150

153151
## Versioning
154152

@@ -167,4 +165,4 @@ This project is licensed under the GNU GPLv3 License - see the [LICENSE.txt](LIC
167165

168166
## Acknowledgements
169167

170-
- Sander Marechal - I don't know who you are, but you made damonizing this so much easier!
168+
- [timball](https://github.com/timball) - for recommending `sander-daemon`

0 commit comments

Comments
 (0)