Coder Social home page Coder Social logo

manga's Introduction

Manga Downloader

A bash script to download the manga chapters of your choice and convert them to pdf format to read for later.

Usage

All are bash commands, bash <filename> to run the particular script.

  • downloader.sh
  • Downloads the manga chapters in the range given.
  • -t,--title : To specify manga title name in command line
  • -c, --chsp : To specify start and end chapter
  • fav.sh
  • Stores favourites to a file.
  • newsteller.sh
  • Displays the newly added manga chapters.
  • -f : Displays the status of the favourite manga
  • page.sh
  • Opens the main page in chrome browser.
  • -f : To open in firefox browser

Things you can work on

Feel free to contribute to the scripts.

You can check out the things you can contribute to at: https://github.com/NIT-dgp/manga/issues

manga's People

Contributors

abhay-raizada avatar ac130uspectre avatar akshatnitd avatar chetangargnitd avatar compro-prasad avatar darksoul11 avatar divyanshumehta avatar hasan356 avatar kirti0808 avatar lokeshkvn avatar pandusonu2 avatar rishi07 avatar sark01 avatar shiningsurya avatar someshkhandelia avatar zer-0-ne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

manga's Issues

Use a function for repeated piece of code

$(echo $link | grep -aob '"' | grep -oE '[0-9]+' | sed "q;d")

is used multiple times. Write a function which takes in argument of $link and and returns desired output.

Use '-q' instead of '-o log.txt'

It is no use making a log file when we aren't using it.
It is just to hide the output of wget. We can also achieve the same by using the -q argument in wget.

PDF display prototype

No step by step guide available

I was looking for Getting Started with Poppler and wasted a lot of time in not looking into the actual documentation itself. The problem is that there is hardly any step by step guide to get started with poppler.

What is poppler?

For people not aware of Poppler; Poppler is basically a very common library I have seen while installing packages in Linux. I hardly had any idea of what it was until I saw that many apps use poppler to display PDFs.

Getting started

  1. There are three sets of APIs available for poppler (as given here):
    a. CPP
    b. Glib
    c. qt5
  2. The test I have done is using poppler-cpp. So, make sure it(libraries and headers) is installed on your system.
  3. Since it is in C++, you need to have a C++ compiler installed. I would be using g++ for this example.
  4. Finding and linking specific libraries and headers manually is a hard task. I will be using pkg-config to get that information.
  5. The program:
#include <poppler/cpp/poppler-document.h>
#include <poppler/cpp/poppler-image.h>
#include <poppler/cpp/poppler-page-renderer.h>

int main(int argc, char **argv) {
  // argv[1] should have the file you want to read from
  poppler::document *d = poppler::document::load_from_file(argv[1]);

  // This creates the first page in the memory
  poppler::page *p = d->create_page(0);

  // This will create an image off the first page in memory of 200xDPI and 200yDPI
  // You can get further documentation online
  poppler::page_renderer pr;
  poppler::image img = pr.render_page(p, 200, 200);

  // This will save the image from memory to a file
  img.save(argv[2], "png");

  // This will free up the memory
  delete d;

  return 0;
}
  1. Compile it using the following command:
g++ `pkg-config --cflags --libs poppler-cpp` x.cpp
  1. When running the executable, give two arguments:
./a.out ~/Downloads/pdf/resume.pdf test2.png

While working on this I will be updating about this issue in the comments. If you want you can start a PR since it might take time for me to put up a proper version. I will try my best though.

Update variable names

The variables name right now are pretty random, this bug is to make them the variable names better :) Comment to know more about it ๐Ÿ‘

Check the status of favourites

Add option to display the status of favourite titles.

It can display in the form of
<title> <latest chapter release> <date of release>

Update Readme

Read the bash script and update the readme files.

Cannot add multiple favourites.

Cannot add multiple favorites.
Even the manga's which are not yet downloaded gets added to favorites if you fix the code.

Better newsteller parser

This requires a need of little data structures and good grasp of BASH commands.

The news teller just parses the main page and displays the title and chapter and displays each line. Things which can be done

  • Arrange all of them acc. to .fav file
  • Parse such that multiple chapters of a title appear in single line instead of multiple lines
  • Add a specifier to specify number of releases to be parsed

Fix project structure

Right now it is a single file project and without any proper design pattern.
Need to fix it.

needs support for macOS

Log message:

bash downloader.sh 
Enter Manga name:
one piece
downloader.sh: line 3: ${manga,,}: bad substitution
Enter the chapter range.
Start:
1
End:
1
Downloading page 1 of chapter 1.....
downloader.sh: line 46: $((length-1)): substring expression < 0

Check the expression cited above and fix it.

-o tag to specify open after download

In case of multiple chapter download, becomes too much of hassle if over 20 pdf's open within short intervals of time.
Therefore need to add a specifier whether to open the documents after download or not.

Needs GUI

The current downloader works totally from the command line. Would be neat to have an interface.
Need mock-ups and software which can be used.

Check before adding favourites

When you execute 'bash fav.sh', we add fav titles to a hidden .fav file. But we don't check if the title is valid.
So make changes to fav.sh to check if the title is valid or not before adding it .fav

Single line execution

The current downloader displays text before each argument is read. Although it is helpful, it can be done in single line by specific tags.

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.