Git Product home page Git Product logo

cbz-combiner's Introduction

Combine Manga in .cbz or .pdf format

SCOPE

This program only supports the follow and has no plans on supporting anything else:

  • Input files are CBZ's that follow a strict file name format
  • The CBZ's are supported if they contain only: JPEG/JPG or PNG photos, no other types are supported
  • The output file can either be a CBZ or a PDF, no other types are supported

the current use case is to combine manga (or other cbz's) that follow this format:

'[0001]_Chapter_1_Normanni.cbz'
'[0002]_Chapter_2_Somewhere_Not_Here.cbz'
'[0003]_Chapter_3_The_End_Beyond_The_Sea.cbz'
'[0004]_Chapter_4_Unbroken_Chains.cbz'
'[0005]_Chapter_5_Troll.cbz'
'[0006]_Chapter_6_Messenger_From_The_Battlefield.cbz'

the program looks for the [0001], [0002], etc and will combine them in order like that. This means if you put two different [0001] or even [1] and [001] the second one will override the first

sudo apt update
sudo apt install libzip-dev bear libpng-dev libjpeg-dev libhpdf-dev
bear -- make

## good command to find all leaks
make valgrind VAL_ARGS="--leak-check=full --show-leak-kinds=all -s" ARGS="../../../Attack_on_Titan/* -v" > valgrind_output.txt 2>&1


## how to actually find leaks, valgrind + gdb

tmux
-> then split screen

-> on one screen
make valgrind VAL_ARGS="--vgdb=yes --vgdb-error=0" ARGS="../../../Attack_on_Titan/*"

-> on another screen
make debug

=> in gdb
=> set non-stop off
=> target remote | vgdb

(you cannot r only c, it has to restart since its running in valgrind)

=> monitor leak_check
=> monitor who_points_at

Hook up your program under GDB and Valgrind
Put a break at where you think the memory is lost
Continue there and run a leak check
If there is no leak yet, slowly proceed forward, doing a leak check after each step or at every new breakpoint
Once you see a leak, that leak occurred between the last stop and this
Restart and take even smaller steps, with leak checks in between every one of them, an pinpoint the exact statement that creates the leak.
Command Short Form Description
next n Executes the current line of code and stops at the next line. Steps over function calls.
nexti ni Similar to next, but operates at the assembly instruction level. Steps over assembly instructions.
step s Executes the current line of code and stops at the first instruction of the next line. Steps into function calls if present.
stepi si Similar to step, but operates at the assembly instruction level. Steps into the next assembly instruction.

press <C-x> o to switch to other screen in gdb after running tui enable

in the tui:

layout asm and you can do <C-x> NUMBER so <C-x> 2

also to kill the valgrind instance you could do ^Z see what [X] it is like [2] then do kill %2

cbz-combiner's People

Contributors

bsikar avatar

Watchers

 avatar

cbz-combiner's Issues

handle_dir_input_parsing issues

it's late so i pushed with issues, fix these tmr

  • malloc -> mallocv
  • calloc -> callocv
  • don't do calloc of such a large number start smaller like INT16 then double when needed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.