From beb86af4a9948ecbd1635597e42e4bea133a32ed Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 29 Sep 2023 14:10:04 +0100 Subject: [PATCH 1/3] Add mypy_cache to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bee8a64..3883e04 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__ +.mypy_cache From 50f3e3de2c1ab3ac12af3a7e5bff46ee1f77947c Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 29 Sep 2023 14:14:45 +0100 Subject: [PATCH 2/3] Add README.md and LICENSE --- LICENSE | 21 +++++++++++++ README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..379270c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Edward Betts + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..182c34a --- /dev/null +++ b/README.md @@ -0,0 +1,91 @@ +# Wikipedia Disambiguation Link Fixer + +This Flask web application is designed to help fix disambiguation links in +Wikipedia articles. It makes use of various Python modules, including Flask, +SQLAlchemy, lxml, and Jinja2, to provide a user-friendly interface for editing +and saving changes to Wikipedia articles. + +## Features + +- Retrieve a list of articles with disambiguation links from + [dplbot.toolforge.org](https://dplbot.toolforge.org/articles_with_dab_links.php). +- Edit Wikipedia articles directly within the app. +- Automatically generate edit summaries for your changes. +- OAuth integration for secure Wikipedia authentication. + +## Prerequisites + +Before you can run this application, ensure you have the following prerequisites +installed: + +- Python 3.x +- Flask +- SQLAlchemy +- lxml +- Jinja2 +- requests +- requests-oauthlib + +You'll also need to obtain OAuth credentials from Wikipedia to use the +authentication features. + +## Installation + +1. Clone this repository to your local machine: + + ``` + git clone https://github.com/yourusername/wikipedia-disambiguation-fixer.git + ``` + +2. Navigate to the project directory: + + ``` + cd wikipedia-disambiguation-fixer + ``` + +3. Install the required Python packages using pip: + + ``` + pip install -r requirements.txt + ``` + +4. Configure the application by modifying the `config.default` file with your + OAuth credentials and other settings. + +## Usage + +1. Start the Flask application: + + ``` + python3 web_view.py + ``` + +2. Access the app in your web browser at `http://localhost:5000`. + +3. Log in with your Wikipedia account using OAuth. + +4. Browse the list of articles with disambiguation links and make necessary + edits. + +5. Save your edits, and the application will update the Wikipedia articles + accordingly. + +## Contributing + +Contributions are welcome! If you'd like to improve this application or report +issues, please create a pull request or open an issue on the [Forgejo +repository](https://git.4angle.com/edward/dab-mechanic). + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file +for details. + +## Acknowledgments + +- This application was developed by Edward Betts. + +## Contact + +If you have any questions or need assistance, +you can contact Edward Betts at edward@4angle.com From 3d1ee543084db217df6dc092062dbe33db0cdd6a Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 29 Sep 2023 14:16:19 +0100 Subject: [PATCH 3/3] Fixes to README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 182c34a..4fa86ca 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ authentication features. 1. Clone this repository to your local machine: ``` - git clone https://github.com/yourusername/wikipedia-disambiguation-fixer.git + git clone https://git.4angle.com/edward/dab-mechanic.git ``` 2. Navigate to the project directory: ``` - cd wikipedia-disambiguation-fixer + cd dab-mechanic ``` 3. Install the required Python packages using pip: