Skip to content

Commit

Permalink
refactor + reverse logic (#6)
Browse files Browse the repository at this point in the history
* New features.

Added full or only vowels leet encoding.
Added merged words transformations printing.

* Modified

* Fixed? leet encoding

* iterative logic + refactoring

* fix #1

* fiexed null char non ending

* Update README.md

* different leet logic + fix upper checker

* Reverse logic

---------

Co-authored-by: leonardo7901 <leonardo.fiore@studenti.unipr.it>
simo981 and leonardo7901 authored Apr 14, 2024
1 parent 6691375 commit 1a8d101
Showing 5 changed files with 255 additions and 78 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
@@ -21,8 +21,6 @@ jobs:
- name: valgrind check
run: |
make DEBUG=1
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --upper y --start 1 --end 5 --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --upper n --start 1 --end 5 --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --upper y --start 3 --end 3 --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --upper n --start 3 --end 3 --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --reverse full --upper full --leet full --start 1 --end 5 --only_transformations n --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --reverse full --upper full --leet full --start 1 --end 5 --only_transformations y --last 2024,001,1,355 --connectors .,- hi how are you fine 1>/dev/null
valgrind --show-leak-kinds=all -s --leak-check=full --track-origins=yes ./seqperm --start 1 --end 10 a b c d e f g h i l 1>/dev/null
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

.DS_Store
.vscode/settings.json
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,9 +6,19 @@
```
--start <mininum words to concatenate>
--end <maximum words to concatenate>
```
### Modifiers
```
--last <words/chars to be putted at the end of each permutation (separeted by ,)>
--connectors <char/s to use as connector/s>
--upper <y/n> print also the permutation with first letter in uppercase
--upper <full/first> print also the permutation with all/first letter/s in uppercase
--leet <full/vowel> print also the permutation with leet in all/vowel chars positions
--reverse <full/words> print also the permutation with reversed chars/words
```
### Specializer
```
--only_transformations <y/n>
if one or more modifiers are setted, print only the transformations created with all modifiers instead of printing each one
```
```
words/chars go after parameters separeted by space
@@ -21,8 +31,4 @@ We dont't want any uppercase first character.
./seqperm --upper n --start 3 --end 5 --last 0,1 --connectors ,. a b c d e f g h i l m
```
## TO DO
Implement ```--leet``` with leet option
Implement ```--allupper``` with full permutation in upper case
Implement ```--delim wo,rd``` for considering a word a possible shortener permutation, in a single permutation will be only the full word or its delim wo. Multiple handling of , is a plus
Replace argument parsing with better handling of parameters
Config file ?
Implement ```--delim wo,rd``` for considering a word a possible shortener permutation, in a single permutation will be only the full word or its delim wo. Multiple handling of , is a plus
Loading

0 comments on commit 1a8d101

Please sign in to comment.