[Tool/Web/Other] Code Indenter - Fast And Efficient and supports huge scripts.
#1

Ahmed's Code Indenter


Description:
Hello everyone, I am back with a new tool.
I actually need this for some personal stuff, However I decided to release it if someone else need it.

This is basically a code indenter but its very fast on huge scripts as it uses another thread to process the code which doesn't make the app crash, It takes like 30 seconds to process a 100K lines script.

All what you have to do is just press the "..." button and choose a file than click start.
And the app will create a new file in the same directory called "NAME_OF_FILE_fixed" so if the file was test, the fixed file will be test_fixed.

Examples of output:

This:
PHP Code:
Fucntion()
{
Function2()
{
hgfhfgh
}
Fucntion3()
{
Function4()
{
Function5() { SOME CODE HERE }
if(
dfdsf)
{
gfdgfdg
}
}
}
}
Functiondfs()
{
Function2()
{
}
Fucntion3()
{
Function4()
{
Function5() { SOME CODE HERE }
if(
dfdsf)
{
}
}
}

Became:
PHP Code:
Fucntion()
{
    
Function2()
    {
        
hgfhfgh
    
}
    
    
Fucntion3()
    {
        
Function4()
        {
            
Function5() { SOME CODE HERE }
            
            if(
dfdsf)
            {
                
gfdgfdg
            
}
        }
    }
}
Functiondfs()
{
    
Function2()
    {
        
    }
    
    
Fucntion3()
    {
        
Function4()
        {
            
Function5() { SOME CODE HERE }
            
            if(
dfdsf)
            {
                
            }
        }
    }

Download:
V1.1: http://www.mediafire.com/download/4j...denter_1.1.rar
Source: http://www.mediafire.com/download/0y...ter-source.rar
Thanks and don't forget to leave a reply or REP
Reply
#2

Nice job!
Reply
#3

What's the difference between this and this?
https://sampforum.blast.hk/showthread.php?tid=480613
Reply
#4

I don't see a need for this at all if your coding your scripts correctly indentation is a non-issue.
Reply
#5

Well... Source code?
Reply
#6

Quote:
Originally Posted by Abagail
View Post
What's the difference between this and this?
https://sampforum.blast.hk/showthread.php?tid=480613
That one is a textbox in a site, Copying/pasting 100K lines causes too much LAG.(for me)
This one you choose the PWN file itself.
However, It doesn't touch the main file incase if any bugs happen.
A new file is created with the indention.

Quote:
Originally Posted by GWMPT
View Post
Well... Source code?
Totally forgot about it... I am out of home now, Will upload it when I go home.
Reply
#7

Uhoh? Since I haven't the time to test it, If I have an shitty indentation like I use in the exemple does it will fix it correctly?

PHP Code:
// example :
public blablabla(playerid)
{
        if(
blablabla[playerid] >= 1)
    {
         
blablabla[playerid] = 0;
             return 
1;
    }
return 
1;

PHP Code:
// fixed : 
public blablabla(playerid)
{
    if(
blablabla[playerid] >= 1)
    {
         
blablabla[playerid] = 0;
         return 
1;
    }
    return 
1;

Reply
#8

Very nice job REP
Reply
#9

Quote:
Originally Posted by Adawg
View Post
Uhoh? Since I haven't the time to test it, If I have an shitty indentation like I use in the exemple does it will fix it correctly?

PHP Code:
// example :
public blablabla(playerid)
{
        if(
blablabla[playerid] >= 1)
    {
         
blablabla[playerid] = 0;
             return 
1;
    }
return 
1;

PHP Code:
// fixed : 
public blablabla(playerid)
{
    if(
blablabla[playerid] >= 1)
    {
         
blablabla[playerid] = 0;
         return 
1;
    }
    return 
1;

That's the main purpose of the program... lol

TlR: Yes, i will.
Reply
#10

Added source code.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)