You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library extends the native [`codecs`](https://docs.python.org/3/library/codecs.html) library (namely for adding new custom encodings and character mappings) and provides a myriad of new encodings (static or parametrized, like `rot` or `xor`), hence its named combining *CODecs EXTension*.
13
14
14
-
15
-
16
-
## Setup
17
-
18
15
```sh
19
16
$ pip install codext
20
17
```
21
18
22
-
**Note**: Some encodings are available in Python 3 only.
23
-
24
-
## Demonstrations
19
+
## :mag: Demonstrations
25
20
26
21
<palign="center"><imgsrc="https://raw.githubusercontent.com/dhondta/python-codext/master/docs/demos/using-codext.gif"alt="Using CodExt from the command line"></p>
27
22
<palign="center"><imgsrc="https://raw.githubusercontent.com/dhondta/python-codext/master/docs/demos/using-bases.gif"alt="Using base tools from the command line"></p>
28
23
<palign="center"><imgsrc="https://raw.githubusercontent.com/dhondta/python-codext/master/docs/demos/using-debase.gif"alt="Using the debase command line tool"></p>
29
24
30
-
## Usage (CLI tool)
25
+
## :computer:Usage (main CLI tool) <ahref="https://twitter.com/intent/tweet?text=CodExt%20-%20Encode%2Fdecode%20anything.%0D%0APython%20tool%20for%20encoding%20and%20decoding%20almost%20anything,%20including%20a%20guess%20feature%20based%20on%20AI.%0D%0Ahttps%3a%2f%2fgithub%2ecom%2fdhondta%2fpython-codext%0D%0A&hashtags=python,encodings,codecs,cryptography,morse,base,stegano,steganography,ctftools"><imgsrc="https://img.shields.io/badge/Tweet%20(codext)--lightgrey?logo=twitter&style=social"alt="Tweet on codext"height="20"/></a>
31
26
32
-
```sh
27
+
```session
33
28
$ codext -i test.txt encode dna-1
34
29
GTGAGCGGGTATGTGA
30
+
35
31
$ echo -en "test" | codext encode morse
36
32
- . ... -
37
-
```
38
-
39
-
Python 3 (includes Ascii85, Base85, Base100 and braille):
>>>withopen("morse.txt", 'w', encoding="morse") as f:
112
132
f.write("this is a test")
113
133
14
134
+
114
135
>>>withopen("morse.txt",encoding="morse") as f:
115
136
f.read()
116
137
'this is a test'
117
-
```
118
138
119
-
```python
120
139
>>> codext.decode("""
121
140
=
122
141
X
@@ -140,9 +159,7 @@ o
140
159
o
141
160
z """, "whitespace-after+before")
142
161
'CSC{not_so_invisible}'
143
-
```
144
162
145
-
```python
146
163
>>>print(codext.encode("An example test string", "baudot-tape"))
147
164
***.**
148
165
. *
@@ -169,7 +186,7 @@ o
169
186
* .*
170
187
```
171
188
172
-
## List of codecs
189
+
## :page_with_curl:List of codecs
173
190
174
191
**Codec** | **Conversions** | **Comment**
175
192
:---: | :---: | ---
@@ -231,3 +248,11 @@ A few variants are also implemented.
231
248
`southpark-icase` | text <-> Kenny's language | same as `southpark` but case insensitive
232
249
`whitespace_after_before` | text <-> lines of whitespaces[letter]whitespaces | encodes characters as new characters with whitespaces before and after according to an equation described in the codec name (e.g. "`whitespace+2*after-3*before`")
233
250
251
+
252
+
## :clap: Supporters
253
+
254
+
[](https://github.com/dhondta/python-codext/stargazers)
255
+
256
+
[](https://github.com/dhondta/python-codext/network/members)
257
+
258
+
<palign="center"><ahref="#"><imgsrc="https://img.shields.io/badge/Back%20to%20top--lightgrey?style=social"alt="Back to top"height="20"/></a></p>
0 commit comments