├── .gitignore ├── .github └── FUNDING.yml ├── requirements.txt ├── Assets ├── DiscordBot.png └── Coupon-Promo-Code-Web-Scraper-Banner.png ├── keep_alive.py ├── .env.example ├── README.MD ├── main.py └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | codes.txt 2 | .env 3 | test* -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [Prem-ium] 2 | custom: https://www.buymeacoffee.com/prem.ium 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | apprise 2 | Flask 3 | python-dotenv 4 | selenium 5 | webdriver_manager -------------------------------------------------------------------------------- /Assets/DiscordBot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Prem-ium/Wired-Coupon-Scraper/HEAD/Assets/DiscordBot.png -------------------------------------------------------------------------------- /Assets/Coupon-Promo-Code-Web-Scraper-Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Prem-ium/Wired-Coupon-Scraper/HEAD/Assets/Coupon-Promo-Code-Web-Scraper-Banner.png -------------------------------------------------------------------------------- /keep_alive.py: -------------------------------------------------------------------------------- 1 | # Full Instructions: 2 | 3 | # Enable Keep Alive by using the KEEP_ALIVE variable in .env 4 | # After running, you can copy the URL from the console and paste it into an UptimeRobot monitor to keep the bot alive 24/7 5 | # Personally, I use Replit to host my flask always-on projects (https://replit.com/). 6 | 7 | from flask import Flask 8 | from threading import Thread 9 | 10 | app = Flask('') 11 | 12 | @app.route('/') 13 | def home(): 14 | return "Program is online/active, all thanks to UpTimeRobot!" 15 | 16 | def run(): 17 | app.run(host = '0.0.0.0', port = 8080) 18 | 19 | def keep_alive(): 20 | t = Thread(target = run) 21 | t.start() -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Type: List of Strings 2 | # Default:["walmart"] 3 | # A list of supported retailers and businesses that have a coupon page on Wired.com 4 | # Example: 5 | RETAILERS=["doordash","walmart","ebay"] 6 | 7 | # Type: String 8 | # Default: None/Disabled 9 | # Values: Any Apprise URL 10 | # Description: Configure Apprise URL Alerts (https://github.com/caronc/apprise/wiki) 11 | APPRISE_ALERTS= 12 | 13 | # Type: Boolean 14 | # Values: True, False 15 | # Default: False 16 | # Description: Allow duplicate alerts/coupon codes 17 | ALLOW_DUPLICATES= 18 | 19 | 20 | # Type: Boolean 21 | # Default: False 22 | # Values: True | False 23 | # Description: Enable to use Flask to prevent script from dying. (Run 24/7 on replit for free.) 24 | KEEP_ALIVE=False 25 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 |

🛒 Wired Coupon Automation Tool 💸

2 | 3 |

4 | Wired Coupon Automation Tool Banner 5 |

6 | 7 |

8 | Selenium script to retrieve the latest Wired Coupons & Promo Codes for various websites such as Walmart, DoorDash, eBay, and more. 9 |

10 | 11 |

12 | 13 | 14 | 15 | GitHub Sponsor 16 | 17 |

18 | 19 | --- 20 | 🚨 **Project Archived** 🚨 21 | 22 | As of **April 3, 2025**, Wired has updated their website layout, breaking the current implementation of this project. A **new version** utilizing an alternative site may be developed exclusively for **GitHub Gold sponsors** in the future, with a **free public release** planned at a later date. 23 | 24 | For now, this project is **no longer maintained** as of **April 3, 2025**. Thank you for your support! 🚀 25 | --- 26 | 27 | ## 🚀 Demo 28 | 29 | ### **Gold Sponsor Demo** 30 | Gold Sponsors get access to **exclusive features**, including Discord Bot integration for this project. If you're a `Gold` tier sponsor, please access the private repository containing the full script with Discord integration instead of this public version. 31 | 32 | **Demo Video:** 33 | 37 | 38 |
39 | Image Preview 40 | 41 | ![Discord Bot Demo](https://github.com/Prem-ium/Wired-Coupon-Scraper/blob/main/Assets/DiscordBot.png?raw=true) 42 | 43 |
44 | 45 | ### **Public Version Demo** 46 | This is a demo of the **public** version of the project. 47 | 48 | **Demo Video:** 49 | 53 | 54 |
55 | Console Output Preview 56 | 57 | ```python 58 | ------------------------------------------------------------- 59 | Welcome to Wired Coupon Scraper. 60 | 61 | RETAILERS argument received. 62 | Gathering coupon codes for: ['amazon'] 63 | -------------------------------------------------- 64 | codes.txt file already exists 65 | -------------------------------------------------- 66 | Retrieving AMAZON Promo Code Offers... 67 | 68 | 108 AMAZON Promo Codes/Coupons were found! 69 | -------------------------------------------------- 70 | Take 40% Off select products from Kwfrhix - Amazon Promo Code: 71 | 40MMS6OP 72 | https://www.wired.com/coupons/get/94554598?popup=true 73 | 74 | Appended Take 40% Off select products from Kwfrhix - Amazon Promo Code: - https://www.wired.com/coupons/get/94554598?popup=true 75 | -------------------------------------------------- 76 | Enjoy 40% Off select JingLeXin products - Amazon Promo Code: 77 | 40YPKL1X 78 | https://www.wired.com/coupons/get/94554602?popup=true 79 | 80 | Appended Enjoy 40% Off select JingLeXin products - Amazon Promo Code: - 40YPKL1X - https://www.wired.com/coupons/get/94554602?popup=true 81 | -------------------------------------------------- 82 | *---Rest of Promo Codes---* 83 | ``` 84 |
85 | 86 | --- 87 | 88 | ## ⚙️ Environment Variables 89 | 90 | The following environment variables can be configured to customize the script's behavior. All variables are **optional** and have default values: 91 | 92 | | Variable | Default | Description | 93 | |--------------------|-----------------------|-------------| 94 | | `RETAILERS` | `["walmart"]` | A JSON-formatted list of supported retailers. Example: `["walmart", "amazon", "target"]`. | 95 | | `APPRISE_ALERTS` | None | A comma-separated list of Apprise notification service URLs for coupon alerts. Example: `discord://webhook_id/webhook_token,mailto://user:pass@smtp.example.com`. | 96 | | `ALLOW_DUPLICATES` | `False` | If `True`, duplicate coupons will be sent to Apprise alerts. | 97 | | `KEEP_ALIVE` | `False` | If `True`, the script runs a Flask server for Keep-Alive functionality. | 98 | 99 | --- 100 | 101 | ## 📥 Installation 102 | 103 | 1. **Clone the repository:** 104 | ```bash 105 | git clone https://github.com/Prem-ium/Wired-Coupon-Scraper.git 106 | cd Wired-Coupon-Scraper 107 | ``` 108 | 109 | 2. **Install dependencies:** 110 | ```bash 111 | pip install -r requirements.txt 112 | ``` 113 | 114 | 3. **Set up environment variables.** 115 | 116 | 4. **Run the script:** 117 | - Without arguments: 118 | ```bash 119 | python main.py 120 | ``` 121 | - With retailer arguments (comma-separated): 122 | ```bash 123 | python main.py amazon,doordash 124 | ``` 125 | 126 | --- 127 | 128 | ## ❤️ Donations 129 | 130 | If you appreciate my work and want to support future development, consider donating: 131 | 132 | 1. **GitHub Sponsors** *(Preferred – No transaction fees & includes perks!)* 133 | - [Donate via GitHub Sponsors](https://github.com/sponsors/Prem-ium) 134 | - [![GitHub Sponsor](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/Prem-ium) 135 | 136 | 2. **Buy Me A Coffee** *(Alternative donation method)* 137 | - [Donate via Buy Me A Coffee](https://www.buymeacoffee.com/prem.ium) 138 | - [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/prem.ium) 139 | 140 | 3. **Referral Links** *(Support without direct donations!)* 141 | - Use my curated [Referral Links](https://github.com/Prem-ium/Referral-Link-Me/blob/main/README.md) for cashback, credit card bonuses, and brokerage rewards. 142 | - [Explore Referral Links](https://github.com/Prem-ium/Referral-Link-Me/blob/main/README.md) 143 | 144 | Your support helps fund **new features**, **project improvements**, and **better automation tools**. Thank you! 🚀 145 | 146 | --- 147 | 148 | ## Experiencing Issues? 🛠️ 149 | 150 | Issues are disabled for the general public. As of **9/8/2024**, only **Silver/Gold tier sponsors** receive direct support. If you need assistance, please consider sponsoring me: 151 | 152 | [![Sponsor](https://img.shields.io/badge/sponsor-EA4AAA?style=for-the-badge&logo=GitHub-Sponsors&logoColor=white)](https://github.com/sponsors/Prem-ium) 153 | 154 | --- 155 | 156 | ## 📜 License 157 | 158 | This project is licensed under the **GNU General Public License v3.0 (GPL-3.0)**. See the `LICENSE` file for details. -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import os, sys, datetime, traceback, apprise 2 | import signal 3 | import time 4 | from selenium import webdriver 5 | from datetime import datetime 6 | from selenium.webdriver.common.by import By 7 | from selenium.webdriver.chrome.options import Options 8 | from webdriver_manager.chrome import ChromeDriverManager 9 | from selenium.webdriver.chrome.service import Service 10 | from dotenv import load_dotenv 11 | 12 | # Setup environment 13 | load_dotenv() 14 | 15 | print("\n" + "="*80) 16 | print("IMPORTANT NOTICE: As of 4/3/25, Wired has overhauled their coupon website layout, breaking the current implementation.") 17 | print("A new version **may** be developed for GitHub Gold sponsors, with a free public release planned at a later date.\n") 18 | print("Become a Gold sponsor here:\thttps://github.com/sponsors/Prem-ium \n\n" 19 | "This project is no longer maintained as of 4/3/25.\n" 20 | "Press Enter to run the old script anyway or Ctrl+C to exit.") 21 | print("="*80 + "\n") 22 | input("Press Enter to continue...") 23 | 24 | # Print Welcome Message 25 | print(f"\n{'-' * 75}\nWelcome to Wired Coupon Scraper.\n\nAn automation script to retrieve multiple retailer promotion codes and offers from the Wired website.\nCreated by Prem-ium (https://github.com/Prem-ium)\n\n") 26 | print(f"{'-' * 75}\nWant coupons on the go? Become a Gold Sponsor for exclusive Discord Bot support!\n\nAs a Gold Sponsor, you'll gain:\n- Instant access to coupon notifications anytime, anywhere\n- Be the first to know about new promo codes and offers\n- Priority support for any issues or requests\n\nBecome a Gold Sponsor today and never miss a deal again: [Gold Sponsor page](https://github.com/sponsors/Prem-ium)\n") 27 | 28 | # Retrieve CLI Arguments & Environment Variables 29 | if len(sys.argv) == 2: 30 | RETAILERS = sys.argv[1].split(",") 31 | print(f"RETAILERS argument received.\nGathering coupon codes for: {RETAILERS}\n{'-' * 50}") 32 | else: 33 | RETAILERS = os.environ.get("RETAILERS", None) 34 | if RETAILERS is None: 35 | print(f"No arguments or environment variables received for RETAILERS... Defaulting to Walmart.\n{'-' * 50}") 36 | RETAILERS = ["walmart"] 37 | 38 | ALLOW_DUPLICATES = True if os.environ.get("ALLOW_DUPLICATES", "False").lower() == "true" else False 39 | 40 | if os.environ.get("KEEP_ALIVE", "False").lower() == "true": 41 | from keep_alive import keep_alive 42 | keep_alive() 43 | KEEP_ALIVE = True 44 | else: 45 | KEEP_ALIVE = False 46 | 47 | # Set up Apprise, if enabled 48 | APPRISE_ALERTS = os.environ.get("APPRISE_ALERTS", None) 49 | if APPRISE_ALERTS: 50 | APPRISE_ALERTS = APPRISE_ALERTS.split(",") 51 | alerts = apprise.Apprise() 52 | for service in APPRISE_ALERTS: 53 | alerts.add(service) 54 | 55 | def getDriver(): 56 | """Initialize and return the WebDriver for Chrome.""" 57 | chrome_options = Options() 58 | chrome_options.add_argument('--no-sandbox') 59 | chrome_options.add_argument('--disable-dev-shm-usage') 60 | try: 61 | driver = webdriver.Chrome( 62 | service=Service(ChromeDriverManager().install()), 63 | options=chrome_options) 64 | except Exception as e: 65 | driver = webdriver.Chrome(options=chrome_options) 66 | return driver 67 | 68 | def cached_codes_init(): 69 | """Initialize cached codes file, clearing it on the first day of the month.""" 70 | if not os.path.isfile("codes.txt"): 71 | open("codes.txt", "a").close() 72 | print("Created new codes.txt file") 73 | else: 74 | with open("codes.txt", "r") as f: 75 | if datetime.now().day == 1 and f.readlines(): 76 | print("It's the first day of the month. Clearing the codes.txt file.") 77 | with open("codes.txt", "w"): pass 78 | else: 79 | print("codes.txt file already exists") 80 | 81 | def check_cached_codes(code): 82 | """Check if the code is already cached.""" 83 | with open("codes.txt") as f: 84 | lines = f.readlines() 85 | lines = [line.strip() for line in lines] 86 | if f"{str(code)}\n" in lines: 87 | print(f"Code {code} found in cache") 88 | return True 89 | return False 90 | 91 | def append_cached_code(code): 92 | """Append the code to the cache file.""" 93 | with open("codes.txt", "a") as f: 94 | f.write(f"{code}\n") 95 | print(f"Appended {code} to codes.txt") 96 | 97 | def handle_shutdown_signal(signum, frame): 98 | """Gracefully handle shutdown signal (e.g., CTRL+C).""" 99 | print("Graceful shutdown initiated...") 100 | sys.exit(0) 101 | 102 | def run_program(): 103 | """Run the main program logic, handling continuous execution if required.""" 104 | if not ALLOW_DUPLICATES: 105 | cached_codes_init() 106 | 107 | driver = getDriver() 108 | 109 | for type in RETAILERS: 110 | print(f'{"-" * 70}\nRetrieving {type.upper()} Promo Code Offers...\n') 111 | driver.get(f'https://www.wired.com/coupons/{type}') 112 | 113 | coupons = driver.find_element(By.CLASS_NAME, 'coupons-list').find_elements(By.TAG_NAME, 'a') 114 | ids = [coupon.get_attribute('href') for coupon in coupons] 115 | 116 | print(f'{len(coupons)} {type.upper()} Promo Codes/Coupons were found!') 117 | 118 | for id in ids: 119 | try: 120 | driver.get(id) 121 | driver.refresh() 122 | time.sleep(2) 123 | print('-' * 50) 124 | title = driver.find_element(By.XPATH, '//*[@id="my-modal"]/div/div/div/h3') 125 | code = driver.find_element(By.XPATH, '//*[@id="my-modal"]/div/div/div/div[2]/span') 126 | try: 127 | link = driver.find_element(By.CLASS_NAME, 'modal-clickout__link').get_attribute("href") 128 | except: 129 | link = "(Error retrieving link)" 130 | print(traceback.format_exc()) 131 | 132 | data = f'{title.text}:\n\t{code.text} \n{link}\n' 133 | print(data) 134 | 135 | if APPRISE_ALERTS: 136 | alerts.notify(title=f'{type.upper()} Coupon', body=f'{title.text}\n\n{code.text}\n{link}') 137 | 138 | data = data.replace("\n", " - ") 139 | 140 | if not ALLOW_DUPLICATES: 141 | if check_cached_codes(data): 142 | print(f"Code {code.text} for {title.text} already exists in cache, skipping") 143 | continue 144 | else: 145 | append_cached_code(data) 146 | except WebDriverException as e: 147 | print(traceback.format_exc()) 148 | if "no such window: target window already closed" in str(e): 149 | continue 150 | except Exception as e: 151 | print(f"Error processing coupon: {e}") 152 | finally: 153 | print('-' * 50) 154 | 155 | print(f'{"-" * 70}\nFinished retrieving promotions.\n{"-" * 70}') 156 | print("\nWant coupons on the go? Become a Gold Sponsor for exclusive Discord Bot support!") 157 | print("Gain instant access to coupon notifications and more. Visit our [Gold Sponsor page](https://github.com/sponsors/Prem-ium) for more details.") 158 | 159 | def main(): 160 | """Main entry point for running the program.""" 161 | run_program() 162 | 163 | if __name__ == '__main__': 164 | signal.signal(signal.SIGINT, handle_shutdown_signal) 165 | if not KEEP_ALIVE: 166 | main() 167 | else: 168 | while True: 169 | try: 170 | main() 171 | time.sleep(3600) 172 | except: 173 | print(traceback.format_exc()) 174 | time.sleep(60) 175 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The licenses for most software are designed to take away your 11 | freedom to share and change it. By contrast, the GNU General Public 12 | License is intended to guarantee your freedom to share and change free 13 | software--to make sure the software is free for all its users. This 14 | General Public License applies to most of the Free Software 15 | Foundation's software and to any other program whose authors commit to 16 | using it. (Some other Free Software Foundation software is covered by 17 | the GNU Lesser General Public License instead.) You can apply it to 18 | your programs, too. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | this service if you wish), that you receive source code or can get it 24 | if you want it, that you can change the software or use pieces of it 25 | in new free programs; and that you know you can do these things. 26 | 27 | To protect your rights, we need to make restrictions that forbid 28 | anyone to deny you these rights or to ask you to surrender the rights. 29 | These restrictions translate to certain responsibilities for you if you 30 | distribute copies of the software, or if you modify it. 31 | 32 | For example, if you distribute copies of such a program, whether 33 | gratis or for a fee, you must give the recipients all the rights that 34 | you have. You must make sure that they, too, receive or can get the 35 | source code. And you must show them these terms so they know their 36 | rights. 37 | 38 | We protect your rights with two steps: (1) copyright the software, and 39 | (2) offer you this license which gives you legal permission to copy, 40 | distribute and/or modify the software. 41 | 42 | Also, for each author's protection and ours, we want to make certain 43 | that everyone understands that there is no warranty for this free 44 | software. If the software is modified by someone else and passed on, we 45 | want its recipients to know that what they have is not the original, so 46 | that any problems introduced by others will not reflect on the original 47 | authors' reputations. 48 | 49 | Finally, any free program is threatened constantly by software 50 | patents. We wish to avoid the danger that redistributors of a free 51 | program will individually obtain patent licenses, in effect making the 52 | program proprietary. To prevent this, we have made it clear that any 53 | patent must be licensed for everyone's free use or not licensed at all. 54 | 55 | The precise terms and conditions for copying, distribution and 56 | modification follow. 57 | 58 | GNU GENERAL PUBLIC LICENSE 59 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 60 | 61 | 0. This License applies to any program or other work which contains 62 | a notice placed by the copyright holder saying it may be distributed 63 | under the terms of this General Public License. The "Program", below, 64 | refers to any such program or work, and a "work based on the Program" 65 | means either the Program or any derivative work under copyright law: 66 | that is to say, a work containing the Program or a portion of it, 67 | either verbatim or with modifications and/or translated into another 68 | language. (Hereinafter, translation is included without limitation in 69 | the term "modification".) Each licensee is addressed as "you". 70 | 71 | Activities other than copying, distribution and modification are not 72 | covered by this License; they are outside its scope. The act of 73 | running the Program is not restricted, and the output from the Program 74 | is covered only if its contents constitute a work based on the 75 | Program (independent of having been made by running the Program). 76 | Whether that is true depends on what the Program does. 77 | 78 | 1. You may copy and distribute verbatim copies of the Program's 79 | source code as you receive it, in any medium, provided that you 80 | conspicuously and appropriately publish on each copy an appropriate 81 | copyright notice and disclaimer of warranty; keep intact all the 82 | notices that refer to this License and to the absence of any warranty; 83 | and give any other recipients of the Program a copy of this License 84 | along with the Program. 85 | 86 | You may charge a fee for the physical act of transferring a copy, and 87 | you may at your option offer warranty protection in exchange for a fee. 88 | 89 | 2. You may modify your copy or copies of the Program or any portion 90 | of it, thus forming a work based on the Program, and copy and 91 | distribute such modifications or work under the terms of Section 1 92 | above, provided that you also meet all of these conditions: 93 | 94 | a) You must cause the modified files to carry prominent notices 95 | stating that you changed the files and the date of any change. 96 | 97 | b) You must cause any work that you distribute or publish, that in 98 | whole or in part contains or is derived from the Program or any 99 | part thereof, to be licensed as a whole at no charge to all third 100 | parties under the terms of this License. 101 | 102 | c) If the modified program normally reads commands interactively 103 | when run, you must cause it, when started running for such 104 | interactive use in the most ordinary way, to print or display an 105 | announcement including an appropriate copyright notice and a 106 | notice that there is no warranty (or else, saying that you provide 107 | a warranty) and that users may redistribute the program under 108 | these conditions, and telling the user how to view a copy of this 109 | License. (Exception: if the Program itself is interactive but 110 | does not normally print such an announcement, your work based on 111 | the Program is not required to print an announcement.) 112 | 113 | These requirements apply to the modified work as a whole. If 114 | identifiable sections of that work are not derived from the Program, 115 | and can be reasonably considered independent and separate works in 116 | themselves, then this License, and its terms, do not apply to those 117 | sections when you distribute them as separate works. But when you 118 | distribute the same sections as part of a whole which is a work based 119 | on the Program, the distribution of the whole must be on the terms of 120 | this License, whose permissions for other licensees extend to the 121 | entire whole, and thus to each and every part regardless of who wrote it. 122 | 123 | Thus, it is not the intent of this section to claim rights or contest 124 | your rights to work written entirely by you; rather, the intent is to 125 | exercise the right to control the distribution of derivative or 126 | collective works based on the Program. 127 | 128 | In addition, mere aggregation of another work not based on the Program 129 | with the Program (or with a work based on the Program) on a volume of 130 | a storage or distribution medium does not bring the other work under 131 | the scope of this License. 132 | 133 | 3. You may copy and distribute the Program (or a work based on it, 134 | under Section 2) in object code or executable form under the terms of 135 | Sections 1 and 2 above provided that you also do one of the following: 136 | 137 | a) Accompany it with the complete corresponding machine-readable 138 | source code, which must be distributed under the terms of Sections 139 | 1 and 2 above on a medium customarily used for software interchange; or, 140 | 141 | b) Accompany it with a written offer, valid for at least three 142 | years, to give any third party, for a charge no more than your 143 | cost of physically performing source distribution, a complete 144 | machine-readable copy of the corresponding source code, to be 145 | distributed under the terms of Sections 1 and 2 above on a medium 146 | customarily used for software interchange; or, 147 | 148 | c) Accompany it with the information you received as to the offer 149 | to distribute corresponding source code. (This alternative is 150 | allowed only for noncommercial distribution and only if you 151 | received the program in object code or executable form with such 152 | an offer, in accord with Subsection b above.) 153 | 154 | The source code for a work means the preferred form of the work for 155 | making modifications to it. For an executable work, complete source 156 | code means all the source code for all modules it contains, plus any 157 | associated interface definition files, plus the scripts used to 158 | control compilation and installation of the executable. However, as a 159 | special exception, the source code distributed need not include 160 | anything that is normally distributed (in either source or binary 161 | form) with the major components (compiler, kernel, and so on) of the 162 | operating system on which the executable runs, unless that component 163 | itself accompanies the executable. 164 | 165 | If distribution of executable or object code is made by offering 166 | access to copy from a designated place, then offering equivalent 167 | access to copy the source code from the same place counts as 168 | distribution of the source code, even though third parties are not 169 | compelled to copy the source along with the object code. 170 | 171 | 4. You may not copy, modify, sublicense, or distribute the Program 172 | except as expressly provided under this License. Any attempt 173 | otherwise to copy, modify, sublicense or distribute the Program is 174 | void, and will automatically terminate your rights under this License. 175 | However, parties who have received copies, or rights, from you under 176 | this License will not have their licenses terminated so long as such 177 | parties remain in full compliance. 178 | 179 | 5. You are not required to accept this License, since you have not 180 | signed it. However, nothing else grants you permission to modify or 181 | distribute the Program or its derivative works. These actions are 182 | prohibited by law if you do not accept this License. Therefore, by 183 | modifying or distributing the Program (or any work based on the 184 | Program), you indicate your acceptance of this License to do so, and 185 | all its terms and conditions for copying, distributing or modifying 186 | the Program or works based on it. 187 | 188 | 6. Each time you redistribute the Program (or any work based on the 189 | Program), the recipient automatically receives a license from the 190 | original licensor to copy, distribute or modify the Program subject to 191 | these terms and conditions. You may not impose any further 192 | restrictions on the recipients' exercise of the rights granted herein. 193 | You are not responsible for enforcing compliance by third parties to 194 | this License. 195 | 196 | 7. If, as a consequence of a court judgment or allegation of patent 197 | infringement or for any other reason (not limited to patent issues), 198 | conditions are imposed on you (whether by court order, agreement or 199 | otherwise) that contradict the conditions of this License, they do not 200 | excuse you from the conditions of this License. If you cannot 201 | distribute so as to satisfy simultaneously your obligations under this 202 | License and any other pertinent obligations, then as a consequence you 203 | may not distribute the Program at all. For example, if a patent 204 | license would not permit royalty-free redistribution of the Program by 205 | all those who receive copies directly or indirectly through you, then 206 | the only way you could satisfy both it and this License would be to 207 | refrain entirely from distribution of the Program. 208 | 209 | If any portion of this section is held invalid or unenforceable under 210 | any particular circumstance, the balance of the section is intended to 211 | apply and the section as a whole is intended to apply in other 212 | circumstances. 213 | 214 | It is not the purpose of this section to induce you to infringe any 215 | patents or other property right claims or to contest validity of any 216 | such claims; this section has the sole purpose of protecting the 217 | integrity of the free software distribution system, which is 218 | implemented by public license practices. Many people have made 219 | generous contributions to the wide range of software distributed 220 | through that system in reliance on consistent application of that 221 | system; it is up to the author/donor to decide if he or she is willing 222 | to distribute software through any other system and a licensee cannot 223 | impose that choice. 224 | 225 | This section is intended to make thoroughly clear what is believed to 226 | be a consequence of the rest of this License. 227 | 228 | 8. If the distribution and/or use of the Program is restricted in 229 | certain countries either by patents or by copyrighted interfaces, the 230 | original copyright holder who places the Program under this License 231 | may add an explicit geographical distribution limitation excluding 232 | those countries, so that distribution is permitted only in or among 233 | countries not thus excluded. In such case, this License incorporates 234 | the limitation as if written in the body of this License. 235 | 236 | 9. The Free Software Foundation may publish revised and/or new versions 237 | of the General Public License from time to time. Such new versions will 238 | be similar in spirit to the present version, but may differ in detail to 239 | address new problems or concerns. 240 | 241 | Each version is given a distinguishing version number. If the Program 242 | specifies a version number of this License which applies to it and "any 243 | later version", you have the option of following the terms and conditions 244 | either of that version or of any later version published by the Free 245 | Software Foundation. If the Program does not specify a version number of 246 | this License, you may choose any version ever published by the Free Software 247 | Foundation. 248 | 249 | 10. If you wish to incorporate parts of the Program into other free 250 | programs whose distribution conditions are different, write to the author 251 | to ask for permission. For software which is copyrighted by the Free 252 | Software Foundation, write to the Free Software Foundation; we sometimes 253 | make exceptions for this. Our decision will be guided by the two goals 254 | of preserving the free status of all derivatives of our free software and 255 | of promoting the sharing and reuse of software generally. 256 | 257 | NO WARRANTY 258 | 259 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 260 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 261 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 262 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 263 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 264 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 265 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 266 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 267 | REPAIR OR CORRECTION. 268 | 269 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 270 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 271 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 272 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 273 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 274 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 275 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 276 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 277 | POSSIBILITY OF SUCH DAMAGES. 278 | 279 | END OF TERMS AND CONDITIONS 280 | 281 | How to Apply These Terms to Your New Programs 282 | 283 | If you develop a new program, and you want it to be of the greatest 284 | possible use to the public, the best way to achieve this is to make it 285 | free software which everyone can redistribute and change under these terms. 286 | 287 | To do so, attach the following notices to the program. It is safest 288 | to attach them to the start of each source file to most effectively 289 | convey the exclusion of warranty; and each file should have at least 290 | the "copyright" line and a pointer to where the full notice is found. 291 | 292 | 293 | Copyright (C) 294 | 295 | This program is free software; you can redistribute it and/or modify 296 | it under the terms of the GNU General Public License as published by 297 | the Free Software Foundation; either version 2 of the License, or 298 | (at your option) any later version. 299 | 300 | This program is distributed in the hope that it will be useful, 301 | but WITHOUT ANY WARRANTY; without even the implied warranty of 302 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 303 | GNU General Public License for more details. 304 | 305 | You should have received a copy of the GNU General Public License along 306 | with this program; if not, write to the Free Software Foundation, Inc., 307 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 308 | 309 | Also add information on how to contact you by electronic and paper mail. 310 | 311 | If the program is interactive, make it output a short notice like this 312 | when it starts in an interactive mode: 313 | 314 | Gnomovision version 69, Copyright (C) year name of author 315 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 316 | This is free software, and you are welcome to redistribute it 317 | under certain conditions; type `show c' for details. 318 | 319 | The hypothetical commands `show w' and `show c' should show the appropriate 320 | parts of the General Public License. Of course, the commands you use may 321 | be called something other than `show w' and `show c'; they could even be 322 | mouse-clicks or menu items--whatever suits your program. 323 | 324 | You should also get your employer (if you work as a programmer) or your 325 | school, if any, to sign a "copyright disclaimer" for the program, if 326 | necessary. Here is a sample; alter the names: 327 | 328 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 329 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 330 | 331 | , 1 April 1989 332 | Ty Coon, President of Vice 333 | 334 | This General Public License does not permit incorporating your program into 335 | proprietary programs. If your program is a subroutine library, you may 336 | consider it more useful to permit linking proprietary applications with the 337 | library. If this is what you want to do, use the GNU Lesser General 338 | Public License instead of this License. 339 | --------------------------------------------------------------------------------