Skip to content

Commit

Permalink
update website
Browse files Browse the repository at this point in the history
  • Loading branch information
C-o-m-o-n committed Dec 30, 2023
1 parent a067aab commit 4017026
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 267 deletions.
256 changes: 53 additions & 203 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,174 +1,3 @@
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TextBin</title>
<link rel="stylesheet" href="style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/styles/default.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</head>
<body>
<nav>
<div class="logo">
<img
width="100px"
src="pytextbin-removebg-preview.png"
/>
</div>
<div class="menu">
<div class="link-item">
<a href="#">Home</a>
</div>
<div class="link-item">
<a href="#">Code</a>
</div>
<div class="link-item">
<a href="#">Contribution</a>
</div>
<div class="link-item">
<a href="#">More</a>
</div>
</div>
</nav>
<div class="header">
<div class="about-textbin">
<h1 style="font-weight: bolder; margin: 3px">welcome to TextBin</h1>
<p>
Textbin is a Python package that provides text-to-binary and
binary-to-text conversion, as well as JSON-to-base64 and
base64-to-JSON encoding and decoding.
</p>
</div>
<div class="installation">
<h2 style="font-weight: bolder; margin: 3px">installation</h2>
<p>
You can install textbin through your terminal using pip from PyPI:<br />
<code style="color: #49daf2">pip install textbin</code>
</p>
<p>
Alternatively, you can find the project on GitHub:
<a href="https://github.com/C-o-m-o-n/textbin">GitHub Repository</a>
</p>
</div>
</div>
<div class="usage">
<h2 style="font-weight: bolder; margin: 3px">Usage</h2>
<p>
To begin, import the textbin module then create an object from the
Textbin() class, which you'll use to access all the methods.
</p>
<div class="instantiate">
<pre>
<code class="python">
# import textbin
from textbin.textbin import *
# create textbin_obj instance
textbin_obj = textbin.Textbin()
</code>
</pre>
</div>
<div class="code-area">
Text and binary
<div class="text-bin">
<p style="color: #81ca4d; margin: 3px">Text and Binary</p>
<pre>
<code class="python">
from textbin.textbin import *
textbin_obj = textbin.Textbin()
# Convert text to binary
word = "hello"
converted_word = textbin_obj.to_binary(word)
print(converted_word)
#Output: 1101000 1100101 1101100 1101100 1101111
# Convert binary to text
binary = "1101000 1100101 1101100 1101100 1101111"
converted_binary = textbin_obj.to_text(binary)
print(converted_binary) # Output: hello
</code>
</pre>
</div>
Text and binary end
JSON and Base64
<div class="json-base">
<p style="color: #81ca4d; margin: 3px">JSON and Base64</p>
<pre>
<code style="max-width:380px; border-radius: 10px;" class="python">
from textbin.textbin import *
textbin_obj = textbin.Textbin()
# Encode a JSON object to base64
word = {"foo": "bar"}
converted_word = textbin_obj.json_to_base64(word)
print(converted_word) # Output: eyJmb28iOiAiYmFyIn0=
# Decode a base64 string to a JSON object
base64_string = "eyJmb28iOiAiYmFyIn0="
converted_binary = textbin_obj.base64_to_json(base64_string)
print(converted_binary) # Output: {'foo': 'bar'}
</code>
</pre>
</div>
JSON and Base64 end
</div>
</div>
<div class="inside-textbin">
<p style="font-weight: bolder; margin: 3px">Inside textbin</p>
<p style="color: #81ca4d">What does it look like inside textbin?</p>
<p>
Inside the textbin.py, there is a 'Textbin()' class which has the
methods:
</p>
<ul>
<li>
<span style="color: #81ca4d; font-weight: bolder">to_binary</span>:
Converts text to binary representation.
</li>
<li>
<span style="color: #81ca4d; font-weight: bolder">to_text</span>:
Converts binary representation to text.
</li>
<li>
<span style="color: #81ca4d; font-weight: bolder">json_to_base64</span
>: Converts a JSON object to a base64-encoded string.
</li>
<li>
<span style="color: #81ca4d; font-weight: bolder">base64_to_json</span
>: Converts a base64-encoded string to a JSON object.
</li>
<li>
<span style="color: #81ca4d; font-weight: bolder">csv_to_json</span>:
Converts a CSV string to a JSON object.
</li>
<li>
<span style="color: #81ca4d; font-weight: bolder">json_to_csv</span>:
Converts a JSON object to a CSV string.
</li>
</ul>
</div>
<h1>Note!! The docs is still under development. Check again soon.</h1>
<h1>Help us develop it faster.</h1>
</body>
</html>
-->

<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -197,7 +26,13 @@ <h2 class="section-title">About PyTextBin</h2>
</section>

<section id="experience">
<h2 class="section-title">Usage</h2>
<h2 class="section-title">Installation</h2>
<p>
You can install textbin through your terminal using pip from PyPI</p>
<pre>
<code>pip install textbin</code>
</pre>

<p>Inside the textbin.py, there is a 'Textbin()' class which has the methods:</p>
<ul>
<li>to_binary: Converts text to binary representation.</li>
Expand All @@ -214,7 +49,7 @@ <h2 class="section-title">Usage</h2>
To begin, import the pytextbin module then create an object from the
Textbin() class, which you'll use to access all the methods.
<pre>
<code class="python">
<code>
# import textbin
from textbin.textbin import *
# create textbin_obj instance
Expand All @@ -223,41 +58,56 @@ <h2 class="section-title">Usage</h2>
</pre>
</section>

<section id="skills">
<h2 class="section-title">Skills</h2>
<ul>
<li>Full Stack Developement</li>
<li>Open-Source contributor</li>
<li>React JS</li>
<li>Nextjs</li>
<li>Node JS</li>
<li>React-Native</li>
<li>Django</li>
<li>Flask</li>
<li>Robotics and IOT</li>
</ul>
<section>
<h2 class="section-title">Usage</h2>
<h3>Converting Text and binary </h3>
<div>
<pre>
<code>
from textbin.textbin import *
textbin_obj = textbin.Textbin()

# Convert text to binary
word = "hello"
converted_word = textbin_obj.to_binary(word)
print(converted_word)

#Output: 1101000 1100101 1101100 1101100 1101111

# Convert binary to text
binary = "1101000 1100101 1101100 1101100 1101111"
converted_binary = textbin_obj.to_text(binary)
print(converted_binary) # Output: hello
</code>
</pre>
</div>
<h3>Convert JSON and Base64</h3>
<div >
<pre>
<code>
from textbin.textbin import *
textbin_obj = textbin.Textbin()

# Encode a JSON object to base64
word = {"foo": "bar"}
converted_word = textbin_obj.json_to_base64(word)
print(converted_word) # Output: eyJmb28iOiAiYmFyIn0=

# Decode a base64 string to a JSON object
base64_string = "eyJmb28iOiAiYmFyIn0="
converted_binary = textbin_obj.base64_to_json(base64_string)
print(converted_binary) # Output: {'foo': 'bar'}
</code>
</pre>
</div>
</section>

<section id="interests">
<h2 class="section-title">Interests</h2>
<ul>
<li>Learning new things</li>
<li>Watching movies</li>
<li>Reading</li>
<li>Listening to music</li>
<li>Playing video games</li>
<li>Writing Code</li>

</ul>
</section>

<section id="call-to-action">
<h2 class="section-title">Get in Touch</h2>
<div class="socials">
<div class="left">
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="15.5" viewBox="0 0 496 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
<a href="https://github.com/C-o-m-o-n">Github </a>
<a href="https://github.com/Comon-tech/Pytextbin">Github </a>
</div>

<div>
Expand Down Expand Up @@ -290,7 +140,7 @@ <h2 class="section-title">Get in Touch</h2>
<div>

<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path d="M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"/></svg>
<a href="https://my-portfolio-3f43b.web.app/">Website</a>
<a href="http://pytextbin.comon.tech/">Website</a>
</div>
</div>

Expand All @@ -300,7 +150,7 @@ <h2 class="section-title">Get in Touch</h2>
</main>

<footer>
<p>&copy; 2023 Collins | Inspired by TechLit Africa</p>
<p>&copy; 2023 ComonTech | Thanks to all our contributors</p>
</footer>
</body>
</html>
64 changes: 0 additions & 64 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
/* *{
margin: 0;
padding: 0;
font-family: sans-serif;
}
body{
color: aliceblue;
}
nav,.menu, .logo{
display: flex;
justify-content: space-between;
align-items: center;
}
.header{
background-color:#272a34;
height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}
.menu .link-item a{
margin: 0 5px;
text-decoration: none;
}
.usage{
background-color: #10151b91;
display: flex;
text-align: center;
justify-content: center;
align-items: center;
flex-direction: column;
text-wrap: wrap;
}
.inside-textbin,
.instantiate,
.text-bin,
.json-base{
margin: 10px;
background-color: #10151b91;
max-width: 400px;
border-radius: 10px;
text-align: center;
}
.installation{
margin: 8px;
}
.usage{
max-width:100%;
}
*/



body {
flex:1;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
Expand Down

0 comments on commit 4017026

Please sign in to comment.