Uglify C code
Project description
Uglifyc
This python script uglifies a C file by moving the charachters in char_list to the right (10 spaces to the right of the longest line)
Installation
Install it via pip
pip install uglifyc
It can be run 2 ways:
uglifyc [input] -o [output]
uglifyc [input(s)]
This last one will output to [file]_uglified.c
And the input can also be overwritten (not reccommended)
uglifyc [input(s)] --overwrite
[input(s)] means many files can be changed
Examples
Input
#include <stdio.h>
struct student {
char name[50];
int roll;
float marks;
} s;
int main() {
printf("Enter information:\n");
printf("Enter name: ");
fgets(s.name, sizeof(s.name), stdin);
printf("Enter roll number: ");
scanf("%d", &s.roll);
printf("Enter marks: ");
scanf("%f", &s.marks);
printf("Displaying Information:\n");
printf("Name: ");
printf("%s", s.name);
printf("Roll number: %d\n", s.roll);
printf("Marks: %.1f\n", s.marks);
return 0;
}
Output
#include <stdio.h>
struct student {
char name[50] ;
int roll ;
float marks ;
} s ;
int main( ) {
printf("Enter information:\n" );
printf("Enter name: " );
fgets(s.name, sizeof(s.name), stdin );
printf("Enter roll number: " );
scanf("%d", &s.roll );
printf("Enter marks: " );
scanf("%f", &s.marks );
printf("Displaying Information:\n" );
printf("Name: " );
printf("%s", s.name );
printf("Roll number: %d\n", s.roll );
printf("Marks: %.1f\n", s.marks );
return 0 ;
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
uglifyc-0.1.6.tar.gz
(2.8 kB
view details)
File details
Details for the file uglifyc-0.1.6.tar.gz
.
File metadata
- Download URL: uglifyc-0.1.6.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050c4337024a3a9f8b7bc58037459367aa3878fd8a8ab8d03fa02a2aefc392df |
|
MD5 | c7a2f8aaa305ca7c1f7189df61d9f912 |
|
BLAKE2b-256 | b9d3321f711fec2bcc404ed52b15fb79f9842d13143afb1019ec5d6b9dc8bf4c |