{ "info": { "author": "Paulius Maru\u0161ka", "author_email": "paulius.maruska@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "PyHex\n=====\n\nhttps://github.com/Paulius-Maruska/pyhex\n\nPython package for easy printing of strings as hexview strings.\n\nPyHexView\n=========\n\nCommand-Line utility script, that prints contents of a file or whatever is read from the standard input formated as\nhexview.\n\nCode Examples for Format Functions\n==================================\n\nFormatting a string:\n\n from pyhex import pyhex_format\n\n string = \"Lobster ALL the Fetish!?\"\n hex = \"\\n\".join(pyhex_format(string, 0))\n print hex\n\nOutput:\n\n 0000000000: 4c 6f 62 73 74 65 72 20 | 41 4c 4c 20 74 68 65 20 Lobster ALL the\n 0000000010: 46 65 74 69 73 68 21 3f Fetish!?\n\nFormatting an entire file:\n\n from pyhex import pyhex_format_stream\n\n with open(\"example.txt\", \"rb\") as stream:\n hex = \"\\n\".join(pyhex_format_stream(stream)))\n print hex\n\nIf the contents of \"example.txt\" are:\n\n Lobster ALL the Fetish!?\n\n Ah yes! We like to lobster our fetish!\n\nOutput:\n\n 0000000000: 4c 6f 62 73 74 65 72 20 | 41 4c 4c 20 74 68 65 20 Lobster ALL the\n 0000000010: 46 65 74 69 73 68 21 3f | 0a 0a 41 68 20 79 65 73 Fetish!?..Ah yes\n 0000000020: 21 20 57 65 20 6c 69 6b | 65 20 74 6f 20 6c 6f 62 ! We like to lob\n 0000000030: 73 74 65 72 20 6f 75 72 | 20 66 65 74 69 73 68 21 ster our fetish!\n 0000000040: 0a .\n\nCode Examples for Write Functions\n==================================\n\nPrinting a converted string:\n\n from sys import stdout\n from pyhex import pyhex_write\n\n string = \"Lobster ALL the Fetish!?\"\n pyhex_write(string, 0, stdout))\n\nOutput:\n\n 0000000000: 4c 6f 62 73 74 65 72 20 | 41 4c 4c 20 74 68 65 20 Lobster ALL the\n 0000000010: 46 65 74 69 73 68 21 3f Fetish!?\n\nPrinting an entire file:\n\n from sys import stdout\n from pyhex import pyhex_format_stream\n\n with open(\"example.txt\", \"rb\") as input_stream:\n pyhex_write_stream(stream, stdout))\n\nIf the contents of \"example.txt\" are:\n\n Lobster ALL the Fetish!?\n\n Ah yes! We like to lobster our fetish!\n\nOutput:\n\n 0000000000: 4c 6f 62 73 74 65 72 20 | 41 4c 4c 20 74 68 65 20 Lobster ALL the\n 0000000010: 46 65 74 69 73 68 21 3f | 0a 0a 41 68 20 79 65 73 Fetish!?..Ah yes\n 0000000020: 21 20 57 65 20 6c 69 6b | 65 20 74 6f 20 6c 6f 62 ! We like to lob\n 0000000030: 73 74 65 72 20 6f 75 72 | 20 66 65 74 69 73 68 21 ster our fetish!\n 0000000040: 0a .\n\nExamples of pyhexview.py Usage\n==============================\n\nView .gitattributes code formatted as hexview:\n\n $> python pyhexview.py -i .gitattributes\n 0000000000: 23 20 41 75 74 6f 20 64 | 65 74 65 63 74 20 74 65 # Auto detect te\n 0000000010: 78 74 20 66 69 6c 65 73 | 20 61 6e 64 20 70 65 72 xt files and per\n 0000000020: 66 6f 72 6d 20 4c 46 20 | 6e 6f 72 6d 61 6c 69 7a form LF normaliz\n 0000000030: 61 74 69 6f 6e 0d 0a 2a | 20 74 65 78 74 3d 61 75 ation..* text=au\n 0000000040: 74 6f 0d 0a 0d 0a 23 20 | 53 74 61 6e 64 61 72 64 to....# Standard\n 0000000050: 20 74 6f 20 6d 73 79 73 | 67 69 74 0d 0a 2a 2e 64 to msysgit..*.d\n 0000000060: 6f 63 09 20 64 69 66 66 | 3d 61 73 74 65 78 74 70 oc. diff=astextp\n 0000000070: 6c 61 69 6e 0d 0a 2a 2e | 44 4f 43 09 20 64 69 66 lain..*.DOC. dif\n 0000000080: 66 3d 61 73 74 65 78 74 | 70 6c 61 69 6e 0d 0a 2a f=astextplain..*\n 0000000090: 2e 64 6f 63 78 20 64 69 | 66 66 3d 61 73 74 65 78 .docx diff=astex\n 00000000a0: 74 70 6c 61 69 6e 0d 0a | 2a 2e 44 4f 43 58 20 64 tplain..*.DOCX d\n 00000000b0: 69 66 66 3d 61 73 74 65 | 78 74 70 6c 61 69 6e 0d iff=astextplain.\n 00000000c0: 0a 2a 2e 64 6f 74 20 20 | 64 69 66 66 3d 61 73 74 .*.dot diff=ast\n 00000000d0: 65 78 74 70 6c 61 69 6e | 0d 0a 2a 2e 44 4f 54 20 extplain..*.DOT\n 00000000e0: 20 64 69 66 66 3d 61 73 | 74 65 78 74 70 6c 61 69 diff=astextplai\n 00000000f0: 6e 0d 0a 2a 2e 70 64 66 | 20 20 64 69 66 66 3d 61 n..*.pdf diff=a\n 0000000100: 73 74 65 78 74 70 6c 61 | 69 6e 0d 0a 2a 2e 50 44 stextplain..*.PD\n 0000000110: 46 09 20 64 69 66 66 3d | 61 73 74 65 78 74 70 6c F. diff=astextpl\n 0000000120: 61 69 6e 0d 0a 2a 2e 72 | 74 66 09 20 64 69 66 66 ain..*.rtf. diff\n 0000000130: 3d 61 73 74 65 78 74 70 | 6c 61 69 6e 0d 0a 2a 2e =astextplain..*.\n 0000000140: 52 54 46 09 20 64 69 66 | 66 3d 61 73 74 65 78 74 RTF. diff=astext\n 0000000150: 70 6c 61 69 6e 0d 0a plain..\n\nSame as before, but read it from standard input:\n\n $> python pyhexview.py < .gitattributes\n 0000000000: 23 20 41 75 74 6f 20 64 | 65 74 65 63 74 20 74 65 # Auto detect te\n 0000000010: 78 74 20 66 69 6c 65 73 | 20 61 6e 64 20 70 65 72 xt files and per\n 0000000020: 66 6f 72 6d 20 4c 46 20 | 6e 6f 72 6d 61 6c 69 7a form LF normaliz\n 0000000030: 61 74 69 6f 6e 0d 0a 2a | 20 74 65 78 74 3d 61 75 ation..* text=au\n 0000000040: 74 6f 0d 0a 0d 0a 23 20 | 53 74 61 6e 64 61 72 64 to....# Standard\n 0000000050: 20 74 6f 20 6d 73 79 73 | 67 69 74 0d 0a 2a 2e 64 to msysgit..*.d\n 0000000060: 6f 63 09 20 64 69 66 66 | 3d 61 73 74 65 78 74 70 oc. diff=astextp\n 0000000070: 6c 61 69 6e 0d 0a 2a 2e | 44 4f 43 09 20 64 69 66 lain..*.DOC. dif\n 0000000080: 66 3d 61 73 74 65 78 74 | 70 6c 61 69 6e 0d 0a 2a f=astextplain..*\n 0000000090: 2e 64 6f 63 78 20 64 69 | 66 66 3d 61 73 74 65 78 .docx diff=astex\n 00000000a0: 74 70 6c 61 69 6e 0d 0a | 2a 2e 44 4f 43 58 20 64 tplain..*.DOCX d\n 00000000b0: 69 66 66 3d 61 73 74 65 | 78 74 70 6c 61 69 6e 0d iff=astextplain.\n 00000000c0: 0a 2a 2e 64 6f 74 20 20 | 64 69 66 66 3d 61 73 74 .*.dot diff=ast\n 00000000d0: 65 78 74 70 6c 61 69 6e | 0d 0a 2a 2e 44 4f 54 20 extplain..*.DOT\n 00000000e0: 20 64 69 66 66 3d 61 73 | 74 65 78 74 70 6c 61 69 diff=astextplai\n 00000000f0: 6e 0d 0a 2a 2e 70 64 66 | 20 20 64 69 66 66 3d 61 n..*.pdf diff=a\n 0000000100: 73 74 65 78 74 70 6c 61 | 69 6e 0d 0a 2a 2e 50 44 stextplain..*.PD\n 0000000110: 46 09 20 64 69 66 66 3d | 61 73 74 65 78 74 70 6c F. diff=astextpl\n 0000000120: 61 69 6e 0d 0a 2a 2e 72 | 74 66 09 20 64 69 66 66 ain..*.rtf. diff\n 0000000130: 3d 61 73 74 65 78 74 70 | 6c 61 69 6e 0d 0a 2a 2e =astextplain..*.\n 0000000140: 52 54 46 09 20 64 69 66 | 66 3d 61 73 74 65 78 74 RTF. diff=astext\n 0000000150: 70 6c 61 69 6e 0d 0a plain..", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Paulius-Maruska/pyhex/archive/pyhex-v0.3.0.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Paulius-Maruska/pyhex", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyhex", "package_url": "https://pypi.org/project/pyhex/", "platform": "Any", "project_url": "https://pypi.org/project/pyhex/", "project_urls": { "Download": "https://github.com/Paulius-Maruska/pyhex/archive/pyhex-v0.3.0.zip", "Homepage": "https://github.com/Paulius-Maruska/pyhex" }, "release_url": "https://pypi.org/project/pyhex/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Python Hexadecimal Converter and Viewer", "version": "0.3.0" }, "last_serial": 803226, "releases": { "0.2.0": [], "0.3.0": [] }, "urls": [] }