Skip to content

Commit

Permalink
Merge pull request #37 from Arisha2902/main
Browse files Browse the repository at this point in the history
#36:   QR Code Generator
  • Loading branch information
PreyumKr authored Oct 27, 2024
2 parents f51e978 + 7425d5e commit 3d7e467
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 1 deletion.
102 changes: 102 additions & 0 deletions Adding Extension to files with no extension/Qr Code Generator/Code.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
*{
margin:0px;
padding:0px;
}
.bg{
background-color: antiquewhite;
border: 2px solid black;
width:100%;
height:100vh;
padding:10px;
background :linear-gradient(135deg,#153677,#4e085f);
}
.container{
font-style:Italic;
background-color:#d2d1ff;
border:3px solid black;
border-radius:12px;
width:70%;
height:65vh;
position:relative;
margin-left:9vh;
margin-top:4vh;
display: flex;
flex-direction: column;
flex-wrap: wrap;
text-align: center;
padding-top: 30px;
}
.main{
display: grid;
margin-bottom:19px;
align-items: center;
justify-content: center;
color:blanchedalmond;
font-size: x-large;
}
form{
padding-left:7px;
margin: 0;
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -20%);
padding-top:13px;
padding-bottom:13px;
color:black ;
}
h5{
font-size: 35px;
justify-content: center;
}
#qrText{
padding-left:7px;
color:black;
height: 45px;
font-size: 30px;
}
.button{
float:right;
margin:auto;
background-color:red;
color:white;
padding:10px;
border:none;
border-radius:16px;
text-align:center;
font-size:11px;
font-style:Italic;
font-weight:bold;
margin-top:14px;
}
#imgBox {
position: relative;
border-radius: 8px;
transition: max-height 1s;
top: 20%
}
#imgBox img {
width: 100%;
}
#imgBox.show-img {
max-width: 210px;
border: 2px solid #d1d1d1;
margin-top: 10px;
}
@media (max-width:556px) {
.container{
padding-top: 20px;
}
.button{
margin-top: 3px;
margin-bottom: 5px;
}
#qrText{
height: 30px;
width: 90%;
font-size: 27px;
}
h5{
font-size: 23px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="Code.css">
</head>
<body>
<div class="bg">
<div class="main">
<h1>QRTextify</h1>
</div>
<div class ="container" >
<h5>Enter Your Website URL</h5>
<form action="">
<div>
<input type="text" id="qrText" placeholder="Enter Your Text">
</div>
<button class="button" onclick="generatQR(event)">Generate QR Code</button>
<div id="imgBox">
<img src="" id="qrImage">
</div>
</form>
</div>
</div>
<script src="Code.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let imgBox = document.getElementById("imgBox");
let qrImage = document.getElementById("qrImage");
let qrText = document.getElementById("qrText");

function generatQR(event) {
event.preventDefault();
if (qrText.value.length > 0) {
qrImage.src = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + qrText.value;
imgBox.classList.add("show-img");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Installation:-

1. Open Vs code
2. Click files icon
3. Click on its last icon(Extension)
4. On Extension search "Live Server",Install live server

You are Ready run your program i.e. "to 'Generator a Qr Code' of your desired URL or text".

How it Works:-
1. Enter text or a URL in the input field.
2. Click the "Generate QR Code" button to create a QR code.
3. The JavaScript code sends the input to an external API that generates the QR code.
4. The generated QR code is displayed in an image box below the button.



How To Use:-
1) Enter your specified text in "Enter Your text".
2) click on "Generate QR Code".
#) Your Qr Code is displayed ,use it as per your requirement
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ Python Scripts for solving daily life problems in windows (recommended)
* Just do `npm init -y` and `npm install express ws` on the client and server folders seperately and run the clients and server using `node index.js`.
* They also asked to make the messages appear in a webpage. For this there is a ***index.html*** in the client folder which has html and the client JS code embedded inside it.

### Qr Code Generator

* This project allows users to create QR codes from any text or URL input using a QR code generation API. Users simply type their desired content and generate the QR code with a single click.
* With a responsive and user-friendly interface, users can enter their desired text or URL, click "Generate QR Code" and instantly view the QR code output.
* Built using HTML, CSS, and JavaScript, this app leverages JavaScript to interact with the API and retrieve the QR code image, which is then displayed within the interface.
* This tool provides a quick way to create QR codes for links, text, or other content, making it ideal for generating shareable codes on the go.


### QR Code Reader (In Real Time)

* This project demonstrates a simple Python-based QR code scanner that works in real-time using a webcam. It uses the `OpenCV` and `Pyzbar` libraries to detect and decode QR codes live from a video stream and save the results to a text file.
Expand Down Expand Up @@ -122,4 +130,7 @@ Python Scripts for solving daily life problems in windows (recommended)
* In any case, I have added the **base** model in the **models** folder for you to use it directly without using gb's of your data for the bigger models.
* The **base** model is kept in parts *lesser than 25MB* so that it can be uploaded to github, you need to extract it using ***7zip*** or ***winrar*** to use it. Extract using the **extract here** option.
* The subtitle generation is done locally and the video is not uploaded to any server as per my understanding.
* **NOTE:** ***If you face any issues with the path of videos while running the tree script or the other two scripts then try moving the working folder closer to the root directory of the drive. It might solve the issue.***




0 comments on commit 3d7e467

Please sign in to comment.