5
KingMilo
38d

Hey everyone :-) - Hope you're all doing well & Staying safe, i just have a question for you all, i have a project i am working on which is a command line tool to track my storage on my PC & laptop, right now it outputs my remaining space, used space and storage capacity :-), it also shows these numbers on bar chart & pie chart - i'm proud of it! :D , its written in Python also - would love to know what other things would you guys add to it? any ideas? id really appreciate it :-) cheers! <3

Comments
  • 2
    If it updates in real time or near enough.

    Cpu usage (% per core)
    Ram usage / free
    Network usage up/down
  • 2
    %disc use
    Cº/Fº of disk
  • 1
    @C0D4 I like this mate! thank you :-) however I'm not exactly sure how to update in real time - cheers! :-)
  • 1
    @seluard Thank you mate :-)
  • 1
    @KingMilo that's ok, you will when it's done 😅
  • 1
    @C0D4 Wonderful! is there a way i can share this with you and you could possibly give me feed back? i'm currently just lone wolfing this project myself ahah :-) cheers
  • 2
    @KingMilo GitHub dude.. hahaha
  • 1
    @seluard Yeah :-) should i just post a link to the repo here or?
  • 2
    @KingMilo edit the rant with the link ;)
  • 1
    @seluard will do mate :-) sorry for the newbie questions
  • 1
    That's a good first project! Maybe you could let it run in the background and notify you if your space is getting too low, or something like that. Then when it's done, you can convert it to a more advanced/faster language like Go/Rust/C++/etc.
  • 2
    @seluard Unfortuneately i cannot edit the rant - however i will post the link here below.. :-)

    https://github.com/milosv1/...
  • 1
    @LoganDark Very good thought ! and thank you mate :-) I've posted a link to the repo here in the comments as i cannot actually edit my post im afraid :-) cheers!
  • 2
    @KingMilo Thanks for the link, mate!
  • 2
    @Jilano All good mate , hope its all good! cheers
  • 1
    Traceback (most recent call last):
    File "compiler.py", line 16, in
    user_acc = os.getlogin()
    OSError: [Errno 25] Inappropriate ioctl for device

    Guess I can't do that on an iPhone 😅
    I'll try again later on my laptop.
  • 1
    @C0D4 thank you for giving it ago mate :-) i tested it on my macbook and it works :'D give it a go later mate and let me know :D cheers
  • 1
    @KingMilo minor tweak and I got it working.

    iOS can't ask for the user account.
  • 1
    @C0D4 Thank you for trying it out for me mate :-) i'm doing the best i can to work on it piece by piece, so things aren't exactly wonderful but i am enjoying the process, so i thought it would be a great idea to ask through here also :D
  • 2
    You don't have to comment every line :P

    #Call get_Platform()
    get_platform()
    #call get_account function
    get_account()
    #get capacity
    get_capacity(my_path)
    #get_usedSpace
    get_usedSpace(my_path)
  • 1
    @LoganDark my bad :'D
  • 1
    @KingMilo I'm actually surprised it worked at all on my phone, So that's something.
  • 1
    @C0D4 I actually did not know it worked on phones :-), it was mainly meant to be for my macbook and PC but why not? :D cheers
  • 2
    The code should be a lot more clear, you need to pay more attention to variable naming.
    Also never ever mix snake_case with camelCase it's really_badPractice.
    And you should have as little comments as possible, the code should be self explanatory.

    `free_amount = free_b/gb` for exemple is really bad.
    By reading it, it's hard to understand that it returns the same value (the space left) but on a different scale (byte->gigabyte)

    Otherwise it's not bad, keep it up. (we all started like this 😉)
  • 0
    @MagicSowap thank you my friend 😄 I appreciate you taking the time to read through the code and I also appreciate the feedback as it's important for myself however harsh it maybe :) - I need to learn one way or another :) cheers
  • 1
    @KingMilo ok, so gave this a go on laptop.
  • 0
    @C0D4 thank you my friend 😄 once again I very much appreciate your help and the time you have taken to have a look at it for me 😊 - quick question, do the numbers look all correct? :) Cheers
  • 1
    @KingMilo not too wrong.

    They are pretty accurate when using bytes as your base value.
  • 1
    @miloking,
    damn, image didnt upload.

    when using GiB then yes, its right with rounding.
    but windows... likes to display things in GB units.
  • 0
    @C0D4 Awesome! - once again cheers mate :-), apart from whats listed above, anything else you would add to it? :D - once i get a good few things added to it - ill ask the community to let me know what they think :D thank you
  • 0
    @C0D4 Ah i see - so do you reckon i should display both Bytes and GB like this? or do you think its good as is? :)
  • 1
    @KingMilo those graphs take up a lot of realestate, I'd make them optional through args something like:

    --bar-chart
    --pie-chart
    --all-charts

    For the people that will use it, leave it as bytes.
  • 1
    @C0D4 good thought, so maybe i should have an if statement like 1 for pie, 2 for bar , 3 for all?
  • 1
    @KingMilo yea, so accepting arguments from the cli And having some ifs in place to output if the arg was entered.

    https://docs.python.org/3/library/...
  • 1
    @C0D4 Thank you mate :D i will read into this shortly and try to implement something :-) once again thanks for taking the time to give me a hand :D - i'll do another post once i feel its good enough!
  • 1
    @KingMilo not a problem, 5 minutes messing with someone else's work is 5 minutes not breaking my own things 😅
  • 0
    @C0D4 aha not a worry :D - i must say this project is something i'm really proud of :')
Add Comment