8000 Use of the tool with docker issue · Issue #27 · na--/ebook-tools · GitHub
[go: up one dir, main page]

Skip to content

Use of the tool with docker issue #27

Open

Description

@bourbe

Hello ,

First than you for this tool to organize books. I have a huge collection of books that I want to organize so I decide to try your tool via docker because I am on windows

  1. I pulled the image in my local docker :

Image en ligne 1

  1. Due to the fact that I am on windows with wsl , my files with are supposed to be here where my linux distribution is : \wsl$\Ubuntu-20.04\home\a\unorganized-books

Image en ligne 2

  1. I ran the docker with this instruction :

docker run -it -v //wsl$/Ubuntu-20.04/home/a:/unorganized-books ebooktools/scripts:latest

  1. Finally, I ran the final instruction :

organize-ebooks.sh --output-folder=organized-books/

as result I have this

eBook Organizer v0.5.1

Usage: organize-ebooks.sh [OPTIONS] EBOOK_FOLDERS...

For information about the possible options, see the README.md file or the script source itself

5 Summary

Image en ligne 3

What I did wrong please ? Can you help me please ?

Regards

Activity

  1. Rukongai commented on Dec 15, 2022

    @Rukongai

    you need to specify an input folder
    organize-ebooks.sh --output-folder=organized-books/ /unorganized-books for example

  2. bourbe commented on Dec 16, 2022

    @bourbe
    Author

    you need to specify an input folder organize-ebooks.sh --output-folder=organized-books/ /unorganized-books for example

    Hello,
    Thank you for your reply, I tried , i got no error but I also have no result

    See screeenshoots hereunder please :

    1.Screenshoot of terminal

    2.Input folder

    3.Output folder

  3. Rukongai commented on Dec 16, 2022

    @Rukongai

    Let's start at the top.

    This is how I did my workflow

    1.) Run the automated script against source folder - unorganized-books
    ├1a.) Send strong matches to organized-books
    └1b.) Send weak matches to organized-uncertain
    2.) Run the interactive script against organized-books to confirm matches
    3.) Run the interactive script against organized-uncertain to confirm matches

    You want to have each folder you are working with mapped in the docker, or the parent folder mapped or docker won't be able to reach them externally. So if it were me, I'd create a project folder, then have your working directories there. Kind of like this:

    .
    ├── ebooktools
       ├── organized-books
       ├── organized-uncertain
       ├── unorganized-books
       ├── invalid-matches
       └── completed
    

      
       Using a layout like this, you only have to map a single folder. My folder purposes are

    organized-books - Folder where strong matches go to be audited
    organized-uncertain - Folder where weak matches go to be autied
    unorganized-books - Source folder
    invalid-matches - Books I couldn't match with the script and will need to do manually
    completed - Books that are fully matched and ready to be moved to my ebook library

    Your docker command would look like

    docker run -it -v //wsl$/Ubuntu-20.04/home/a/ebooktools:/organize ebooktools/scripts:latest

    This would map the folder "ebooktools" on your filesystem to the folder "/organize" on the docker

    Load up the books you want to match into the /ebooktools/unorganized-books folder on your server.

    ./organize-ebooks.sh - This calls the script. The ./ at the front calls it from the directory you are in. Without the ./ - what it is looking for basically is an installed application. Since this is a script, we have to use ./
    -km - Keep metadata will generate a file for every match that includes the original information from the book. After we do the organize script, we can run through and audit matches the script wasn't 100% certain on. I really recommend this
    -o=/organize/organized-books/ - This is the output folder for good matches
    -ofu=/organize/organized-uncertain/ - This is the output folder for matches that the script was not sure about
    /organize/unorganized-books/ - This is your source folder, where you'll be scanning books to fix

    so together this command would look like
    ./organize-ebooks.sh -km --output-folder=/organize/organized-books/ -ofu=/organize/organized-uncertain/ /organize/unorganized-books/

    If you want to go back through and audit the matches you can use the interactive command. For this I made another folder called invalid-matches in the organize folder. This is if there is a bad match that I can't get the script to fix or match, I send those files to this folder for manual adjustment later. My interactive command has two phases. I started with the output folder, just as a sanity check

    ./interactive-organizer - calls interactive organizer script
    -o=/organize/completed/ - Default output folder, where books that we confirmed are sent
    -qm - Optional, but if the match was really good, this will not even ask you and send the file straight to completed
    -o=/organize/invalid-matches/ - If we can't get a good match, to the bad place we go
    /organize/organized-books/

    Together its ./interactive-organizer -o=/organize/completed/ -o=/organize/invalid-matches/ /organize/organized-books/
    This will check each book, show you the old file name, show you what it was renamed to, and ask you if you are happy with it. Push space to confirm, 1 to send to invalid matches, l to open the book to read it (if you want to confirm contents), i to pull up a text field to enter a search term to use to fix the match. You don't have to remember these, they're shown for each book. This one you'll pretty much just be hitting the spacebar a ton to confirm

    Then I run ./interactive-organizer -o=/organize/completed/ -o=/organize/invalid-matches/ /organize/organized-uncertain/
    This one will take longer, since these books are more likely to be wrong. I like to have goodreads and amazon open in a different window so I can quickly search the books and manually grab the ISBN off of a printed edition if I need to. Searching with i using the ISBN is the best way to get matches. I don't know if this folder will have as many books in it if you didn't run -owi on the first command, so it might be empty? I'd need to check

    Lastly, use ./interactive-organizer -o=/organize/completed/ -o=/organize/invalid-matches/ /organize/unorganized-books/
    Anything that was left in the source, like books that couldn't be matched, will be what we're after here.

    Now you should have all your books in either
    //wsl$/Ubuntu-20.04/home/a/ebooktools/competed or //wsl$/Ubuntu-20.04/home/a/ebooktools/invalid-matches

    Good luck!

  4. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    Hello

    Than you for your detailed answer, I tried:

    New organisation of my folders

    and the result in the terminal is he dont find the following directory: /organize/unorganized-books/

    Terminal/Console

    Than you again for your help

  5. Rukongai commented on Dec 17, 2022

    @Rukongai

    will you run ls -al ../ and post the output?
    also ls -al ../organize

    Also - I wonder if it has something to do with the mount path. Ideally you could run the second command and see your folders you made.

  6. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    will you run ls -al ../ and post the output? also ls -al ../organize

    Also - I wonder if it has something to do with the mount path. Ideally you could run the second command and see your folders you made.

    The results

    It seem that in docker and in the folder /organize/ there is no subfolders

    ├── organized-books
    ├── organized-uncertain
    ├── unorganized-books
    ├── invalid-matches
    └── completed

  7. Rukongai commented on Dec 17, 2022

    @Rukongai

    yeah there is something junky going on with the mapping of the path

    Maybe try docker run -it -v "\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

    WSL is spooky

  8. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    C:\Users\djilo>docker run -it -v "\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

    docker: Error response from daemon: \wsl$\Ubuntu-20.04\home\a\ebooktools%!(EXTRA string=is not a valid Windows path).
    See 'docker run --help'.

  9. Rukongai commented on Dec 17, 2022

    @Rukongai

    oops! docker run -it -v "\\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

    I missed a backslash. Sorry, it's late.

  10. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    I try this one docker run -it -v "\\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

    If this don't work no problem than you for your help

    Let's see this tomorow if possible

  11. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    C:\Users\djilo>docker run -it -v "\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

    docker: Error response from daemon: can't access specified distro mount service: stat /run/guest-services/distro-services/ubuntu-20.04.sock: no such file or directory.

  12. Rukongai commented on Dec 17, 2022

    @Rukongai

    Looks like that command is still missing a \ on the front

  13. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    Sorry I launched this twice, with the \ on the front and the result is the same:

    Test 1

    C:\Users\djilo>docker run -it -v "\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest
    docker: Error response from daemon: can't access specified distro mount service: stat /run/guest-services/distro-services/ubuntu-20.04.sock: no such file or directory.
    See 'docker run --help'.

    Test 2

    C:\Users\djilo>docker run -it -v "\wsl.localhost\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest
    docker: Error response from daemon: can't access specified distro mount service: stat /run/guest-services/distro-services/ubuntu-20.04.sock: no such file or directory.
    See 'docker run --help'.

  14. Rukongai commented on Dec 17, 2022

    @Rukongai

    no, you still need the double \

    use this command docker run -it -v "\\wsl$\Ubuntu-20.04\home\a\ebooktools:/organize" ebooktools/scripts:latest

  15. bourbe commented on Dec 17, 2022

    @bourbe
    Author

    The output

    no,w you see that I used the double \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0