Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

bulk upload files tohttps://library.bz/main/upload/

License

NotificationsYou must be signed in to change notification settings

Geremia/LibgenBulkUpload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bulk upload files tohttps://library.bz/main/upload/

Usage

./upload.bash file_to_upload title language_code main_or_fiction

Specifying additional metadata

Example

isbn=9783868386066 authors='Feser, Edward' ./upload.bash Immortal_Souls.pdf'Immortal Souls: A Treatise on Human Nature' eng main

Batch with GNUparallel

ThisGNUparallel command uploads (one-at-a-time) all the PDFs in the current directory, assigns their Libgen metadata author to the PDF filename (sans suffix), and sets the language to English:

parallel -j1 ./upload.bash {} {.} eng main :::*.pdf

Metadata

The following metadata can be optionally passed as an environment variable to the script:

  • asin,authors,bookmarks,city,cleaned,colored,cover,ddc,description,doi,dpi,dpi_select,edition,file_commentary,file_source,file_source_issue,gb_id,isbn,issn,language,language_options,lbc,lcc,metadata_query,metadata_source,ol_id,page_orientation,pages,paginated,periodical,publisher,scan,series,searchable,tags,title,toc,topic,udc,volume,year

Calibre

If youexport a CSV catalog from Calibre, you can use it withcalibre.py to feed in the metadata for bulk book uploads, automatically.

Your Calibre catalog CSV file can have the following headings (in any order), including the custom ones (which begin with '#'):

  • #amazon,#doi,#google,#issn,#lcn,#pubyear,authors,comments,isbn,languages,publisher,series,series_index,tags,title

The specified "files to upload" directory is expected to contain symlinks to the files in your Calibre library.

To setup the symlinks, execute a command like this in your upload directory:

foriin`cat ../formats.txt`;do    find~/Calibre\Library/ -type f -iname"*.$i" -print0| \        xargs -0 -I{} sh -c'filename=`basename "{}"`;            random_part=$(mktemp -u XXXXXX);            suffix=".${filename##*.}";            newname="${filename%.*}-${random_part}${suffix}";            ln -sv "{}" "$newname";'done

calibre.py is a similar script to the oldupload.py Selenium script.


[8]ページ先頭

©2009-2025 Movatter.jp