Add README.md and LICENSE
This commit is contained in:
		
							parent
							
								
									9a8f3c1ee4
								
							
						
					
					
						commit
						aa24c9003f
					
				
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2023 Edward Betts <edward@4angle.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
					in the Software without restriction, including without limitation the rights
 | 
				
			||||||
 | 
					to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
				
			||||||
 | 
					copies of the Software, and to permit persons to whom the Software is
 | 
				
			||||||
 | 
					furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included in all
 | 
				
			||||||
 | 
					copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
				
			||||||
 | 
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
				
			||||||
 | 
					FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
				
			||||||
 | 
					AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			||||||
 | 
					LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
				
			||||||
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
 | 
					SOFTWARE.
 | 
				
			||||||
							
								
								
									
										70
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,70 @@
 | 
				
			||||||
 | 
					# Conference Check Script
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This Python script checks if the websites for future tech conferences are live.
 | 
				
			||||||
 | 
					It is designed to be run from a cron job. If a conference website is live, the
 | 
				
			||||||
 | 
					script sends an email notification.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Requirements
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Python 3
 | 
				
			||||||
 | 
					- Requests library (`pip install requests`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Clone the Git repository containing the script:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ```bash
 | 
				
			||||||
 | 
					   git clone https://git.4angle.com/edward/conference-check.git conference-check
 | 
				
			||||||
 | 
					   ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. Modify the `conferences` list in the script to include the conferences you
 | 
				
			||||||
 | 
					   want to monitor. Each entry should be a tuple containing the conference name
 | 
				
			||||||
 | 
					   and its URL.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3. Configure the email settings in the script:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   - `MAIL_FROM`: The email address from which notifications will be sent.
 | 
				
			||||||
 | 
					   - `MAIL_TO_NAME`: The recipient's name.
 | 
				
			||||||
 | 
					   - `MAIL_TO_ADDRESS`: The recipient's email address.
 | 
				
			||||||
 | 
					   - `SMTP_HOST`: The SMTP server hostname.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4. Set up a cron job to run the script periodically. For example, to run it every hour:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ```bash
 | 
				
			||||||
 | 
					   0 * * * * /usr/bin/python3 /path/to/conference-check/script.py
 | 
				
			||||||
 | 
					   ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Script Description
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- The script uses the `requests` library to make HTTP requests to the
 | 
				
			||||||
 | 
					  conference websites.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- It checks for specific messages in the website content to determine if the
 | 
				
			||||||
 | 
					  website is not live (e.g., "404 Not Found" or "500 Internal Server Error").
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- If a conference website is live, the script extracts the web page title and
 | 
				
			||||||
 | 
					  sends an email notification with the conference details.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Customization
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can customize the script further by modifying the following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- `not_here_list`: Add or remove messages that indicate the website is not live.
 | 
				
			||||||
 | 
					- `AGENT` and `headers`: Modify the user-agent and headers used for HTTP requests.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Here's an example of how to add a conference to the `conferences` list:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```python
 | 
				
			||||||
 | 
					("Example Conference", "https://example-conference.com/")
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This script is provided under the MIT License. You can find the full license
 | 
				
			||||||
 | 
					text in the `LICENSE` file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Author
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Edward Betts (Contact: edward@4angle.com)
 | 
				
			||||||
		Loading…
	
		Reference in a new issue