├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── proposal.md ├── config.yml └── pull_request_template.md ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── LICENSE ├── Procfile ├── README.md ├── db.sqlite3 ├── manage.py ├── mysite ├── __init__.py ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── requirements.txt ├── screenshots ├── Find a word.png ├── Find image.png ├── Find images result page.png ├── Generate Password.png ├── Home.png ├── Password Generated.png ├── Remove punctuations.png ├── Text analyzer.png └── word found or not found.png ├── static ├── css │ ├── about.css │ ├── analyze.css │ ├── articles.css │ ├── books.css │ ├── home.css │ ├── index.css │ ├── index2.css │ ├── style.css │ └── youtube.css ├── images │ └── favicon.png └── js │ └── Script.js ├── templates ├── about.html ├── analyze.html ├── articles.html ├── base.html ├── books.html ├── gallery.html ├── home.html ├── index.html ├── index2.html ├── pdf.html └── youtube.html ├── textAnalyzer.sh └── textanalyzer ├── __init__.py ├── admin.py ├── apps.py ├── migrations ├── 0001_initial.py ├── 0002_auto_20210323_1217.py └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | ---- 12 | - A clear and concise description of what the bug is. 13 | 14 | 15 | **To Reproduce** 16 | ---- 17 | - Steps to reproduce the behavior: 18 | 1. Go to '...' 19 | 2. Click on '....' 20 | 3. Scroll down to '....' 21 | 4. See error 22 | 23 | **Expected behavior** 24 | ----- 25 | - A clear and concise description of what you expected to happen. 26 | 27 | **Possible solution** 28 | ---- 29 | - Describe the solution you thought of. 30 | 31 | **Screenshots** 32 | ---- 33 | - If applicable, add screenshots to help explain your problem. 34 | 35 | **Additional context** 36 | ---- 37 | - Add any other context about the problem here.You can also mention your system environment in which you are running it. 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | ---- 12 | - A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | **Describe the solution you'd like** 15 | ---- 16 | - A clear and concise description of what you want to happen. 17 | 18 | **Describe alternatives you've considered** 19 | ---- 20 | - A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | **Additional context** 23 | ---- 24 | - Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💥 Proposal 3 | about: Propose a non-trivial change 4 | labels: "proposal" 5 | --- 6 | 7 | ## 💥 Proposal 8 | 9 | (A clear and concise description of what the proposal is.) 10 | 11 | ### Have you read the *Contributing Guidelines on Pull Requests* ? 12 | 13 | (Write your answer here.) 14 | 15 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for welcome - https://github.com/behaviorbot/welcome 2 | 3 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 4 | # Comment to be posted to on first time issues 5 | 6 | newIssueWelcomeComment: > 7 | Hello there!👋 Welcome to the project!🚀⚡ 8 | 9 | 10 | Thank you and congrats🎉 for opening your very first issue in this project. Text Analyzer is used to perform some operations like capitalize, lower, upper and remove punctuation. This project is created using Django. 11 | Please adhere to our [Code of Conduct](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/CODE_OF_CONDUCT.md). 12 | Please make sure not to start working on the issue, unless you get assigned to it.😄 13 | 14 | 15 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 16 | # Comment to be posted to on PRs from first time contributors in your repository 17 | 18 | newPRWelcomeComment: > 19 | Hello there!👋 Welcome to the project!💖 20 | 21 | 22 | Thank you and congrats🎉 for opening your first pull request. Text Analyzer is used to perform some operations like capitalize, lower, upper and remove punctuation. This project is created using Django. 23 | Please adhere to our [Code of Conduct](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/CODE_OF_CONDUCT.md).🙌🙌 We will get back to you as soon as we can 😄. 24 | 25 | 26 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 27 | # Comment to be posted to on pull requests merged by a first time user 28 | 29 | firstPRMergeComment: > 30 | Congrats on merging your first pull request! 🎉 All the best for your amazing open source journey ahead 🚀. 31 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Related Issuse 2 | - Info about Issue or bug 3 | 4 | Closes: #[issue number that will be closed through this PR] 5 | 6 | #### Describe the changes you've made 7 | A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know! 8 | 9 | ## Type of change 10 | 11 | 15 | - [ ] Bug fix (non-breaking change which fixes an issue) 16 | - [ ] New feature (non-breaking change which adds functionality) 17 | - [ ] Code style update (formatting, local variables) 18 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 19 | - [ ] This change requires a documentation update 20 | 21 | ## How Has This Been Tested? 22 | 23 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. 24 | 25 | #### Describe if there is any unusual behaviour of your code(Write `NA` if there isn't) 26 | A clear and concise description of it. 27 | 28 | ## Checklist: 29 | 33 | - [ ] My code follows the style guidelines of this project. 34 | - [ ] I have performed a self-review of my own code. 35 | - [ ] I have commented my code, particularly in hard-to-understand areas. 36 | - [ ] I have made corresponding changes to the documentation. 37 | - [ ] My changes generate no new warnings. 38 | - [ ] I have added tests that prove my fix is effective or that my feature works. 39 | - [ ] New and existing unit tests pass locally with my changes. 40 | 41 | ## Screenshots 42 | 43 | Original | Updated 44 | :--------------------: |:--------------------: 45 | **original screenshot** | updated screenshot | 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Django ### 2 | *.log 3 | *.pot 4 | *.pyc 5 | __pycache__/ 6 | local_settings.py 7 | db.sqlite3 8 | db.sqlite3-journal 9 | media 10 | 11 | # If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ 12 | # in your Git repository. Update and uncomment the following line accordingly. 13 | # /staticfiles/ 14 | 15 | ### Django.Python Stack ### 16 | # Byte-compiled / optimized / DLL files 17 | *.py[cod] 18 | *$py.class 19 | 20 | # C extensions 21 | *.so 22 | 23 | # Distribution / packaging 24 | .Python 25 | build/ 26 | develop-eggs/ 27 | dist/ 28 | downloads/ 29 | eggs/ 30 | .eggs/ 31 | lib/ 32 | lib64/ 33 | parts/ 34 | sdist/ 35 | var/ 36 | wheels/ 37 | pip-wheel-metadata/ 38 | share/python-wheels/ 39 | *.egg-info/ 40 | .installed.cfg 41 | *.egg 42 | MANIFEST 43 | 44 | # PyInstaller 45 | # Usually these files are written by a python script from a template 46 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 47 | *.manifest 48 | *.spec 49 | 50 | # Installer logs 51 | pip-log.txt 52 | pip-delete-this-directory.txt 53 | 54 | # Unit test / coverage reports 55 | htmlcov/ 56 | .tox/ 57 | .nox/ 58 | .coverage 59 | .coverage.* 60 | .cache 61 | nosetests.xml 62 | coverage.xml 63 | *.cover 64 | *.py,cover 65 | .hypothesis/ 66 | .pytest_cache/ 67 | pytestdebug.log 68 | 69 | # Translations 70 | *.mo 71 | 72 | # Django stuff: 73 | 74 | # Flask stuff: 75 | instance/ 76 | .webassets-cache 77 | 78 | # Scrapy stuff: 79 | .scrapy 80 | 81 | # Sphinx documentation 82 | docs/_build/ 83 | doc/_build/ 84 | 85 | # PyBuilder 86 | target/ 87 | 88 | # Jupyter Notebook 89 | .ipynb_checkpoints 90 | 91 | # IPython 92 | profile_default/ 93 | ipython_config.py 94 | 95 | # pyenv 96 | .python-version 97 | 98 | # pipenv 99 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 100 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 101 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 102 | # install all needed dependencies. 103 | #Pipfile.lock 104 | 105 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 106 | __pypackages__/ 107 | 108 | # Celery stuff 109 | celerybeat-schedule 110 | celerybeat.pid 111 | 112 | # SageMath parsed files 113 | *.sage.py 114 | 115 | # Environments 116 | .env 117 | .venv 118 | env/ 119 | venv/ 120 | ENV/ 121 | env.bak/ 122 | venv.bak/ 123 | pythonenv* 124 | 125 | # Spyder project settings 126 | .spyderproject 127 | .spyproject 128 | 129 | # Rope project settings 130 | .ropeproject 131 | 132 | # mkdocs documentation 133 | /site 134 | 135 | # mypy 136 | .mypy_cache/ 137 | .dmypy.json 138 | dmypy.json 139 | 140 | # Pyre type checker 141 | .pyre/ 142 | 143 | # pytype static type analyzer 144 | .pytype/ 145 | 146 | # profiling data 147 | .prof 148 | 149 | ### Python ### 150 | # Byte-compiled / optimized / DLL files 151 | 152 | # C extensions 153 | 154 | # Distribution / packaging 155 | 156 | # PyInstaller 157 | # Usually these files are written by a python script from a template 158 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 159 | 160 | # Installer logs 161 | 162 | # Unit test / coverage reports 163 | 164 | # Translations 165 | 166 | # Django stuff: 167 | 168 | # Flask stuff: 169 | 170 | # Scrapy stuff: 171 | 172 | # Sphinx documentation 173 | 174 | # PyBuilder 175 | 176 | # Jupyter Notebook 177 | 178 | # IPython 179 | 180 | # pyenv 181 | 182 | # pipenv 183 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 184 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 185 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 186 | # install all needed dependencies. 187 | 188 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 189 | 190 | # Celery stuff 191 | 192 | # SageMath parsed files 193 | 194 | # Environments 195 | 196 | # Spyder project settings 197 | 198 | # Rope project settings 199 | 200 | # mkdocs documentation 201 | 202 | # mypy 203 | 204 | # Pyre type checker 205 | 206 | # pytype static type analyzer 207 | 208 | # profiling data 209 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | For the betterment of open-source and in order to make a welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of their age, body size disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, skin tone, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment includes: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants includes: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed a representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at their [linkedin](https://www.linkedin.com/in/rohit-kumar-saini/). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## 🤝First time contributing? We will help you out.👍 2 | 3 | ![GitHub custom open for collaboration](https://img.shields.io/badge/Open%20For-Collaboration-brightgreen?style=for-the-badge) 4 | 5 | Refer to the following articles on the basics of Git and Github and can also contact the Project Mentors, in case you are stuck: 6 | 7 | - [Getting started with Git and GitHub](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github) 8 | - [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 9 | - [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) 10 | - [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) 11 | 12 | ***If you don't have git on your machine, [install it](https://help.github.com/articles/set-up-git/).*** 13 | 14 | ## 💥 How to Contribute 15 | 16 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 17 | [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/) 18 | 19 | - Take a look at the Existing [Issues](https://github.com/rockingrohit9639/TextAnalyzer.git) or create your own Issues! 20 | - Wait for the Issue to be assigned to you after which you can start working on it. 21 | - Fork the Repo and create a Branch for any Issue that you are working upon. 22 | - Read the [Code of Conduct](https://github.com/rockingrohit9639/TextAnalyzer.git) 23 | - Create a Pull Request which will be promptly reviewed and suggestions would be added to improve it. 24 | - Add Screenshots to help us know what this Script is all about. 25 | 26 | ## 💻 INSTALLING DEPENDENCIES : 27 | 28 | - **requirements.txt** would be enough for most of the users to install dependencies when working in their local environment. 29 | 30 | - If you face any error use the **textAnalyzer.sh** script present in the root directory of the project. 31 | 32 | 33 | ## ⭐HOW TO MAKE A PULL REQUEST : 34 | 35 | **1.** Fork [this](https://github.com/rockingrohit9639/TextAnalyzer.git) repository. 36 | Click on the symbol at the top right corner. 37 | 38 | **2.** Clone the forked repository. Open terminal and type: 39 | 40 | ```bash 41 | git clone https://github.com//project_name.git 42 | ``` 43 | 44 | **3.** Navigate to the project directory. 45 | 46 | ```bash 47 | cd TextAnalyzer 48 | ``` 49 | 50 | **4.** Make changes in source code. 51 | 52 | **5.** Stage your changes and commit 53 | 54 | ```bash 55 | #Add changes to Index 56 | git add . 57 | 58 | #Commit to the local repo 59 | git commit -m "" 60 | ``` 61 | 62 | **7.** Push your local commits to the remote repo. 63 | 64 | ```bash 65 | git push 66 | ``` 67 | 68 | **8.** Create a [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) ! 69 | 70 | **9.** **Congratulations!** Sit and relax, you've made your contribution to TextAnalyzer project. 71 | 72 | 73 | ***:trophy: After this, project leaders and mentors will review the changes and will merge your PR if they are found good, otherwise we will suggest the required changes.*** 74 | 75 | ## Style Guides for Git Commit Messages:memo: 76 | 77 | #### Here's a list of some good to have points, that can add more value to your contribution logs. 78 | 79 | - Use the present tense (example: "Add feature" and not "Added feature") 80 | - Use the imperative mood (example: "Move item to...", instead of "Moves item to...") 81 | - Limit the first line (also called subject line) to 50 characters or less 82 | - Capitalize the subject line 83 | - Separate subject from body with a blank line 84 | - Do not end the subject line with a period 85 | - Wrap the body at 72 characters 86 | - Use the body to explain what, why, vs, and how 87 | - Reference issues and pull requests liberally after the first line 88 | 89 | For more detailed reference to the above points, refer here: https://chris.beams.io/posts/git-commit. 90 | 91 | ## 💥 Issues: 92 | For major changes, you are welcomed to open an issue about what you would like to contribute. Enhancements will be appreciated. 93 | 94 | #### All the Best!🥇 95 | 96 |

97 | 98 | built by developers 99 | [![built with love](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/rockingrohit9639/TextAnalyzer.git) 100 | 101 |

102 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Name of Contributors of this Project. 2 | 3 | - [Rohit Kumar Saini](https://github.com/rockingrohit9639) (Author) 4 | 5 | - [Akash20x](https://github.com/Akash20x) 6 | - Solved Issues 7 | 1. [#25 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/25), PR - [#32](https://github.com/rockingrohit9639/TextAnalyzer/pull/32) 8 | 2. [#30 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/30), PR - [#32](https://github.com/rockingrohit9639/TextAnalyzer/pull/33) 9 | 3. [#34 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/34), PR - [#41](https://github.com/rockingrohit9639/TextAnalyzer/pull/41) 10 | 4. [#43 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/43), PR - [#46](https://github.com/rockingrohit9639/TextAnalyzer/pull/46) 11 | 5. [#40 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/40), PR - [#51](https://github.com/rockingrohit9639/TextAnalyzer/pull/51) 12 | 6. [#47 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/47), PR - [#55](https://github.com/rockingrohit9639/TextAnalyzer/pull/55) 13 | 7. [#49 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/49), PR - [#60](https://github.com/rockingrohit9639/TextAnalyzer/pull/60) 14 | 8. [#48 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/48), PR - [#62](https://github.com/rockingrohit9639/TextAnalyzer/pull/62) 15 | 9. [#52 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/52), PR - [#69](https://github.com/rockingrohit9639/TextAnalyzer/pull/69) 16 | 10. [#65 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/65), PR - [#76](https://github.com/rockingrohit9639/TextAnalyzer/pull/76) 17 | 11. [#54 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/54), PR - [#86](https://github.com/rockingrohit9639/TextAnalyzer/pull/86) 18 | 12. [#88 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/88), PR - [#89](https://github.com/rockingrohit9639/TextAnalyzer/pull/89) 19 | 13. [#90 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/90), PR - [#92](https://github.com/rockingrohit9639/TextAnalyzer/pull/92) 20 | 14. [#63 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/63), PR - [#103](https://github.com/rockingrohit9639/TextAnalyzer/pull/103) 21 | 15. [#97 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/97), PR - [#104](https://github.com/rockingrohit9639/TextAnalyzer/pull/104) 22 | 16. [#96 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/96), PR - [#111](https://github.com/rockingrohit9639/TextAnalyzer/pull/111) 23 | 17. [#112 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/112), PR - [#113](https://github.com/rockingrohit9639/TextAnalyzer/pull/113) 24 | 18. [#114 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/114), PR - [#118](https://github.com/rockingrohit9639/TextAnalyzer/pull/118) 25 | 19. [#120 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/120), PR - [#124](https://github.com/rockingrohit9639/TextAnalyzer/pull/124) 26 | 20. [#123 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/123), PR - [#128](https://github.com/rockingrohit9639/TextAnalyzer/pull/128) 27 | 21. [#129 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/129), PR - [#131](https://github.com/rockingrohit9639/TextAnalyzer/pull/131) 28 | 22. [#132 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/132), PR - [#136](https://github.com/rockingrohit9639/TextAnalyzer/pull/136) 29 | 23. [#58 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/58) 30 | - Total Points (8900) 31 | 32 | - [Arbaz Alam](https://github.com/arbazalam01) 33 | - Solved Issues 34 | 1. [#19 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/19), PR - [#36](https://github.com/rockingrohit9639/TextAnalyzer/pull/36) 35 | 2. [#10 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/10), PR - [#37](https://github.com/rockingrohit9639/TextAnalyzer/pull/37) 36 | 3. [#35 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/35), PR - [#44](https://github.com/rockingrohit9639/TextAnalyzer/pull/44) 37 | 4. [#39 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/39), PR - [#56](https://github.com/rockingrohit9639/TextAnalyzer/pull/56) 38 | 5. [#42 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/42), PR - [#59](https://github.com/rockingrohit9639/TextAnalyzer/pull/59) 39 | 6. [#99 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/99), PR - [#110](https://github.com/rockingrohit9639/TextAnalyzer/pull/110) 40 | 7. [#108 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/108), PR - [#116](https://github.com/rockingrohit9639/TextAnalyzer/pull/116) 41 | - Total Points (2900) 42 | 43 | - [Achyut Kumar](https://github.com/Sloth-Panda) 44 | - Solved Issues 45 | 1. [#11 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/11), PR - [#15](https://github.com/rockingrohit9639/TextAnalyzer/pull/15) 46 | 2. [#16 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/16), PR - [#20](https://github.com/rockingrohit9639/TextAnalyzer/pull/20) 47 | 3. [#3 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/3), PR - [#28](https://github.com/rockingrohit9639/TextAnalyzer/pull/28) 48 | 4. [#4 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/4), PR - [#28](https://github.com/rockingrohit9639/TextAnalyzer/pull/28) 49 | - Total Points (1000) 50 | 51 | - [Priya Nagda](https://github.com/pri1311) 52 | - Solved Issues 53 | 1. [#70 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/70), PR - [#73](https://github.com/rockingrohit9639/TextAnalyzer/pull/73) 54 | 2. [#74 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/74), PR - [#75](https://github.com/rockingrohit9639/TextAnalyzer/pull/75) 55 | 3. [#79 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/74), PR - [#80](https://github.com/rockingrohit9639/TextAnalyzer/pull/80) 56 | 4. [#100 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/100), PR - [#106](https://github.com/rockingrohit9639/TextAnalyzer/pull/106) 57 | 5. [#105 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/105), PR - [#109](https://github.com/rockingrohit9639/TextAnalyzer/pull/109) 58 | 6. [#102 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/102), PR - [#115](https://github.com/rockingrohit9639/TextAnalyzer/pull/115) 59 | 7. [#126 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/126), PR - [#130](https://github.com/rockingrohit9639/TextAnalyzer/pull/130) 60 | 8. [#127 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/127), PR - [#138](https://github.com/rockingrohit9639/TextAnalyzer/pull/138) 61 | - Total Points (1000) 62 | 63 | - [pranabprohit](https://github.com/pranabprohit) 64 | - Solved Issues 65 | 1. [#71 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/71), PR - [#77](https://github.com/rockingrohit9639/TextAnalyzer/pull/77) 66 | 2. [#61 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/61), PR - [#95](https://github.com/rockingrohit9639/TextAnalyzer/pull/95) 67 | 3. [#101 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/101), PR - [#107](https://github.com/rockingrohit9639/TextAnalyzer/pull/107) 68 | 4. [#98 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/98), PR - [#119](https://github.com/rockingrohit9639/TextAnalyzer/pull/119) 69 | 5. [#117 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/117), PR - [#121](https://github.com/rockingrohit9639/TextAnalyzer/pull/121) 70 | 6. [#122 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/122), PR - [#133](https://github.com/rockingrohit9639/TextAnalyzer/pull/133) 71 | - Total Points (950) 72 | 73 | - [Amit Kumar Mishra](https://github.com/Amit366) 74 | - Solved Issues 75 | 1. [#1 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/1), PR - [#26](https://github.com/rockingrohit9639/TextAnalyzer/pull/26) 76 | 2. [#31 (hard: 500)](https://github.com/rockingrohit9639/TextAnalyzer/issues/31), PR - [#68](https://github.com/rockingrohit9639/TextAnalyzer/pull/68) 77 | - Total Points (600) 78 | 79 | - [Shudhanshu Singh](https://github.com/ShudhanshuSingh) 80 | - Solved Issues 81 | 1. [#8 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/8), PR - [#29](https://github.com/rockingrohit9639/TextAnalyzer/pull/29) 82 | 2. [#9 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/9), PR - [#29](https://github.com/rockingrohit9639/TextAnalyzer/pull/29) 83 | - Total Points (400) 84 | 85 | - [Mansi](https://github.com/Mansi3546) 86 | - Solved Issues 87 | 1. [#64 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/64), PR - [#93](https://github.com/rockingrohit9639/TextAnalyzer/pull/93) 88 | 2. [#38 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/38), PR - [#72](https://github.com/rockingrohit9639/TextAnalyzer/pull/72) 89 | - Total Points (400) 90 | 91 | - [Ashutosh Kumar](https://github.com/Blastoise) 92 | - Solved Issues 93 | 1. [#66 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/66), PR - [#81](https://github.com/rockingrohit9639/TextAnalyzer/pull/81) 94 | 2. [#84 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/84), PR - [#91](https://github.com/rockingrohit9639/TextAnalyzer/pull/91) 95 | - Total Points (300) 96 | 97 | - [Muthu Annamalai](https://github.com/muthuannamalai12) 98 | - Solved Issues 99 | 1. [#14 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/14), PR - [#17](https://github.com/rockingrohit9639/TextAnalyzer/pull/17) 100 | 2. [#12 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/12), PR - [#18](https://github.com/rockingrohit9639/TextAnalyzer/pull/18) 101 | - Total Points (200) 102 | 103 | - [Ayush Rastogi](https://github.com/ayushrastogi689) 104 | - Solved Issues 105 | 1. [#2 (medium: 200)](https://github.com/rockingrohit9639/TextAnalyzer/issues/2), PR - [#24](https://github.com/rockingrohit9639/TextAnalyzer/pull/24) 106 | - Total Points (200) 107 | 108 | - [tharunc](https://github.com/tharunc) 109 | - Solved Issues 110 | 1. [#13 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/13), PR - [#23](https://github.com/rockingrohit9639/TextAnalyzer/pull/23) 111 | - Total Points (100) 112 | 113 | - [Yashasvi](https://github.com/kmryashasvi) 114 | - Solved Issues 115 | 1. [#82 (easy: 100)](https://github.com/rockingrohit9639/TextAnalyzer/issues/82), PR - [#85](https://github.com/rockingrohit9639/TextAnalyzer/pull/85) 116 | - Total Points (100) 117 | 118 | - [kopinasaur](https://github.com/kopinasaur) 119 | - Solved Issues 120 | 1. [#58 (good-first-issue: 50)](https://github.com/rockingrohit9639/TextAnalyzer/issues/58) 121 | - Total Points (50) 122 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Rohit Kumar Saini 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn mysite.wsgi:application --log-file - --log-level debug 2 | python manage.py collectstatic --noinput 3 | manage.py migrate -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TextAnalyzer 2 | 3 | [![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/) 4 | 5 | ![TextAnalyzer](https://socialify.git.ci/rockingrohit9639/TextAnalyzer/image?font=Inter&forks=1&issues=1&language=1&owner=1&pattern=Charlie%20Brown&pulls=1&stargazers=1&theme=Dark) 6 | 7 | 8 | 9 | This is a simple text analyzer where you can perform some operations like capitalize, lower, upper and remove punctuation. This is created using Python Django. It is completely open source hence you can too contribute anything to this project if you want. All your new ideas are welcome here, we will implement it together. 10 | 11 | 12 | 13 | ## Tech Used 14 | 15 | - Python 16 | - Django 17 | - HTML 18 | - CSS 19 | - Bootstrap 20 | 21 | #Open Source Programs 22 | This project has been a part of the following programs 23 | ### CrossWoC 24 | CrossWoC is a six-week long opensource event organised by IEEE DTU & IEEE DTU CS, which gives programmers and innovators an opportunity to bring out their nascent talent and find intriguing solutions to real-world problems. It provides a platform for developers to dig deeper into their gray matter and bring out their latent creativity through open source. 25 | 26 | [](https://crosswoc.ieeedtu.in/) 27 | 28 | Join our [Discord](https://discord.gg/GycEMxYm) server for more details. 29 | 30 | # SCREENSHOTS 31 | 32 | 33 | 34 | ## HOME 35 | 36 | 37 | 38 | ![ss1](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Home.png) 39 | 40 | 41 | 42 | ## Text Analyzer 43 | 44 | 45 | 46 | ![ss2](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Text%20analyzer.png) 47 | 48 | 49 | 50 | ## Remove Punctuations 51 | 52 | 53 | 54 | ![ss3](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Remove%20punctuations.png) 55 | 56 | 57 | 58 | ## Find A Word 59 | 60 | 61 | 62 | ![ss4](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Find%20a%20word.png) 63 | 64 | 65 | 66 | ## Word Found/Not Found 67 | 68 | 69 | 70 | ![ss5](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/word%20found%20or%20not%20found.png) 71 | 72 | 73 | 74 | ## Find Images 75 | 76 | 77 | 78 | ![ss6](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Find%20image.png) 79 | 80 | 81 | 82 | ## Images Gallery 83 | 84 | 85 | 86 | ![ss7](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Find%20images%20result%20page.png) 87 | 88 | 89 | 90 | ## Generate A Password 91 | 92 | 93 | 94 | ![ss8](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Generate%20Password.png) 95 | 96 | 97 | 98 | ## Password Generator Result 99 | 100 | 101 | 102 | ![ss9](https://github.com/rockingrohit9639/TextAnalyzer/blob/master/screenshots/Password%20Generated.png) 103 | 104 | 105 | ## Some awesome Contributors ✨ 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |

Rohit Kumar Saini (Author)

💻

Akash20x

💻

Arbaz Alam

💻

Achyut Kumar Panda

💻

Shudhanshu Singh

💻

Muthu Annamalai.V

💻

Ayush Rastogi

💻

tharunc

💻

Amit Kumar Mishra

💻

Priya Nagda

💻

pranabprohit

💻

Ashutosh Kumar

💻

Yashasvi

💻

Mansi

💻

Yashasvi

💻
132 | 133 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/db.sqlite3 -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | def main(): 5 | """Run administrative tasks.""" 6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | 17 | if __name__ == '__main__': 18 | main() 19 | -------------------------------------------------------------------------------- /mysite/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/mysite/__init__.py -------------------------------------------------------------------------------- /mysite/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for mysite project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /mysite/settings.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import os 3 | 4 | BASE_DIR = Path(__file__).resolve(strict=True).parent.parent 5 | 6 | SECRET_KEY = 'iifx8c69qh&zr(tt*#y=@m9)+riru@w+z#uvt2!yda=s35579!' 7 | 8 | DEBUG = True 9 | 10 | ALLOWED_HOSTS = ['*'] 11 | 12 | 13 | INSTALLED_APPS = [ 14 | 'textanalyzer', 15 | 'django.contrib.admin', 16 | 'django.contrib.auth', 17 | 'django.contrib.contenttypes', 18 | 'django.contrib.sessions', 19 | 'django.contrib.messages', 20 | 'django.contrib.staticfiles', 21 | ] 22 | 23 | MIDDLEWARE = [ 24 | 'django.middleware.security.SecurityMiddleware', 25 | 'whitenoise.middleware.WhiteNoiseMiddleware', 26 | 'django.contrib.sessions.middleware.SessionMiddleware', 27 | 'django.middleware.common.CommonMiddleware', 28 | 'django.middleware.csrf.CsrfViewMiddleware', 29 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 30 | 'django.contrib.messages.middleware.MessageMiddleware', 31 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 32 | ] 33 | 34 | ROOT_URLCONF = 'mysite.urls' 35 | 36 | TEMPLATES = [ 37 | { 38 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 39 | 'DIRS': ['templates'], 40 | 'APP_DIRS': True, 41 | 'OPTIONS': { 42 | 'context_processors': [ 43 | 'django.template.context_processors.debug', 44 | 'django.template.context_processors.request', 45 | 'django.contrib.auth.context_processors.auth', 46 | 'django.contrib.messages.context_processors.messages', 47 | ], 48 | }, 49 | }, 50 | ] 51 | 52 | WSGI_APPLICATION = 'mysite.wsgi.application' 53 | 54 | DATABASES = { 55 | 'default': { 56 | 'ENGINE': 'django.db.backends.sqlite3', 57 | 'NAME': BASE_DIR / 'db.sqlite3', 58 | } 59 | } 60 | 61 | 62 | AUTH_PASSWORD_VALIDATORS = [ 63 | { 64 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 65 | }, 66 | { 67 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 68 | }, 69 | { 70 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 71 | }, 72 | { 73 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 74 | }, 75 | ] 76 | 77 | LANGUAGE_CODE = 'en-us' 78 | 79 | TIME_ZONE = 'UTC' 80 | 81 | USE_I18N = True 82 | 83 | USE_L10N = True 84 | 85 | USE_TZ = True 86 | 87 | 88 | STATIC_URL = '/static/' 89 | STATICFILES_DIRS = [ 90 | os.path.join(BASE_DIR,'static') 91 | ] 92 | 93 | STATIC_ROOT = os.path.join(BASE_DIR,'staticfiles') 94 | 95 | -------------------------------------------------------------------------------- /mysite/urls.py: -------------------------------------------------------------------------------- 1 | """mysite URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.1/topics/http/urls/ 5 | """ 6 | 7 | from django.contrib import admin 8 | from django.urls import path, include 9 | from django.conf import settings 10 | from django.conf.urls.static import static 11 | 12 | urlpatterns = [ 13 | path("",include("textanalyzer.urls")), 14 | path('admin/', admin.site.urls), 15 | ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) -------------------------------------------------------------------------------- /mysite/wsgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 6 | 7 | application = get_wsgi_application() 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==3.1.7 2 | heroku==0.1.4 3 | requests==2.23.0 4 | requests-oauthlib==1.3.0 5 | nltk 6 | gunicorn 7 | django_heroku 8 | bs4 9 | PyDictionary 10 | textblob 11 | gingerit==0.8.1 12 | python-youtube==0.7.0 13 | xhtml2pdf==0.2.5 14 | wordcloud==1.8.1 15 | date-extractor==5.1.5 16 | python-dateutil==2.8.1 17 | -------------------------------------------------------------------------------- /screenshots/Find a word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Find a word.png -------------------------------------------------------------------------------- /screenshots/Find image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Find image.png -------------------------------------------------------------------------------- /screenshots/Find images result page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Find images result page.png -------------------------------------------------------------------------------- /screenshots/Generate Password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Generate Password.png -------------------------------------------------------------------------------- /screenshots/Home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Home.png -------------------------------------------------------------------------------- /screenshots/Password Generated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Password Generated.png -------------------------------------------------------------------------------- /screenshots/Remove punctuations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Remove punctuations.png -------------------------------------------------------------------------------- /screenshots/Text analyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/Text analyzer.png -------------------------------------------------------------------------------- /screenshots/word found or not found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/screenshots/word found or not found.png -------------------------------------------------------------------------------- /static/css/about.css: -------------------------------------------------------------------------------- 1 | .about-section { 2 | width: 100%; 3 | height: 125vh; 4 | display: flex; 5 | flex-direction: column; 6 | margin-top: 3rem; 7 | align-items: center; 8 | padding: 4rem; 9 | box-sizing: border-box; 10 | } 11 | 12 | p{ 13 | font-size: 20px; 14 | } 15 | 16 | .mentor h2{ 17 | text-align: center; 18 | } 19 | 20 | .mentor a { 21 | margin-bottom: 20px; 22 | } 23 | 24 | .mentor a:hover { 25 | color: rgba(0, 0, 0, 0.53); 26 | font-size: 35px; 27 | } 28 | 29 | .contributors h2 { 30 | text-align: center; 31 | margin-bottom: 20px; 32 | margin-top: 30px; 33 | } 34 | 35 | .contributor { 36 | display: flex; 37 | justify-content: space-around; 38 | align-items: center; 39 | } 40 | 41 | .contributor img{ 42 | width: 50px; 43 | height: 50px; 44 | margin-right: 15px; 45 | } 46 | 47 | table { 48 | display: flex; 49 | flex-wrap: wrap; 50 | justify-content: center; 51 | text-align: center; 52 | border-collapse: collapse; 53 | width: 900px; 54 | } 55 | 56 | tr { 57 | transition: all .2s ease-in; 58 | cursor: pointer; 59 | float: left; 60 | width: 33%; 61 | padding-right: 10px; 62 | background-color: var(--primary-color); 63 | color: var(--secondary-color); 64 | } 65 | 66 | td { 67 | padding: 12px; 68 | text-align: left; 69 | border-bottom: 1px solid #ddd; 70 | } 71 | 72 | tr:hover { 73 | background-color: var(--secondary-color); 74 | color: var(--primary-color); 75 | transform: scale(1.02); 76 | box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2), -1px -1px 8px rgba(0, 0, 0, 0.2); 77 | } 78 | 79 | .contributor:hover a{ 80 | color: var(--primary-color); 81 | } -------------------------------------------------------------------------------- /static/css/analyze.css: -------------------------------------------------------------------------------- 1 | .analyze-result { 2 | width: 100%; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: center; 6 | align-items: center; 7 | padding: 4rem; 8 | margin-top: 5rem; 9 | } -------------------------------------------------------------------------------- /static/css/articles.css: -------------------------------------------------------------------------------- 1 | .articles-section { 2 | width: 100%; 3 | height: 100vh; 4 | display: flex; 5 | flex-direction: column; 6 | margin-top: 6rem; 7 | align-items: center; 8 | } 9 | 10 | .ArticlesClass h2 { 11 | text-align: center; 12 | } 13 | 14 | tbody{ 15 | display: flex; 16 | flex-wrap: wrap; 17 | justify-content: center; 18 | align-items: center; 19 | } 20 | 21 | 22 | .Articles { 23 | margin-top: 20px; 24 | margin-left: 20px; 25 | max-width: 26rem; 26 | display: grid; 27 | justify-content: space-around; 28 | align-items: center; 29 | padding: 15px; 30 | } 31 | 32 | .Articles:hover{ 33 | border: 1px solid rgba(0, 0, 0, 0.5); 34 | border-radius: 5px; 35 | background: #30363d; 36 | box-shadow: 0 5px 14px -8px rgba(0, 0, 0, 0.5); 37 | } 38 | 39 | .Articles:hover a{ 40 | color: #fff; 41 | } 42 | 43 | .Articles img{ 44 | width: 50px; 45 | height: 50px; 46 | margin-right: 15px; 47 | } 48 | 49 | #btns{ 50 | margin-bottom: 10px; 51 | } 52 | -------------------------------------------------------------------------------- /static/css/books.css: -------------------------------------------------------------------------------- 1 | .books-section { 2 | width: 100%; 3 | height: 100vh; 4 | display: flex; 5 | flex-direction: column; 6 | margin-top: 5rem; 7 | align-items: center; 8 | padding: 20px; 9 | } 10 | 11 | .BooksClass h2 { 12 | text-align: center; 13 | } 14 | 15 | tbody{ 16 | display: flex; 17 | flex-wrap: wrap; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | 22 | 23 | .Books { 24 | margin-top: 20px; 25 | margin-left: 20px; 26 | max-width: 26rem; 27 | display: grid; 28 | justify-content: space-around; 29 | align-items: center; 30 | padding: 15px; 31 | } 32 | 33 | .Books:hover{ 34 | border: 1px solid rgba(0, 0, 0, 0.5); 35 | border-radius: 5px; 36 | background: #30363d; 37 | box-shadow: 0 5px 14px -8px rgba(0, 0, 0, 0.5); 38 | } 39 | 40 | .Books:hover a{ 41 | color: #fff; 42 | } 43 | 44 | .Books img{ 45 | width: 50px; 46 | height: 50px; 47 | margin-right: 15px; 48 | } 49 | 50 | #btns{ 51 | margin-bottom: 10px; 52 | } 53 | -------------------------------------------------------------------------------- /static/css/home.css: -------------------------------------------------------------------------------- 1 | .header { 2 | position: relative; 3 | width: 100%; 4 | height: 100vh; 5 | background: var(--primary-color); 6 | padding: 4rem; 7 | overflow: hidden; 8 | } 9 | 10 | .content { 11 | color: var(--secondary-color); 12 | margin-top: 10rem; 13 | } 14 | 15 | .content h4{ 16 | font-size: 2rem; 17 | } 18 | 19 | .content p{ 20 | color: var(--secondary-color); 21 | font-size: 15px; 22 | margin-top: 10px; 23 | } 24 | 25 | .buttons { 26 | display: flex; 27 | margin-top: 5rem; 28 | } 29 | 30 | .buttons a:nth-child(1){ 31 | border: 2px solid var(--secondary-color); 32 | padding: 10px 20px; 33 | color: var(--secondary-color); 34 | font-weight: bold; 35 | border-radius: 0.3rem; 36 | transition: 0.5s; 37 | } 38 | 39 | .buttons a:nth-child(1):hover { 40 | color: var(--primary-color); 41 | background: var(--secondary-color); 42 | border: 2px solid var(--secondary-color); 43 | transform: scale(0.95,0.95); 44 | } 45 | 46 | 47 | .buttons a:nth-child(2){ 48 | background-color: var(--secondary-color); 49 | border: 2px solid var(--secondary-color); 50 | color: var(--primary-color); 51 | padding: 12px 20px; 52 | margin-left: 10px; 53 | font-weight: bold; 54 | border-radius: 0.3rem; 55 | transition: 0.5s; 56 | } 57 | 58 | .buttons a:nth-child(2):hover{ 59 | background: transparent; 60 | color: var(--secondary-color); 61 | border: 2px solid var(--secondary-color); 62 | transform: scale(0.95,0.95); 63 | } 64 | 65 | .header__right p{ 66 | color: var(--secondary-color); 67 | font-size: 25rem; 68 | font-weight: 700; 69 | animation: skew 3s infinite alternate; 70 | } 71 | 72 | @media screen and (max-width: 768px) { 73 | .header__right, .header__left, .buttons{ 74 | align-items: center; 75 | text-align: center; 76 | justify-content: center; 77 | } 78 | 79 | .header__left .content{ 80 | margin-top: 5rem; 81 | } 82 | 83 | .header__right p{ 84 | font-size: 15rem; 85 | font-weight: 600; 86 | /* margin-left: 2rem; */ 87 | } 88 | } 89 | 90 | @keyframes skew { 91 | 0% { 92 | transform: skew(3deg, 3deg) translate(10px,30px) scale(0.8,0.8); 93 | color: grey; 94 | } 95 | 50%{ 96 | transform: skew(0deg, 0deg) scale(1,1); 97 | color: white; 98 | } 99 | 100% { 100 | transform: skew(-3deg, -3deg) translate(-10px,-50px) scale(0.8,0.8); 101 | color: grey; 102 | } 103 | } 104 | 105 | .services, .contact { 106 | width: 100%; 107 | /* height: 100vh; */ 108 | padding-top: 3rem; 109 | background: var(--secondary-color); 110 | } 111 | 112 | .services .top .icons, .contact .top .icons { 113 | display: flex; 114 | justify-content: space-evenly; 115 | padding: 5px; 116 | } 117 | 118 | .services .top h3, .contact .top h3 { 119 | text-align: center; 120 | font-weight: 600; 121 | font-size: 3rem; 122 | } 123 | 124 | .services .top .icons i, .contact .top .icons i { 125 | padding: 0 10px; 126 | font-size: 2rem; 127 | } 128 | 129 | .services .top .icons hr, .contact .top .icons hr { 130 | width: 10rem; 131 | height: 1px; 132 | color: var(--primary-color); 133 | } 134 | 135 | .cards { 136 | height: 60%; 137 | display: flex; 138 | justify-content: space-evenly; 139 | margin-top: 5rem; 140 | flex-wrap: wrap; 141 | } 142 | 143 | .card-s { 144 | width: 300px; 145 | height: 400px; 146 | background-color: var(--primary-color); 147 | color: var(--secondary-color); 148 | padding: 10px; 149 | text-align: center; 150 | margin-top: 0.5rem; 151 | margin-bottom: 0.5rem; 152 | display: block; 153 | transition: 0.3s ; 154 | border-radius: 1.5rem; 155 | } 156 | 157 | .card-s:hover{ 158 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 159 | box-shadow: 10px 6px 20px 10px rgba(0, 0, 0, 0.2), 10px 6px 20px 10px rgba(0, 0, 0, 0.19); 160 | } 161 | 162 | .card-s h3{ 163 | font-size: 1.5rem; 164 | padding: 10px; 165 | } 166 | 167 | .card-s .desc { 168 | height: 70%; 169 | padding: 50px; 170 | font-size: large; 171 | font-weight: 100; 172 | } 173 | 174 | .card-s a{ 175 | background-color: var(--secondary-color); 176 | border: 2px solid var(--secondary-color); 177 | padding: 5px 35px; 178 | color: var(--primary-color); 179 | border-radius: 0.3rem; 180 | font-weight: bold; 181 | transition: 0.4s; 182 | } 183 | 184 | .card-s a:hover{ 185 | background: transparent; 186 | color: var(--secondary-color); 187 | border: 2px solid var(--secondary-color); 188 | } 189 | 190 | /* contact-us */ 191 | .contact-form{ 192 | width: 100%; 193 | margin: auto; 194 | padding: 0 40px; 195 | margin-top: 50px; 196 | } 197 | 198 | /*common style class*/ 199 | .base-form{ 200 | width: 100%; 201 | height: 50px; 202 | margin: 10px 0; 203 | background-color: var(--primary-color); 204 | border: none; 205 | outline: none; 206 | padding: 20px; 207 | border-radius: 4px; 208 | color: var(--secondary-color); 209 | } 210 | 211 | /*isolates forms in div for easier styling.*/ 212 | .parent-user-form{ 213 | display: table; 214 | width: 100%; 215 | } 216 | 217 | /*makes the forms go side by side*/ 218 | .child-user-form{ 219 | display: table-cell; 220 | } 221 | 222 | /*styles for name*/ 223 | .user-name{ 224 | padding-right: 10px; 225 | } 226 | 227 | /*Required for aligning email field to end of message field*/ 228 | .user-email{ 229 | padding-left: 10px; 230 | } 231 | 232 | .messageZone{ 233 | min-height: 200px; 234 | resize: vertical; 235 | } 236 | 237 | .contact-form .btn{ 238 | width: 180px; 239 | padding: 10px 20px; 240 | color: var(--secondary-color); 241 | font-weight: bold; 242 | font-size: 16px; 243 | margin-left: auto; 244 | cursor: pointer; 245 | transition: .3s linear; 246 | } 247 | 248 | .contact-form .btn:hover{ 249 | transform: scale(1.04); 250 | } 251 | 252 | .skewOne { 253 | display: block; 254 | position: absolute; 255 | bottom: -100%; 256 | left: 50%; 257 | width: 100%; 258 | height: 100%; 259 | background: var(--secondary-color); 260 | transform: skewY(-15deg); 261 | transform-origin: top left; 262 | } 263 | 264 | 265 | .skewTwo { 266 | position: absolute; 267 | bottom: -100%; 268 | right: 50%; 269 | width: 100%; 270 | height: 100%; 271 | background: var(--secondary-color); 272 | transform: skewY(15deg); 273 | transform-origin: top right; 274 | } -------------------------------------------------------------------------------- /static/css/index.css: -------------------------------------------------------------------------------- 1 | .analyze-section { 2 | width: 100%; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: center; 6 | align-items: center; 7 | margin-top: 7rem; 8 | } -------------------------------------------------------------------------------- /static/css/index2.css: -------------------------------------------------------------------------------- 1 | .generate-section { 2 | width: 100%; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: center; 6 | align-items: center; 7 | padding: 4rem; 8 | margin-top: 5rem; 9 | } -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300&display=swap'); 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | box-sizing: border-box; 6 | font-family: 'Mulish', sans-serif; 7 | } 8 | 9 | body{ 10 | display: flex; 11 | flex-direction: column; 12 | min-height: 100vh; 13 | } 14 | 15 | :root{ 16 | --primary-color: #000; 17 | --secondary-color: #f2f2f2; 18 | } 19 | 20 | /* pre-loader */ 21 | #loading{ 22 | position: fixed; 23 | width: 100%; 24 | height: 100vh; 25 | background: #5c9dfb url('https://cdn.dribbble.com/users/1193395/screenshots/4348563/speed-data-search-loader.gif') no-repeat center; 26 | z-index: 999; 27 | } 28 | 29 | a { 30 | text-decoration: none; 31 | color: inherit; 32 | } 33 | 34 | 35 | #nav-heading{ 36 | animation: text 3s steps(22) infinite alternate; 37 | animation: text 3s linear infinite alternate; 38 | overflow: hidden; 39 | white-space: nowrap; 40 | width: 100%; 41 | align-self: center; 42 | margin: auto; 43 | text-align: center; 44 | } 45 | 46 | @keyframes text{ 47 | 0%{ 48 | width: 0ch; 49 | } 50 | 100%{ 51 | width: 11ch; 52 | } 53 | } 54 | 55 | .nav-bar { 56 | display: flex; 57 | justify-content: space-between; 58 | align-items: center; 59 | background-color: var(--primary-color); 60 | position: fixed; 61 | width: 100%; 62 | height: 4.5rem; 63 | color: var(--secondary-color); 64 | padding: 0 20px; 65 | border-bottom: 2px solid var(--secondary-color); 66 | z-index: 100; 67 | } 68 | 69 | a:hover { 70 | color: var(--secondary-color); 71 | } 72 | 73 | 74 | .footer { 75 | display: flex; 76 | justify-content: space-between; 77 | align-items: center; 78 | padding: 0 20px; 79 | background-color: var(--primary-color); 80 | color: var(--secondary-color); 81 | margin-top: auto; 82 | width: 100%; 83 | margin-top: 10px; 84 | } 85 | 86 | .footer__left { 87 | display: flex; 88 | flex-direction: column; 89 | padding: 10px; 90 | font-size: 14px; 91 | } 92 | 93 | .footer__right{ 94 | border: 1px solid var(--secondary-color); 95 | width: 25px; 96 | height: 25px; 97 | display: flex; 98 | align-items: center; 99 | justify-content: center; 100 | cursor: pointer; 101 | } 102 | 103 | .footer__right p { 104 | padding-top: 15px; 105 | } 106 | 107 | .input-field{ 108 | width: 100%; 109 | background-color: white; 110 | font-family: 'Poppins', sans-serif; 111 | padding: 10px; 112 | min-height: 100px; 113 | border-radius: 5px; 114 | resize: vertical; 115 | font-size: medium; 116 | } 117 | 118 | .form-input{ 119 | width: 20px; 120 | height:20px; 121 | cursor: pointer; 122 | } 123 | 124 | .form-label{ 125 | font-size: medium; 126 | } 127 | 128 | .button-container{ 129 | display: flex; 130 | justify-content: space-around; 131 | align-items: center; 132 | flex-wrap: wrap; 133 | } 134 | 135 | 136 | button{ 137 | width: 200px; 138 | height: 50px; 139 | outline: none; 140 | border: none; 141 | font-family: 'Poppins', sans-serif; 142 | background-color: black; 143 | color: white; 144 | font-size: medium; 145 | cursor: pointer; 146 | transition: all 0.2s; 147 | align-self: center; 148 | margin-top: 20px; 149 | } 150 | 151 | 152 | button:hover{ 153 | background-color: rgba(153, 153, 153, 0.267); 154 | color: black; 155 | } 156 | 157 | 158 | button#btns{ 159 | margin-left: 0.7em; 160 | margin-top: 3em; 161 | } 162 | 163 | button#btns2{ 164 | margin-left: 4em; 165 | margin-top: 3em; 166 | } 167 | form{ 168 | display: flex; 169 | flex-direction: column; 170 | width: 50vw; 171 | 172 | } 173 | .input-word{ 174 | margin-top: 10px; 175 | border: 1px solid darkgray; 176 | width: 100%; 177 | background-color: white; 178 | font-family: 'Poppins', sans-serif; 179 | padding: 10px; 180 | min-height: 20px; 181 | border-radius: 5px; 182 | } 183 | 184 | #analyzed_text { 185 | color: rgba(252, 81, 95, 0.616); 186 | font-weight: 500; 187 | font-size: 2rem; 188 | word-wrap: break-word; 189 | white-space: pre-line; 190 | padding: 3rem; 191 | } 192 | 193 | 194 | .foo{ 195 | width: 80%; 196 | color: var(--secondary-color); 197 | text-align: center; 198 | margin-bottom: 2rem; 199 | } 200 | 201 | .foo h5{ 202 | font-size: 25px; 203 | margin-top: 10px; 204 | } 205 | 206 | .foo h5::after{ 207 | content: "All of us do not have equal talent. But, all of us have an equal opportunity to develop our talents."; 208 | animation: textanim 10s linear infinite; 209 | } 210 | 211 | @keyframes textanim{ 212 | 40%{ 213 | content:'If you fail, never give up because FAIL means "First Attempt In Learning".' ; 214 | } 215 | 70%{ 216 | content:"No matter what is the environment around you, it is always possible to maintain your brand of integrity." ; 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /static/css/youtube.css: -------------------------------------------------------------------------------- 1 | .youtube-section { 2 | width: 100%; 3 | height: 100vh; 4 | display: flex; 5 | flex-direction: column; 6 | margin-top: 5rem; 7 | align-items: center; 8 | padding: 20px; 9 | } 10 | 11 | .youtubers h2 { 12 | text-align: center; 13 | } 14 | 15 | tbody{ 16 | display: flex; 17 | flex-wrap: wrap; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | 22 | 23 | .Channels { 24 | margin-top: 20px; 25 | margin-left: 20px; 26 | max-width: 200px; 27 | display: flex; 28 | justify-content: space-around; 29 | align-items: center; 30 | padding: 15px; 31 | } 32 | 33 | .Channels:hover{ 34 | border: 1px solid rgba(0, 0, 0, 0.5); 35 | border-radius: 5px; 36 | background: #30363d; 37 | box-shadow: 0 5px 14px -8px rgba(0, 0, 0, 0.5); 38 | } 39 | 40 | .Channels:hover a{ 41 | color: #fff; 42 | } 43 | 44 | .Channels img{ 45 | width: 50px; 46 | height: 50px; 47 | margin-right: 15px; 48 | } 49 | 50 | #btns{ 51 | margin-bottom: 10px; 52 | } -------------------------------------------------------------------------------- /static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/static/images/favicon.png -------------------------------------------------------------------------------- /static/js/Script.js: -------------------------------------------------------------------------------- 1 | 2 | function copyToClipboard(elementId) { 3 | 4 | // Create an auxiliary hidden input 5 | var aux = document.createElement("input"); 6 | 7 | // Get the text from the element passed into the input 8 | aux.setAttribute("value", document.getElementById(elementId).innerHTML); 9 | 10 | // Append the aux input to the body 11 | document.body.appendChild(aux); 12 | 13 | // Highlight the content 14 | aux.select(); 15 | 16 | // Execute the copy command 17 | document.execCommand("copy"); 18 | 19 | // Remove the input from the body 20 | document.body.removeChild(aux); 21 | } 22 | 23 | console.log("This is injected") 24 | 25 | 26 | 27 | /*===== SCROLL REVEAL ANIMATION =====*/ 28 | const sr = ScrollReveal({ 29 | origin: 'top', 30 | distance: '80px', 31 | duration: 2000, 32 | reset: true 33 | }) 34 | 35 | /*===== SCROLL REVEAL ANIMATION-CARDS =====*/ 36 | sr.reveal('.generate-password', {}) 37 | sr.reveal('.sentiment-analysis', {delay: 200}) 38 | sr.reveal('.search-images', { delay: 400}) 39 | 40 | /*===== SCROLL REVEAL ANIMATION-HEADER =====*/ 41 | sr.reveal('.header__left', {origin:'left'}) 42 | sr.reveal('.header__right', {origin:'right'}) 43 | 44 | 45 | /*===== SCROLL REVEAL ANIMATION-CONTACT FORM =====*/ 46 | sr.reveal('.contact-form', {}) 47 | sr.reveal('.icons', {}) 48 | 49 | /*===== SCROLL REVEAL ANIMATION-CONTRIBUTER =====*/ 50 | sr.reveal('.user-names', {}) 51 | sr.reveal('.rounded-circle', {delay: 200}) -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% load static %} {% block content %} 2 | 3 | 4 | 5 |
6 |

7 | We are the makers/contributors of this project text analyzer where 8 | you can perform operations like capitalize, transform to lowercase/uppercase 9 | and remove punctuation. This is created using Python Django. It is 10 | completely open source hence you too can contribute anything to this project 11 | if you want. All your new ideas are welcome here, we will implement it 12 | together. 13 |

14 | 15 |
16 |

Our mentor

17 |

Rohit Kumar Saini

18 |
19 |
20 | 21 |
22 |

Our Contributors

23 | 24 |
25 | {% if userData %} 26 | 27 | {% for data in userData %} 28 | 29 | 44 | 45 | {% endfor %} 46 |
30 |
31 | avatar 36 |

{{ data.login }}

40 |

42 |
43 |
47 | {% endif %} 48 |
49 |
50 |
51 | 52 | {% endblock content %} 53 | -------------------------------------------------------------------------------- /templates/analyze.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block content %} 3 | 4 | {% load static %} 5 | 6 | {% if findWord %} 7 | 18 | {% endif %} 19 | 20 | 21 | 22 |
23 | 24 |

Text Analyzed Successfully 🎉

25 |

You chose : {{purpose}}

26 |

Result :

27 | 28 | {% if highlight %} 29 |

{{ highlight }}

30 | {% endif %} 31 | 32 |

 {{analyzed_text|safe}}

33 |
34 | 35 | {% if synonym %} 36 |

Synonms/Example : {{ synonym }}

37 | {% endif %} 38 | 39 | {% if my_wordcloud %} 40 | 41 | {% endif %} 42 | 43 | {% if bar_graph %} 44 | 45 | {% endif %} 46 | 47 | {% if grammar %} 48 |

Original Text : {{ grammar }}

49 | {% endif %} 50 | 51 | 52 | Copy 53 | 54 | 55 | {% if status %} 56 |

Status : {{ status }}

57 | 58 | {% if find_image %} 59 | 60 | {% endif %} 61 | 62 | {% if find_channel %} 63 | 64 | {% endif %} 65 | 66 | {% if find_books %} 67 | 68 | {% endif %} 69 | 70 | {% if find_articles %} 71 | 72 | {% endif %} 73 | 74 | {% if make_pdf %} 75 | 76 | {% endif %} 77 | 78 | {% endif %} 79 | 80 |

Words : {{ wordcount }}

81 | 82 | {% if analyze_text %} 83 | 84 | {% endif %} 85 | 86 | {% if generate_text %} 87 | 88 | {% endif %} 89 | 90 |
91 | 92 | 93 | {% endblock %} 94 | 95 | -------------------------------------------------------------------------------- /templates/articles.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |

Medium articles related to {{text}}

14 | 15 |
16 | {% if result %} 17 | 18 | 19 | {% for i in result %} 20 | 21 | 36 | 37 | {% endfor %} 38 | 39 |
22 | 35 |
40 | {% endif %} 41 |
42 |
43 | 44 | 45 | 46 |
47 | 48 | {% endblock content %} 49 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Analyzer 9 | 14 | 20 | 21 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 |
45 | 55 | 56 | 57 | 58 | {% block content %} {% endblock %} 59 | 60 | 74 | 75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 89 | 90 | 95 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /templates/books.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |

Books related to {{text}}

14 | 15 |
16 | {% if result %} 17 | 18 | 19 | {% for i in result %} 20 | 21 | 34 | 35 | {% endfor %} 36 | 37 |
22 | 33 |
38 | {% endif %} 39 |
40 |
41 | 42 | 43 | 44 |
45 | 46 | {% endblock content %} 47 | -------------------------------------------------------------------------------- /templates/gallery.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 5 | 55 | 56 | 71 | 72 | {% endblock %} 73 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load static %} 3 | 4 | 5 | {% block content %} 6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 |
17 |

Easy way to analyze your text.

18 |

This is an open source project managed by Rohit Saini .

19 |
20 | 21 |
22 | Analyze 23 | Generate 24 |
25 |
26 | 27 |
28 |

T.

29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 | 37 |
38 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 |

Services

47 |
48 |
49 |
50 | 51 |
52 | 53 |
54 |

Generate Password

55 |
56 |
57 |

Generate a random password by entering some text.

58 |
59 | 60 | 61 | GO 62 |
63 | 64 |
65 |

Sentiment Anaysis

66 |
67 | 68 |
69 |

Analyze the sentiments of any text given by you.

70 |
71 | 72 | GO 73 |
74 | 75 |
76 |

Search Images

77 |
78 | 79 |
80 |

Search images for any word entered by you.

81 |
82 | 83 | GO 84 |
85 | 86 |
87 | 88 | 89 |
90 | 91 | 92 |
93 |
94 | 95 | 96 |
97 |
98 |

Get in Touch

99 |
100 |
101 |
102 | 103 |
{% csrf_token %} 104 |
105 |
106 |
107 |
108 |
109 |
110 | 111 | 112 | 113 |
114 |
115 | 116 | 150 | 151 | {% endblock %} 152 | 153 | 154 | 158 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 | 8 | 9 |
10 | 11 |

Welcome to Text Analyzer

12 |

Add your text below to perform desired operations on it

13 | 14 |
{% csrf_token %} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

Actions you can perform :

23 |
24 |
25 | 27 | 28 |
29 |
30 | 32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 | 41 |
42 |
43 | 44 | 45 |
46 |
47 | 49 | 50 |
51 |
52 | 54 | 55 |
56 |
57 | 59 | 60 |
61 | 62 |
63 | 65 | 66 | 67 |
68 |
69 | 71 | 72 |
73 |
74 | 76 | 77 |
78 |
79 | 81 | 82 |
83 |
84 | 86 | 87 |
88 |
89 | 91 | 92 |
93 |
94 | 95 |
96 |
97 | 98 | 99 |
100 | 101 |
102 | 103 | 104 |
105 | 106 | {% if emptyText %} 107 | 110 | {% endif %} 111 | 112 |
113 | 114 | 115 | 129 | 186 | 187 | {% endblock %} 188 | 189 | -------------------------------------------------------------------------------- /templates/index2.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load static %} 3 | 4 | 5 | {% block content %} 6 | 7 | 8 | 9 |
10 | 11 |

Welcome to Text Analyzer

12 |

(Text Generator Mode)

13 |

14 | Add your text below to perform desired operations on it 15 |

16 |
17 | {% csrf_token %} 18 | 19 |

Actions you can perform :

20 |
21 |
22 | 23 | 24 |
25 |
26 | 28 | 29 |
30 |
31 | 32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 | 41 |
42 |
43 | 44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 | 52 | 53 |
54 |
55 | 56 | 57 |
58 |
59 | 60 |
61 | 62 |
63 | 64 | 65 |
66 | 67 |
68 | 69 | 70 |
71 | 72 |
73 | 74 | 75 | 117 | 118 | {% endblock %} 119 | 120 | -------------------------------------------------------------------------------- /templates/pdf.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | Pdf Viewer 10 | 11 | 12 | 13 | 14 |


15 |

Welcome to Text Analyzer (Pdf Viwer)

16 | 17 |
18 |

{{myvar}}

19 |
20 |
21 | 22 |
23 | 26 | 29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /templates/youtube.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |

Youtube Channels related to {{text}}

14 | 15 |
16 | {% if result %} 17 | 18 | 19 | {% for i in result %} 20 | 21 | 34 | 35 | {% endfor %} 36 | 37 |
22 | 33 |
38 | {% endif %} 39 |
40 |
41 | 42 | 43 | 44 |
45 | 46 | {% endblock content %} 47 | -------------------------------------------------------------------------------- /textAnalyzer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Installing postgresql as well as other important tools 4 | # These are required by psycopg2 python library 5 | # which in turn are required by django_heroku python library 6 | sudo apt-get -y install postgresql 7 | sudo apt-get -y install libpq-dev python3-dev -------------------------------------------------------------------------------- /textanalyzer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/textanalyzer/__init__.py -------------------------------------------------------------------------------- /textanalyzer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import * 3 | 4 | # Register your models here. 5 | admin.site.register(User_profile) 6 | admin.site.register(Pdf) 7 | -------------------------------------------------------------------------------- /textanalyzer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TextanalyzerConfig(AppConfig): 5 | name = 'textanalyzer' 6 | -------------------------------------------------------------------------------- /textanalyzer/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-22 10:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='user_profile', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=200, null=True)), 19 | ('email', models.EmailField(max_length=100, null=True)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /textanalyzer/migrations/0002_auto_20210323_1217.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-03-23 06:47 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('textanalyzer', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='user_profile', 15 | name='message', 16 | field=models.TextField(blank=True, default=''), 17 | ), 18 | migrations.AlterField( 19 | model_name='user_profile', 20 | name='email', 21 | field=models.EmailField(blank=True, default='', max_length=100), 22 | ), 23 | migrations.AlterField( 24 | model_name='user_profile', 25 | name='name', 26 | field=models.CharField(blank=True, default='', max_length=200), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /textanalyzer/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rockingrohit9639/TextAnalyzer/6be2ff7df9ba487a54055307704b91be576d7942/textanalyzer/migrations/__init__.py -------------------------------------------------------------------------------- /textanalyzer/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class User_profile(models.Model): 4 | name = models.CharField(max_length=200, default="", blank=True) 5 | email = models.EmailField(max_length=100, default="", blank=True) 6 | message=models.TextField(default="",blank=True) 7 | 8 | def __str__(self): 9 | return str(self.name) 10 | 11 | class Pdf(models.Model): 12 | name = models.CharField(max_length=200) 13 | 14 | def __str__(self): 15 | return self.name 16 | 17 | -------------------------------------------------------------------------------- /textanalyzer/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /textanalyzer/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path 3 | from . import views 4 | from .views import render_pdf_view, PdfListView 5 | 6 | 7 | urlpatterns = [ 8 | path('admin/', admin.site.urls), 9 | path('', views.index, name='index'), 10 | path('analyze', views.analyze, name='rmvpunc'), 11 | path('about', views.about, name='About Us'), 12 | path('index', views.home, name='Get Started'), 13 | path('index2', views.index2, name='Generate Text'), 14 | path('gallery/',views.gallery,name='gallery'), 15 | path('youtube/', views.youtube, name='youtube'), 16 | path('books/', views.searchBook, name='books'), 17 | path("contact",views.contact,name="contact"), 18 | path('articles/', views.articles, name='articles'), 19 | path('pdf/', render_pdf_view, name='pdf-view'), 20 | path('', PdfListView.as_view(), name='pdf-list-view'), 21 | ] 22 | 23 | -------------------------------------------------------------------------------- /textanalyzer/views.py: -------------------------------------------------------------------------------- 1 | from django.http import HttpResponse 2 | from django.shortcuts import render,get_object_or_404 3 | from django.utils.html import format_html 4 | from django.template.loader import get_template 5 | import string 6 | import re 7 | import requests 8 | import json 9 | from bs4 import BeautifulSoup 10 | import nltk 11 | from nltk.corpus import stopwords 12 | from nltk.tokenize import word_tokenize 13 | from nltk.stem import WordNetLemmatizer 14 | import random 15 | import textwrap 16 | from PyDictionary import PyDictionary 17 | from textblob import TextBlob 18 | import random 19 | from gingerit.gingerit import GingerIt 20 | from pyyoutube import Api 21 | from .models import * 22 | from xhtml2pdf import pisa 23 | from django.views.generic import ListView 24 | from .models import Pdf 25 | from wordcloud import WordCloud,STOPWORDS 26 | import io 27 | from io import BytesIO 28 | import urllib,base64 29 | from date_extractor import extract_dates 30 | import matplotlib.pyplot as plt 31 | 32 | 33 | nltk.download('stopwords') 34 | nltk.download('punkt') 35 | 36 | #Api key for the meriam-webster api 37 | api_key = "e7aa870d-ee6d-482c-a437-eb6bb0bcb9c1" 38 | 39 | 40 | class PdfListView(ListView): 41 | model = Pdf 42 | template_name = 'analyze.html' 43 | 44 | def render_pdf_view(request): 45 | template_path = 'pdf.html' 46 | data = request.session['user-input'] 47 | context = {'myvar': data} 48 | response = HttpResponse(content_type='application/pdf') 49 | response['Content-Disposition'] = 'filename="report.pdf"' 50 | template = get_template(template_path) 51 | html = template.render(context) 52 | 53 | pisa_status = pisa.CreatePDF( 54 | html, dest=response) 55 | if pisa_status.err: 56 | return HttpResponse('We had some errors
' + html + '
') 57 | return response 58 | 59 | 60 | def index(request): 61 | 62 | return render(request, 'home.html') 63 | 64 | def about(request): 65 | 66 | api_url='https://api.github.com/repos/rockingrohit9639/TextAnalyzer/contributors' 67 | 68 | response = requests.get(api_url).json() 69 | 70 | context = { 71 | "userData": response 72 | } 73 | 74 | return render(request, 'about.html', context) 75 | 76 | def youtube(request): 77 | api=Api(api_key="AIzaSyDHAS3sDLVtUqM1vx-kxykrBHMVSi0BLJI") 78 | query = request.session['user-input'] 79 | res=api.search_by_keywords(q=query,search_type=["channel"],count=25,limit=8) 80 | res=res.to_dict() 81 | res_items=res["items"] 82 | result=[] 83 | 84 | for data in res_items: 85 | temp={ 86 | "channel_name":data["snippet"]["title"], 87 | "channel_url":"https:/www.youtube.com/channel/"+str(data["snippet"]["channelId"]), 88 | "channel_logo":data["snippet"]["thumbnails"]["default"]["url"] 89 | } 90 | 91 | result.append(temp) 92 | 93 | context = { 94 | "result": result, 95 | "text":query 96 | } 97 | 98 | return render(request, 'youtube.html', context) 99 | 100 | def searchBook(request): 101 | GOOGLE_BOOKS_API_KEY="AIzaSyDmymOgoPKQZfhMmd3gd9Be-mM6cb8okeM" 102 | query = request.session['user-input'] 103 | payload = { 104 | "key": GOOGLE_BOOKS_API_KEY, 105 | "maxResults": 6, 106 | "q": query, 107 | } 108 | 109 | resp = requests.get("https://www.googleapis.com/books/v1/volumes", params=payload).json() 110 | res_items = resp["items"] 111 | arr=[] 112 | 113 | 114 | for data in res_items: 115 | try: 116 | temp={ 117 | 'title':data["volumeInfo"]["title"], 118 | 'link':data["volumeInfo"]["infoLink"], 119 | 'description_text':"".join(data["volumeInfo"]["description"].split(".")[0]), 120 | 'thumbnail':data["volumeInfo"]["imageLinks"]["smallThumbnail"], 121 | } 122 | except: 123 | temp={ 124 | 'title':data["volumeInfo"]["title"], 125 | 'link':data["volumeInfo"]["infoLink"], 126 | 'description_text':"Description Not Available", 127 | 'thumbnail':data["volumeInfo"]["imageLinks"]["smallThumbnail"], 128 | } 129 | 130 | arr.append(temp) 131 | 132 | context = { 133 | "result": arr, 134 | "text":query 135 | } 136 | 137 | return render(request, 'books.html', context) 138 | 139 | def articles(request): 140 | Base_string = "https://medium.com/tag/" 141 | query = request.session['user-input'] 142 | url=Base_string + query 143 | res = requests.get(url) 144 | soup = BeautifulSoup(res.text, 'html.parser') 145 | 146 | logo=[] 147 | writer=[] 148 | publisher=[] 149 | title=[] 150 | link=[] 151 | 152 | start = soup.find_all('div',class_='streamItem streamItem--postPreview js-streamItem') 153 | for span in start: 154 | start1=span.find_all('img')[0]['src'] 155 | logo.append(start1) 156 | start2=span.find_all('div',class_='postMetaInline postMetaInline-authorLockup ui-captionStrong u-flex1 u-noWrapWithEllipsis') 157 | for span2 in start2: 158 | start3=span2.find_all('a')[0].text 159 | writer.append(start3) 160 | start4=span2.find_all('a')[1].text 161 | publisher.append(start4) 162 | start5 = span.find_all('h3',class_='graf graf--h3 graf-after--figure graf--title') 163 | for span2 in start5: 164 | start6=span2.text.replace("\xa0",' ') 165 | title.append(start6) 166 | start7=span.find_all('a')[3]['href'] 167 | link.append(start7) 168 | 169 | myDict={"title":[],"writer":[],"publisher":[],"logo":[],"link":[]} 170 | myDict['title'].extend(title) 171 | myDict['writer'].extend(writer) 172 | myDict['publisher'].extend(publisher) 173 | myDict['logo'].extend(logo) 174 | myDict['link'].extend(link) 175 | 176 | arr2 = [] 177 | for i in range(0,7): 178 | try: 179 | temp = { 180 | "title": myDict["title"][i], 181 | "writer": myDict["writer"][i], 182 | "publisher": myDict["publisher"][i], 183 | "logo": myDict["logo"][i], 184 | "link":myDict["link"][i] 185 | } 186 | 187 | except: 188 | temp = { 189 | "title": "Not Available", 190 | "writer": " ", 191 | "publisher":" ", 192 | "logo": " ", 193 | "link":" " 194 | } 195 | 196 | arr2.append(temp) 197 | 198 | context = { 199 | "result": arr2, 200 | "text":query 201 | } 202 | 203 | return render(request, 'articles.html', context) 204 | 205 | 206 | def home(request): 207 | 208 | return render(request, 'index.html') 209 | 210 | 211 | def index2(request): 212 | 213 | return render(request, 'index2.html') 214 | 215 | def get_synonyms(word): 216 | try: 217 | synonyms=[] 218 | res = requests.get('https://www.merriam-webster.com/dictionary/'+word) 219 | soup = BeautifulSoup(res.text, 'lxml') 220 | containers=soup.findAll( 221 | 'ul',{'class':'mw-list'})[0].findAll('li') 222 | for con in containers: 223 | synonyms.append(con.find("a").text) 224 | return synonyms 225 | except: 226 | dictionary=PyDictionary() 227 | testdict=dictionary.synonym(word) 228 | return testdict 229 | 230 | def get_example(word): 231 | try: 232 | res = requests.get('https://www.merriam-webster.com/dictionary/'+word) 233 | soup = BeautifulSoup(res.text, 'lxml') 234 | containers=soup.find("div",{'class':'in-sentences'}).text 235 | example=' '.join(containers.split()).split('.')[3].strip() 236 | return example 237 | except: 238 | return None 239 | 240 | 241 | 242 | def get_words_dict(text): 243 | words_raw = text.split() 244 | words = {} 245 | for word in words_raw: 246 | if word in words: 247 | words[word] += 1 248 | else: 249 | words[word] = 1 250 | 251 | return {key: value for key, value in sorted(words.items(), key=lambda item: item[1], reverse=True)} 252 | 253 | def format_spaces(string1, string2, total_chars=40, min_spaces=1): 254 | num_spaces = total_chars - (len(str(string1)) + min_spaces) 255 | if num_spaces < min_spaces: 256 | num_spaces = min_spaces 257 | 258 | return str(string1) + " " * num_spaces + str(string2) 259 | 260 | def gallery(request): 261 | ACCESS_KEY = 'YBBd6J15p1YwXIV3THzl4Zt3eHiD3BGT8unud0VUNQo' 262 | place = request.session['user-input'] 263 | payload = { 264 | 'query': place, 265 | 'client_id': ACCESS_KEY, 266 | 'per_page': 40, 267 | } 268 | url = 'https://api.unsplash.com/search/photos' 269 | r = requests.get(url, params=payload).json() 270 | 271 | package = json.dumps(r, indent=2) 272 | arr = [] 273 | for data in r['results']: 274 | arr.append(data['urls']['regular']) 275 | 276 | place=place.upper()+":" 277 | context = { 278 | 'link': arr, 279 | 'text': place, 280 | } 281 | return render(request, 'gallery.html', context) 282 | 283 | 284 | 285 | def analyze(request): 286 | 287 | puncts = string.punctuation 288 | word_to_find = request.POST.get("word_input") 289 | djText = request.POST.get('text', 'default') 290 | remPunc = request.POST.get('option','removepunc') 291 | cap = request.POST.get('option','capitalize') 292 | small = request.POST.get('option','toSmall') 293 | upper = request.POST.get('option', 'toUpper') 294 | word_find_flag = request.POST.get('option','word_find') 295 | New_Line = request.POST.get('option','New_line') 296 | Emails= request.POST.get('option','Email_Address') 297 | Links = request.POST.get('option','Links') 298 | Passgen=request.POST.get('option', 'Password_Generator') 299 | search_word=request.POST.get('option', 'Search_word') 300 | gallery=request.POST.get('option', 'q') 301 | Suggest_word=request.POST.get('option', 'suggest_word') 302 | Sen_Analysis=request.POST.get('option', 'Sentiment') 303 | Grammar=request.POST.get('option','grammar') 304 | Channel=request.POST.get('option','suggest_youtube') 305 | books=request.POST.get('option','suggest_books') 306 | replace_input = request.POST.get("other") 307 | 308 | if len(djText)==0: 309 | context = { 310 | 'emptyText': True 311 | } 312 | return render(request, 'index.html', context) 313 | 314 | articles=request.POST.get('option','suggest_articles') 315 | lemmitizer=request.POST.get('option','grammar') 316 | start_pdf=request.POST.get('option','generate_pdf') 317 | replace_text = request.POST.get('option', 'replace') 318 | Word_cloud=request.POST.get('option','wordcloud') 319 | Date=request.POST.get('option','date') 320 | Word_frequency=request.POST.get('option','word_frequency') 321 | 322 | 323 | 324 | analyzed_text = "" 325 | word_status = "" 326 | 327 | countword = len(djText.split()) 328 | 329 | if word_find_flag == "word_find": 330 | if word_to_find != "": 331 | if djText.find(word_to_find) != -1: 332 | word_status = "found" 333 | word=djText.replace(word_to_find,f""""""+word_to_find+"") 334 | djText=word 335 | 336 | try: 337 | synonym_01=get_synonyms(word_to_find) 338 | synonyms2=random.sample(synonym_01,4) 339 | 340 | final="" 341 | for f in synonyms2: 342 | final+=f+" , " 343 | 344 | example=get_example(word_to_find) 345 | 346 | synonyms=final+example 347 | 348 | except: 349 | synonyms="Not Available" 350 | 351 | else: 352 | word_status = "not found" 353 | synonyms="Text Not Found" 354 | 355 | analyzed_text = djText 356 | word_find="Find Word = " + word_to_find 357 | synonym=format_html('{}','green',synonyms) 358 | 359 | result = { 360 | "analyzed_text": analyzed_text, 361 | "highlight":"Chosen word is highlighted in red colour and synonyms/examples in green colour", 362 | "purpose": word_find, 363 | "status": word_status, 364 | "synonym":synonym, 365 | "wordcount": countword, 366 | "analyze_text":True, 367 | "findWord":True 368 | } 369 | 370 | 371 | elif New_Line == "New_line": 372 | for char in djText: 373 | if char == '.': 374 | char='\n'; 375 | analyzed_text = analyzed_text + char 376 | result = { 377 | "analyzed_text": analyzed_text, 378 | "purpose": "Changes '.' to New Line", 379 | "analyze_text":True, 380 | "wordcount": countword 381 | } 382 | elif Emails == "Email_Address": 383 | regex = '^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w{2,3}$' 384 | lst= re.findall('\S+@+\S+', djText) 385 | tmp="" 386 | for x in lst: 387 | if(re.search(regex,x)): 388 | tmp+=x 389 | tmp+='\n' 390 | result = { 391 | "analyzed_text": tmp, 392 | "purpose": "Find All Emails", 393 | "analyze_text":True, 394 | "wordcount": countword 395 | } 396 | 397 | elif Passgen=="Password_Generator": 398 | stop_words = set(stopwords.words('english')) 399 | chars = "!£$%&*#@" 400 | ucase_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 401 | text = re.sub(r'[^\w\s]', '', djText) 402 | token = word_tokenize(text) 403 | 404 | filtered_sentence = [] 405 | 406 | for w in token: 407 | if w not in stop_words: 408 | filtered_sentence.append(w) 409 | 410 | if len(filtered_sentence) > 0: 411 | random_word = random.choice(filtered_sentence) 412 | else: 413 | random_word = token[0] 414 | 415 | random_word=random_word.title() 416 | 417 | merge="" 418 | for word in random_word.split(): 419 | merge+=random.choice(chars)+word[:-1]+ word[-1].upper()\ 420 | +random.choice(string.ascii_letters)+"@"+random.choice(ucase_letters)\ 421 | +random.choice(string.digits)+" " 422 | final_text=merge[:-1] 423 | result = { 424 | "analyzed_text": final_text, 425 | "purpose": "Generate password from text", 426 | "generate_text":True, 427 | "wordcount": countword 428 | } 429 | 430 | elif search_word=="Search_word": 431 | url = 'https://www.dictionary.com/browse/' 432 | headers = requests.utils.default_headers() 433 | headers.update({ 434 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' 435 | }) 436 | req = requests.get(url+djText, headers) 437 | soup = BeautifulSoup(req.content, 'html.parser') 438 | mydivs = soup.findAll("div", {"value": "1"})[0] 439 | for tags in mydivs: 440 | meaning = tags.text 441 | wrap = textwrap.TextWrapper(width=100) 442 | word_meaning = wrap.fill(text=meaning) 443 | result = { 444 | "analyzed_text": word_meaning, 445 | "purpose": "Searched Word", 446 | "generate_text":True, 447 | "wordcount": countword 448 | } 449 | 450 | 451 | elif Suggest_word=="suggest_word": 452 | find = requests.get(f"https://www.dictionaryapi.com/api/v3/references/thesaurus/json/{djText}?key={api_key}") 453 | response = find.json() 454 | 455 | if len(response) == 0: 456 | print("Word Not Recognized!") 457 | else: 458 | k=[] 459 | if str(response[0]).count(" ") == 0: 460 | for j in range(len(response)): 461 | k.append(response[j]) 462 | predict=" , ".join(k) 463 | djText=predict 464 | 465 | else: 466 | dictionary=PyDictionary() 467 | testdict=dictionary.synonym(djText) 468 | suggest=" , ".join(testdict) 469 | djText=suggest 470 | wrap = textwrap.TextWrapper(width=100) 471 | suggest = wrap.fill(text=djText) 472 | 473 | result = { 474 | "analyzed_text": suggest, 475 | "purpose": "Suggested Word", 476 | "generate_text":True, 477 | "wordcount": countword 478 | } 479 | 480 | elif Sen_Analysis=="Sentiment": 481 | 482 | djText=' '.join(re.sub("(@[A-Za-z0-9]+)|([^0-9A-Za-z \t])|(\w+:\/\/\S+)", " ", djText).split()) 483 | 484 | analysis = TextBlob(djText) 485 | # set sentiment 486 | if analysis.sentiment.polarity > 0: 487 | final=str(djText)+" (Positive Text)" 488 | elif analysis.sentiment.polarity == 0: 489 | final=str(djText)+" (Neutral Text)" 490 | else: 491 | final=str(djText)+" (Negative Text)" 492 | 493 | result = { 494 | "analyzed_text": final, 495 | "purpose": "Sentiment Analysis", 496 | "analyze_text":True, 497 | "wordcount": countword 498 | } 499 | 500 | elif Grammar=="grammar": 501 | parser = GingerIt() 502 | result = parser.parse(djText) 503 | final=result["result"] 504 | 505 | if final=='': 506 | final="Please write some text to check grammar" 507 | 508 | result = { 509 | "analyzed_text": final, 510 | "grammar":djText, 511 | "purpose": "Spelling & Grammar Check", 512 | "analyze_text":True, 513 | "wordcount": countword 514 | } 515 | 516 | elif lemmitizer=="lemmitize": 517 | wordnet_lemmatizer = WordNetLemmatizer() 518 | tokenization = nltk.word_tokenize(djText) 519 | count=True 520 | for w in tokenization: 521 | k=wordnet_lemmatizer.lemmatize(w,pos ="v") 522 | if w!=k: 523 | result="{} -> {}".format(w, wordnet_lemmatizer.lemmatize(w,pos ="v")) 524 | count=False 525 | if count==True: 526 | final="No need for lemmatization" 527 | if count==False: 528 | final="(Original word) - > (Lemmatized word)" 529 | 530 | result = { 531 | "analyzed_text": result, 532 | "highlight":final, 533 | "purpose": "Lemmatization of text", 534 | "analyze_text":True, 535 | "wordcount": countword 536 | } 537 | 538 | 539 | elif Channel=="suggest_youtube": 540 | request.session['user-input']=djText 541 | result = { 542 | "analyzed_text": djText, 543 | "purpose":"Suggest youtube channels", 544 | "status": "Press Button To View Channel links", 545 | "find_channel": True, 546 | "generate_text":True, 547 | "wordcount": countword 548 | } 549 | 550 | elif books=="suggest_books": 551 | request.session['user-input']=djText 552 | result = { 553 | "analyzed_text": djText, 554 | "purpose":"Search Books", 555 | "status": "Press Button To View Books", 556 | "find_books": True, 557 | "generate_text":True, 558 | "wordcount": countword 559 | } 560 | 561 | 562 | elif articles=="suggest_articles": 563 | request.session['user-input']=djText 564 | result = { 565 | "analyzed_text": djText, 566 | "purpose":"Search Articles", 567 | "status": "Press Button To View Articles", 568 | "find_articles": True, 569 | "generate_text":True, 570 | "wordcount": countword 571 | } 572 | 573 | elif start_pdf=="generate_pdf": 574 | request.session['user-input']=djText 575 | result = { 576 | "analyzed_text": "Check Your Pdf", 577 | "purpose":"Generate Pdf", 578 | "status": "Press Button To View Pdf", 579 | "make_pdf": True, 580 | "generate_text":True, 581 | "wordcount": countword 582 | } 583 | 584 | elif replace_text == "replace": 585 | final_text = re.sub(word_to_find, replace_input, djText) 586 | result = { 587 | "analyzed_text": final_text, 588 | "purpose": "Replacemet of text in sentence", 589 | "analyze_text":True, 590 | "wordcount": countword 591 | } 592 | 593 | elif Word_cloud=="wordcloud": 594 | cloud=WordCloud(background_color="white",max_words=200,stopwords=set(STOPWORDS)) 595 | wc=cloud.generate(djText) 596 | buf=io.BytesIO() 597 | wc.to_image().save(buf,format="png") 598 | data=base64.b64encode(buf.getbuffer()).decode("utf8") 599 | final="data:image/png;base64,{}".format(data) 600 | 601 | result = { 602 | "analyzed_text":" ", 603 | "purpose":"Wordcloud", 604 | "my_wordcloud": final, 605 | "generate_text":True, 606 | "wordcount": countword 607 | } 608 | 609 | elif Date=="date": 610 | final=extract_dates(djText) 611 | final_text=final[0].date() 612 | 613 | result = { 614 | "analyzed_text": final_text, 615 | "purpose": "Extract Dates from text", 616 | "analyze_text":True, 617 | "wordcount": countword 618 | } 619 | 620 | elif Word_frequency=="word_frequency": 621 | input_text = djText.replace("\n", " ") 622 | djText = input_text.lower() 623 | 624 | words_dict = get_words_dict(djText) 625 | # create graph 626 | if len(words_dict)>10: 627 | k=10 628 | else: 629 | k=len(words_dict) 630 | 631 | y_pos = range(0, k) 632 | bars = [] 633 | height = [] 634 | count=0 635 | 636 | # print and save values to graph 637 | format_spaces("word", "occurrences") 638 | for word_str, word_amount in words_dict.items(): 639 | format_spaces(word_str, word_amount) 640 | count+=1 641 | if count<=10: 642 | bars.append(word_str) 643 | height.append(int(word_amount)) 644 | else: 645 | pass 646 | 647 | # # Create bars 648 | plt.bar(y_pos, height) 649 | 650 | # Create names on the x-axis 651 | plt.xticks(y_pos, bars, size=9) 652 | 653 | plt.xticks(rotation='horizontal') 654 | plt.ylabel('Word Frequency',fontsize=12,labelpad=10) 655 | plt.xlabel('Words',fontsize=12,labelpad=10) 656 | 657 | fig=plt.gcf() 658 | 659 | buf=BytesIO() 660 | fig.savefig(buf,format='png') 661 | buf.seek(0) 662 | data=base64.b64encode(buf.read()) 663 | uri=urllib.parse.quote(data) 664 | final="data:image/png;base64,{}".format(uri) 665 | 666 | result = { 667 | "analyzed_text": " ", 668 | "purpose": "Word Frequency for every word in text", 669 | "bar_graph": final, 670 | "analyze_text":True, 671 | "wordcount": countword 672 | } 673 | 674 | 675 | elif gallery=="q": 676 | request.session['user-input']=djText 677 | result = { 678 | "analyzed_text": djText, 679 | "purpose":"Images", 680 | "status": "Press Button To View Images", 681 | "find_image": True, 682 | "generate_text":True, 683 | "wordcount": countword 684 | } 685 | 686 | elif remPunc == 'removepunc': 687 | for char in djText: 688 | if char not in puncts: 689 | analyzed_text = analyzed_text + char 690 | result = { 691 | "analyzed_text": analyzed_text, 692 | "purpose": "Remove Punctuations", 693 | "analyze_text":True, 694 | "wordcount": countword 695 | } 696 | elif cap == "capitalize": 697 | analyzed_text = djText.capitalize() 698 | 699 | result = { 700 | "analyzed_text": analyzed_text, 701 | "purpose": "Capitalize", 702 | "analyze_text":True, 703 | "wordcount": countword 704 | } 705 | 706 | elif small == "toSmall": 707 | analyzed_text = djText.lower() 708 | 709 | result = { 710 | "analyzed_text": analyzed_text, 711 | "purpose": "To Smallercase", 712 | "analyze_text":True, 713 | "wordcount": countword 714 | } 715 | 716 | elif upper == "toUpper": 717 | analyzed_text = djText.upper() 718 | 719 | result = { 720 | "analyzed_text": analyzed_text, 721 | "purpose": "To Uppercase", 722 | "analyze_text":True, 723 | "wordcount": countword 724 | } 725 | elif Links == "Links": 726 | pattern = '(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])' 727 | links = re.findall(pattern, djText, re.IGNORECASE) 728 | analyzed_text="" 729 | 730 | i = 0 731 | for x in links: 732 | i = i + 1 733 | analyzed_text+=f'Link {i}' 734 | analyzed_text+='\n ' 735 | 736 | result = { 737 | "analyzed_text": analyzed_text, 738 | "purpose": "Find All Links", 739 | "analyze_text":True, 740 | "wordcount": countword 741 | } 742 | 743 | else: 744 | return HttpResponse('''''') 745 | 746 | return render(request, 'analyze.html', result) 747 | 748 | 749 | def contact(request): 750 | if request.method=="POST": 751 | name=request.POST['Name'] 752 | email=request.POST['Email'] 753 | message=request.POST['Message'] 754 | user = User_profile.objects.create(name=name,email=email,message=message) 755 | user.save() 756 | return render(request,"home.html") 757 | 758 | --------------------------------------------------------------------------------