{"id":17762103,"url":"https://github.com/thepushkarp/jff-python-scripts","last_synced_at":"2025-03-15T11:33:02.658Z","repository":{"id":35184440,"uuid":"192599494","full_name":"thepushkarp/JFF-Python-Scripts","owner":"thepushkarp","description":"A collection of Python Scripts made for fun, while exploring Python 🐍","archived":false,"fork":false,"pushed_at":"2024-07-01T03:30:57.000Z","size":30,"stargazers_count":18,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T01:06:45.282Z","etag":null,"topics":["automate-the-boring-stuff","python","python3","scripts-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thepushkarp.png","metadata":{"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"thepushkarp","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.buymeacoffee.com/thepushkarp"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-18T19:20:06.000Z","updated_at":"2024-03-02T20:27:47.000Z","dependencies_parsed_at":"2024-08-02T00:13:01.196Z","dependency_job_id":null,"html_url":"https://github.com/thepushkarp/JFF-Python-Scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FJFF-Python-Scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FJFF-Python-Scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FJFF-Python-Scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FJFF-Python-Scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thepushkarp","download_url":"https://codeload.github.com/thepushkarp/JFF-Python-Scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243725015,"owners_count":20337660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automate-the-boring-stuff","python","python3","scripts-python"],"created_at":"2024-10-26T19:52:05.174Z","updated_at":"2025-03-15T11:33:02.645Z","avatar_url":"https://github.com/thepushkarp.png","language":"Python","readme":"\u003ch1 align = 'center'\u003e JFF-Python-Scripts \u003c/h1\u003e\n\n\u003ch3 align = 'center'\u003e A collection of Python Scripts made for fun, while exploring Python 🐍\u003c/h3\u003e\n\n### Inspiration 💡\n\nMany of the programs in this repository are inspired from the projects given in [Automate the Boring Stuff with Python](https://automatetheboringstuff.com/) by [Al Sweigart](https://github.com/asweigart) and some other are born out of redundant curiosity of a boring mind during lazy afternoons.\n\nThis repository would contain python scripts, some of which might come of use occasionally. The purpose of creating this is to explore the various modules and implementations of the language through creating programs that are as much fun to use as they are to make.\n\n## How to Use? 😀\n\n- Clone the repository `$ git clone https://github.com/thepushkarp/JFF-Python-Scripts.git`\n- Create a virtual environment ([click here](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) to learn about Virtual Environment)\n\n```sh\nvirtualenv env\n```\n\n- Activate virtual environment (On macOS and Linux)\n\n```sh\nsource env/bin/activate\n```\n\n- Activate virtual environment (On Windows)\n\n```sh\n.\\env\\Scripts\\activate\n```\n\n- Install requirements\n\n```sh\npip3 install -r requirements.txt\n```\n\n- Run and explore the scripts!\n\n__NOTE: All the scripts are written in Python 3. So, make sure to use the appropriate version of pip and python.__\n\n## Contents 📄\n\n- [Code Destroyer](#Code-Destroyer)\n- [Extract Phone Number and Email](#Extract-Phone-Number-and-Email)\n- [Search files based on size](#Search-files-based-on-size)\n- [Fill gaps in naming](#Fill-gaps-in-naming)\n- [Combine PDF files](#Combine-PDF-files)\n- [Add Watermark to PDF](#Add-Watermark-to-PDF)\n- [Encrypt or Decrypt a PDF](#Encrypt-or-Decrypt-a-PDF)\n- [Add Logo to Images](#Add-Logo-to-Images)\n\n### Code Destroyer\n\nCode Destroyer, inspired by a [tweet](https://twitter.com/benbjohnson/status/533848879423578112?lang=en) by Ben Johnson, replaces semicolon \";\" (U+003B) in files with a Greek Question Mark \";\" (U+037E), that looks alike, but shows syntax errors (since it is a different character) leaving the programmer scratching their heads in confusion. ;-)\n\n#### Usage:\n\nPut the file to be destroyed in the same folder as this script and run:\n\n```py3\npython3 codeDestroyer.py\n```\n\nEnter the full filename (like helloWorld.c) in the prompt that follows.\n\n __Disclaimer: Do not use this to prank on someone's hard-work. You know how frustating that feels.__\n\n### Extract Phone Number and Email\n\nTakes in the text from your clipboard and saves the Phone Numbers and Email Addresses found in it to .txt files. It searches for Indian Mobile Phone Numbers, Toll-Free Numbers, Telephone Numbers and Emails using Regular Expressions.\n\n_Useful if you have a large text data (like a website) and you are searching for phone numbers of emails in that text._\n\n#### Usage:\n\n```py3\npython3 phoneAndEmail.py\n```\n\nTwo files, `emails.txt` and `phoneNumbers.txt` would be created in the same directory containing the emails and phone numbers from the copied text.\n\n### Search files based on size\n\nLets you search through a folder based on file size. Asks user for folder path and size. Files and subfolders inside the folder, greater than or equal to the input size would be displayed.\n\n_Useful if you want to find large files and folders taking up space and wish to delete them._\n\n#### Usage:\n\n```py3\npython3 searchSize.py\n```\n\nWhen prompted, enter the minimum size (in bytes) and the folder where files are to be searched. If the path entered is correct, the files, above and equal the size entered would be displayed.\n\n### Fill gaps in naming\n\nFinds all files with a given prefix, such as spam001.txt, spam002.txt, and so on, in a single folder and locates any gaps in the numbering (such as if there is a spam001.txt and spam003.txt but no spam002.txt) and reanames all the files to close this gap.\n\n_Useful if you have a number of files with same prefix and numbering after it and by some case, there is irregularity in numbering (like after deleting unnecessary images from a camera) and you wish to get a ragular naming in those files._\n\n#### Usage:\n\n```py3\npython3 fillGap.py\n```\n\nEnter the file prefix, extesion name and taret folder in the prompt that appears. The files would be named in\norder, closing gaps, if any.\n\n### Combine PDF files\n\nCombines all the PDFs in the current working directory into\na single PDF. The program also prompts user if they want to include the cover page of all the PDFs that are being merged.\n\nIt is recommended to rename files so that they are lexographically in the same order as they are to be combined and put them in the same directory as the script.\nThe combined PDF would be saved as the name of the first file in the lexographic order prepended with 'combined'. \n\n_Useful if you have many PDF and you want to read them all one after the another (like all the PDFs of a professor's slides that you wish to read before exams). You won't need to go from one PDF to another after using this and would also have the option of adding or removing the coverpage of each PDF._\n\n__Ensure that none of the PDFs are encrypted.__\n\n#### Usage:\n\n```py3\npython3 combinePDF.py\n```\n\nChoose whether you want to include the cover page of each individual PDF by entering `y` or `n`.\n\n### Add Watermark to PDF\n\nAdd watermark to every page of a PDF document.\n\nThe watermark file should be a PDF too. If you want to make an image or text as a watermark, put them in a word file and stylize as per you want it to appear as the watermark and then export the file as PDF. This file would be the watermark file.\n\n_The usefullness of this script is straightforward - To add watermark to PDF files to prove its originality, make it harder to copy, and add authorship._\n\n__Ensure that none of the PDFs are encrypted.__\n\n#### Usage:\n\n```py3\npython3 addWatermarkPDF.py\n```\n\nEnter the filenames of the PDF to be watermarked and then of the watermark PDF.\n\n### Encrypt or Decrypt a PDF\n\nEncrypt an unencrypted PDF file with a password or decrypt a password-protected PDF and save as an unencrypted file.\n\n_The usefullness of this script too is pretty straightforward - To add or remove privacy to PDF files._\n\n#### Usage:\n\n```py3\npython3 encryptDecryptPDF.py\n```\n\nChoose whether you want to encrypt or decrypt a PDF and then enter the name of the file. You would be prompted to enter the password either to encrypt the PDF or decrypt it, as selected earlier.\n\n### Add Logo to Images\n\nAdds logo to the lower-right corner of all the pngs, jpgs and jpegs in the directory. The size of logo is approximately 1/10 th of the size of the image and has a padding of 1/25 th to the right and bottom of the logo is added.\n\n_Useful to add logos to images to prove their originality, make them harder to copy, and add authorship._\n\n#### Usage:\n\n```py3\npython3 addLogo.py\n```\n\nEnter the location of the logo file in the prompt that follows. All the images with added logo would be saved in the 'withLogo' directory.\n\n\n## License\n\n[MIT License](LICENSE)\n\n---\n\nFile Templates taken from [awesome-bashrc](https://github.com/aashutoshrathi/awesome-bashrc) and [HackerRank-Test-Case-Generator](https://github.com/aashutoshrathi/HackerRank-Test-Case-Generator/).\n\n\u003cp align=\"center\"\u003e Made with ❤ by \u003ca href=\"https://github.com/thepushkarp\"\u003ePushkar Patel\u003c/a\u003e\u003c/p\u003e\n","funding_links":["https://ko-fi.com/thepushkarp","https://www.buymeacoffee.com/thepushkarp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepushkarp%2Fjff-python-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepushkarp%2Fjff-python-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepushkarp%2Fjff-python-scripts/lists"}