Author Topic: A Few Utilities and Potpourri  (Read 1857 times)

Offline DrUbVettiaer

  • Newbie
  • *
  • Posts: 12
  • I am bring Outpost 1 to Python for all
    • Outpost 1(Python) Development Preview
A Few Utilities and Potpourri
« on: June 12, 2021, 02:28:17 AM »
Over time I have hit situations were I felt I needed to solve it with code, not sure that was actually the case, but the tool got wrote. I do actually use several of these. As for the potpourri, I dable in some digital art and wrote an automation to create pretty pictures, each unique, and automatically post them to twitter, to see the results of that you can check out my twitter https://twitter.com/jared216.

Point being, I want to share these tools, so I have started this thread, if anyone one wishes to share some of their tools here, please feel free to do so. And if you can think of a a better word than tools for the various short bits of software and scripts people create to allow their future self to be more lazy, please let me know.

JGPing (JSI Graphing Ping)

jgping allows you to easily graph your ping times on any platform, using Python and matplotlib
Description

This script works just like the ping command but it displays a graph instead of just text output

Requirements:
Code: [Select]
sudo apt-get install python3 matplotlib
EXAMPLE USAGE:
Code: [Select]
./jgping.py google.com   # graph the ping for a domain
./jgping.py 192.168.0.1  # graph the ping for IP address
Check it out on GitHub: https://github.com/J216/jgping





Additional Note: I actually used JGPing today, not to solve, but to slowly watch a network issue gradually go away on it's own.
I think I tested this on Windows...
« Last Edit: June 13, 2021, 12:23:43 AM by DrUbVettiaer »
Finest Regards,

Dr. Ub Vettiaer
(aka Jared)
"You exhale forbidden real!" -Mark Black
v-retributed is a serotonergic amino acid containing sulfur
"Space economics pivot on the delta-v of the asset in question." -John Hammond

Offline DrUbVettiaer

  • Newbie
  • *
  • Posts: 12
  • I am bring Outpost 1 to Python for all
    • Outpost 1(Python) Development Preview
Re: A Few Utilities and Potpourri - JGLS
« Reply #1 on: June 12, 2021, 01:14:26 PM »
jgls

Visualize the dates of your files with this amateur forensic tool.

JGLS(Jay-Glass) - Graph folders and files on a timeline using matplotlib and ls

Example:

Timeline for current directory
Code: [Select]
./jgls.py

Timeline for other directory
Code: [Select]
./jgls.py /directory/you/want/turned/into/a/timeline


Check out the project on GitHub: https://github.com/J216/jgls

« Last Edit: June 13, 2021, 04:28:43 PM by DrUbVettiaer »
Finest Regards,

Dr. Ub Vettiaer
(aka Jared)
"You exhale forbidden real!" -Mark Black
v-retributed is a serotonergic amino acid containing sulfur
"Space economics pivot on the delta-v of the asset in question." -John Hammond

Offline DrUbVettiaer

  • Newbie
  • *
  • Posts: 12
  • I am bring Outpost 1 to Python for all
    • Outpost 1(Python) Development Preview
Re: A Few Utilities and Potpourri - simple_tag_replace
« Reply #2 on: June 12, 2021, 04:40:04 PM »
simple_tag_replace
This is a Python3 script for simply replacing tags in a template with user entered input

Requirements:


Code: [Select]
sudo apt-get install python3-tk python3-pil python3-pil.imagetk

EXAMPLE USAGE:
Here is an example of a template file using tags. The tags starting with `<` and closing with `>`:

Code: [Select]
The quick red <noun1>
jumped over the <noun2>.

Run the script with Python3
Code: [Select]
python3 tagReplaceGUI.py
A window will open and from the file menue pick the template you want to use by click File --> Open and then selecting an appropriately formatted template. Everything between `<` and `>` will be give a label and a text input box. If the file contains html code this will cause it to recognize all tags, not just the ones you want to replace.

Here is an example of what will appear in the tkinter window from opening the above `template.txt`
* |noun1 | - - - |
* |noun2 | - - - |

If you fill the box like this:
* |noun1 | fox |
* |noun2 | dog |

And then click File --> Save and use the file dialog name our file `fox.txt` the output will to the file will be:

Code: [Select]
The quick red fox
jumped over the dog.

Check out the project on GitHub: https://github.com/J216/simple_tag_replace



« Last Edit: June 12, 2021, 05:51:21 PM by DrUbVettiaer »
Finest Regards,

Dr. Ub Vettiaer
(aka Jared)
"You exhale forbidden real!" -Mark Black
v-retributed is a serotonergic amino acid containing sulfur
"Space economics pivot on the delta-v of the asset in question." -John Hammond

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: A Few Utilities and Potpourri
« Reply #3 on: June 19, 2021, 07:46:23 PM »
Hmm, a "mad lib" program.

My brother just got something like a mad lib from his kid's daycare, where they asked his kid to describe him. Amusingly the section on what his hair looked like was blank. ;)  :P


The one that graphs file modification time is interesting. I can see how someone would want to know that.