From 40170263211ce8531dd7996e48c1b84b3cc95aa6 Mon Sep 17 00:00:00 2001 From: C-o-m-o-n Date: Sat, 30 Dec 2023 09:02:19 +0300 Subject: [PATCH] update website --- docs/index.html | 256 ++++++++++-------------------------------------- docs/style.css | 64 ------------ 2 files changed, 53 insertions(+), 267 deletions(-) diff --git a/docs/index.html b/docs/index.html index 8ffd230..9af9501 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,174 +1,3 @@ - @@ -197,7 +26,13 @@

About PyTextBin

-

Usage

+

Installation

+

+ You can install textbin through your terminal using pip from PyPI

+
+              pip install textbin
+            
+

Inside the textbin.py, there is a 'Textbin()' class which has the methods:

-
-

Skills

-
    -
  • Full Stack Developement
  • -
  • Open-Source contributor
  • -
  • React JS
  • -
  • Nextjs
  • -
  • Node JS
  • -
  • React-Native
  • -
  • Django
  • -
  • Flask
  • -
  • Robotics and IOT
  • -
+
+

Usage

+

Converting Text and binary

+
+
+        
+        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
+        
+    
+
+

Convert JSON and Base64

+
+
+        
+        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'}
+        
+    
+
- -
-

Interests

-
    -
  • Learning new things
  • -
  • Watching movies
  • -
  • Reading
  • -
  • Listening to music
  • -
  • Playing video games
  • -
  • Writing Code
  • - -
-
-

Get in Touch

@@ -290,7 +140,7 @@

Get in Touch

@@ -300,7 +150,7 @@

Get in Touch

diff --git a/docs/style.css b/docs/style.css index 8553180..d71dd45 100644 --- a/docs/style.css +++ b/docs/style.css @@ -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;