Saravanan666/pypi-org huggingface dataset:
Package: epubclozer
Epub ClozerTurn an epub into Anki cloze flashcardsDescriptionThis script will take every unique word in an epub and create a anki cloze flashcard using an example found in the book.RequirementsInstallpython 3.11Install epubclozerpython-mpipinstallepubclozerHow to useCreate a cloze for each unique word in epub:python-mepubclozer--lang"en"--path"C:/path/to/book.epub"Ignorestop wordsby adding the--exclude-stop-wordsoption.Note this will only work effectively in you pass the target language--langas well.python-mepubclozer--lang"es"--path"C:/path/to/book.epub"--exclude-stop-wordsSeeepubclozer --helpfor all optionsYour Anki package will be put in the same location as the epub.
Package: epub-conversion
epub conversionCreate text corpuses using epubs and wiki dumps.
This is a python package with a Converter for epub and xml (wiki dumps) to text, lines, or Python generators.Usage:Epub usageBook by bookTo convert epubs to text files, usage is straightforward. First create a converter object:converter = Converter("my_ebooks_folder/")Then using this converter let's concatenate all the text within the ebooks into a single mega text file:converter.convert("my_succinct_text_file.gz")Line by lineYou can also proceed line by line:from epub_conversion.utils import open_book, convert_epub_to_lines

book = open_book("twilight.epub")

lines = convert_epub_to_lines(book)Wikidump usageRedirectionsSuppose you are interested in all redirections in a given Wikipedia dump file
that is still compressed, then you can access the dump as follows:wiki = epub_conversion.wiki_decoder.almost_smart_open("enwiki.bz2")Taking this dump as ourinputlet us now use a generator to output all pairs oftitleandredirection titlein this dump:redirections = {redirect_from:redirect_to
	for redirect_from, redirect_to in epub_conversion.wiki_decoder.get_redirection_list(wiki)
}Page textSuppose you are interested in the lines within each page's text section only, then:for line in epub_conversion.wiki_decoder.convert_wiki_to_lines(wiki):
	process_line( line )See Also:Wikipedia NERa Python module that usesepub_conversionto process Wikipedia dumps and output only the lines that contain page to page links, with the link anchor texts extracted, and all markup removed.
Package: epubcrush
EPUB CrushCompressesEPUBfiles to reduce size.By default, all images, fonts, scipts, and styles will be removed from the EPUB.InstallationThis package is available via PyPI and can be installed from there.pipinstallepubcrushPerformanceFileOriginaltxttxtzImages q=100Images q=50No Images1589kB27kB12kB584kB (99%)257kB (44%)27kB ( 5%)2589kB88kB30kB584kB (99%)285kB (48%)47kB ( 8%)387kB89kB34kB75kB (86%)49kB (56%)39kB (45%)Why?EPUBs may include features that may not be desirable from a privacy or efficiency standpoint. Publishers may choose to include high-res images, custom fonts, styles, scripts, and other features that bloat the size of EPUBs beyond what is needed for the text content of a book. This application strips away everything but the plain text content.Why not use plain text?EPUB adds a number of useful reading features (table of contents, metadata, etc) that are useful and not available in basic plain text. EPUBs are also compressed, so they will often be smaller than simple plain text.Method of OperationIterate files in containerRemove all files that are not part of the document text or part of the EPUB structureParse XML filesRemove the following tagslinkmetastylepictureaudiovideoscriptReplaceimgtags with their alt text in aptag
Package: epubfile
epubfileimportepubfilebook=epubfile.Epub('mybook.epub')fortext_idinbook.get_texts():soup=book.read_file(text_id,soup=True)...book.write_file(text_id,soup)forimage_idinbook.get_images():data=book.read_file(image_id)...book.write_file(image_id,data)# Note that this only reverses the spine in the opf file, it does not reverse# the table of contents, since the toc is stored as nav.xhtml and toc.ncx.book.set_spine_order(reversed(book.get_spine_order()))cover_id=book.get_cover_image()ifcover_id:book.rename_file(cover_id,'myfavoritecoverimage')book.save('modifiedbook.epub')epubfile provides simple editing of epub books. epubfile attempts to keep file modifications to a minimum. It does not add, remove, or rearrange files unless you ask it to, and does not inject additional metadata. As such, it works for both epub2 and epub3 assuming you stick to supported operations for your book version.Installpip install epubfileCommand line utilitiesThis library was born out of my own needs. So there are a couple of builtin utilities. You can runepubfile.pywith no arguments to see a summary of all builtin utilities. Here are some examples:addfile:
    Add files into the book.

covercomesfirst:
    Rename the cover image file so that it is the alphabetically-first image.

merge:
    Merge multiple books into one.

normalize:
    Rename files and directories in the book to match a common structure.Spec complianceepubfile does not rigorously enforce the epub spec and you can create noncompliant books with it. Basic errors are checked, and I am open to issues and comments regarding ways to improve spec-compliance without adding significant size or complexity to the library. I am prioritizing simplicity and ease of use over perfection.Pairs well with...For advanced inter-file operations and better validation, I suggest using this library in conjunction with a good editor likeSigil. I wrote this library because although Sigil plugins are great for processing a single book, it is difficult to use Sigil to process multiple books, read book data for use in other programs, or do other inter-book operations.What not to expectI do not intend to implement an object model for book metadata, beyond perhaps some basic getters and setters. You have full control over theEpub.opfBeautifulSoup object so you can edit the metadata however you want.Mirrorshttps://github.com/voussoir/epubfilehttps://gitlab.com/voussoir/epubfilehttps://codeberg.org/voussoir/epubfile
Package: epubgen
epub-generatorSmall library to generate epub files easilyUsage:fromepubgenimportEPUBimportxml.etree.ElementTreeasETbook=EPUB("Test EPUB","author-test","en")first_page=ET.Element("p")first_page.text="first-page"+10000*"hello "book.add_page(first_page,toc_title="First chapter")second_page=ET.Element("p")second_page.text="second-page"+10000*"good morning ! "book.add_page(second_page,toc_title="Second chapter")book.generate_epub("test.epub")
Package: epubhv
epubhvmake your epub books vertical or horizontal.Installpip install epubhv
or
git clone https://github.com/yihong0618/epubhv.git
cd epubhv && bash ./setup.shUsing pipxIf you are usingpipx, you can directly runepubhvwith:pipx run epubhv a.epubUse the webpip install epubhv[web]streamlit run web.pyUse CLIepubhv a.epub # will generate a file a-v.epub that is vertical#orepubhv b.epub --h # will generate a file b-h.epub that is horizontal#ifyoualsowanttotranslatefrom`简体->繁体`epubhv c.epub --convert s2t#ifyoualsowanttotranslatefrom`繁体->简体`epubhv d.epub --h --convert t2s#orafoldercontainsbutchofepubsepubhv tests/test_epub # will generate all epub files to epub-v#youcanspecifythepunctuationstyleepubhv e.epub --convert s2t --punctuation auto#youcanadd`ruby`forJapanese(furigana)andChinese(pinyin)epubhv e.epub --h --ruby#ifyouwanttolearn`cantonese`粤语epubhv f.epub --h --ruby --cantoneseAboutcantoneseContributionAny issues or PRs are welcome.Development#installalldependenciespdm install#formatcodepdm run format#runthefollowingscriptsandmakesureallpassbeforeyoustartaPullRequestpdm run allThanks@tommyku-->How to make EPUB ebooks with vertical layout?@jiak94support OpenCC@OverflowCatadd punctuation styles.@jt-wangType and PDM!furigana4epubToJyutpingPDMSimilar projectsEpubConv_Pythonfound a similar project, seems we are not the only one need this, great thanks, appreciation and respect.AppreciationThank you, that's enough. Just enjoy it.
Package: epub-image-optimizer
epub-image-optimizerSmall Python CLI application to optimize images (including the cover) inside epub files. Perfect fit for optimizing LNs as they usually have a lot of images.InstallationFromPyPIdirectly:pipinstallepub-image-optimizerorpython3-mpipinstallepub-image-optimizerUsageUsage: epub-image-optimizer [OPTIONS]

  EPUB Image Optimization tool

Options:
  --input-dir DIRECTORY           Input folder
  --output-dir DIRECTORY          Output folder
  --input-file FILE               Path to Epub Input file
  --max-image-resolution <INTEGER INTEGER>...
                                  Fit image resolution to this values, good
                                  for handling images with higher
                                  resolutions than your ebook-reader
  --tinify-api-key TEXT           Tinify api-key
  --only-cover                    Optimize only the cover image, ignoring all
                                  other images
  --keep-color                    If this flag is present images will preserve
                                  colors (not converted to BW)
  --log-level [INFO|DEBUG|WARN|ERROR]
                                  Set log level, default is 'INFO'
  --version                       Show current version
  --help                          Show this message and exit.ExamplesConvert all images to BWepub-image-optimizer--input-file<my-epub>Convert only cover to BWepub-image-optimizer--input-file<my-epub>--only-coverOptimize all images while keeping colorsepub-image-optimizer--input-file<my-epub>--keep-colorNote: At the moment this won't do anything as there is currently no optimization if not using Tinify.Optimize all images using Tinify while keeping colorsepub-image-optimizer--input-file<my-epub>--keep-color--tinify-api-key<tinify-api-key>Note: You can obtain your Tinify API Keyhere. Free tier is limited to 500 images/month.Optimize and fit all images to custom resolution while keeping colorsepub-image-optimizer--input-dir<folder>--max-image-resolution16801264--tinify-api-key<tinify-api-key>Note: This will optimize all epubs insideinput-dirfolder, used my Kobo Libra H2O screen size as example.DevelopmentPoetryis used for managing packages, dependencies and building the project.Poetry can be installed by following theinstructions. Afterwards you can usepoetry installwithin the project folder to install all dependencies.
Package: epub-metadata
epub-metadataGet metadata from the Epub file.Installpipinstallepub-metadataExampleimportepub_metadataepub=epub_metadata.epub('tests/Alices Adventures in Wonderland.epub')show all metadata from the Epub fileprint(epub.metadata)# return all metadata from the Epub file{'version':'2.0','title':"Alice's Adventures in Wonderland",'creator':'Lewis Carroll','date':'1865-07-04','cover':'/9j/4AAQSkZJRgABAQE...','cover_type':'image/jpeg','description':'','publisher':'D. Appleton and Co','identifier':'eb2934ae-bb1a-4652-bce7-9f78fc5ca496'}only show the epub metadataprint(epub.metadata.title)# only print the titleAlice's Adventures in Wonderland
Package: epubsum
epubsum - An EPUB book file summarizer.This is based onhttps://github.com/pszemraj/textsum, which handles
plan text and PDF files.The intent is not to generate good summaries - the model sometimes does
an okay job at that but the output is generally pretty clunky. I wrote
this primarily to generate summaries I could use for faster search.
That said, if you're willing to put up with the clunky writing and
occasional inaccuracies and nonsense, the content is generally pretty
good for getting an overview of a book.Runepubsum --helpfor help.
Package: epuikit
E-Paper-UI-KitUIKit for Raspberry on E-PaperUsage# -*- coding:utf-8 -*-
from EPUIKit import QuadrantsLayout, VirtualPaper
from EPUIKit.utils import font
from EPUIKit.widget import Label

layout = QuadrantsLayout(border=1)
layout.add(Label('LEFT_BOTTOM', font=font(32)), QuadrantsLayout.LEFT_TOP)
layout.add(Label('LEFT_BOTTOM', font=font(32)), QuadrantsLayout.LEFT_BOTTOM)
layout.add(Label('RIGHT_TOP', font=font(32)), QuadrantsLayout.RIGHT_TOP)
layout.add(Label('RIGHT_BOTTOM', font=font(32)), QuadrantsLayout.RIGHT_BOTTOM)
paper = VirtualPaper(layout, 144, 500)
paper.show()Supported deviceswaveshare 1.54inch e-Paper HAT V2waveshare 2.13inch e-Paper HAT V2LicenseMIT
Package: epure
New way to store data, smart query constructor, concise syntaxDocumentation:https://epurelib.github.io/latest/Source Code:https://github.com/nagvalhm/epureEpure is python type-hints based ORM - you can store and retrieve data having no idea about database, table and columns.
All technical details hidden from you. Care only about your business logic 🤑.Key features:Convenient: Many useful and intuitive tools, like Elist, Eset, JoinResource and many moreFast: Create tables based on your classes in no timeConcise: Encourages efficient building of flexible andsmartqueriesSimple, yet powerful: Simple for novice, powerful for expertPlease refer to our official documentation!https://epurelib.github.io/latest/
Package: epurifier
Email PurifierKWoC Communicaton:A KISS(Keep It Stupid Simple) email validator for csv filesTo install the script locally use:To install the program run$ pip install todxIf you are using Ubuntu run this instead:$ pip3 install todxIf the installation of pandas fails due to user permissions, you can either use sudo or install using the--userparameter.To validate and store the emails in a csv file run:epurifier <input file> <output file>And tackle with the invalid emails through keyboard.Note that both input and Output files should be in csv formatIf you clone the repo you can extend the code, to install the cloned repo as a package, run:pip install -e .Now, editing the files in the local folder will reflect systemwide installation of epurifier so you can use the epurifier with your modified parameters.Also, to extend the valid emails you can either pass them when you create the EmailPurifier class asimportemail_checkerasecemails_to_check=[# Your emails]additional_valid_emails=[# add only domain names such as 'google.com']emil=ec.EmailPurifier(emails_to_check,additional_valid_emails)By default it adds the passed additional emails to a list of top 10 valid emails present invalid_emails.pyIf for some reason you want to only use the additional emails and don't want emails fromvalid_emailsyou can pass the argumentonlyAdditional=Trueto override the behavior.
Package: epw
Copyright (c) 2019 Jérémie DECOCK (www.jdhp.org)Web site:http://www.jdhp.org/software_en.html#epwOnline documentation:https://jdhp.gitlab.io/epwExamples:https://jdhp.gitlab.io/epw/gallery/Notebooks:https://gitlab.com/jdhp/eplus-python-wrapper-notebooksSource code:https://gitlab.com/jdhp/eplus-python-wrapperIssue tracker:https://gitlab.com/jdhp/eplus-python-wrapper/issuesEnergyPlusWrapper on PyPI:https://pypi.org/project/epwEnergyPlusWrapper on Anaconda Cloud:https://anaconda.org/jdhp/epwDescriptionEnergyPlus wrapper for PythonNote:This project is still in beta stage, so the API is not finalized yet.DependenciesPython >= 3.0InstallationGnu/LinuxYou can install, upgrade, uninstall EnergyPlusWrapper with these commands (in a
terminal):pip install --pre epw
pip install --upgrade epw
pip uninstall epwOr, if you have downloaded the EnergyPlusWrapper source code:python3 setup.py installWindowsYou can install, upgrade, uninstall EnergyPlusWrapper with these commands (in acommand prompt):py -m pip install --pre epw
py -m pip install --upgrade epw
py -m pip uninstall epwOr, if you have downloaded the EnergyPlusWrapper source code:py setup.py installMacOSXYou can install, upgrade, uninstall EnergyPlusWrapper with these commands (in a
terminal):pip install --pre epw
pip install --upgrade epw
pip uninstall epwOr, if you have downloaded the EnergyPlusWrapper source code:python3 setup.py installDocumentationOnline documentation:https://jdhp.gitlab.io/epwAPI documentation:https://jdhp.gitlab.io/epw/api.htmlExample usageimport epw
import matplotlib.pyplot as plt

sub_dict = {("Material", "BETON 20CM", "Conductivity"): 9.99}

df = epw.core.sub_run(epw.data.idf_cube_path(),
                      weather_file_path=epw.data.weather_san_francisco_tmy_path(),
                      sub_dict=sub_dict)

df.plot()
plt.show()Bug reportsTo search for bugs or report them, please use the EnergyPlusWrapper Bug Tracker at:https://gitlab.com/jdhp/eplus-python-wrapper/issuesLicenseThis project is provided under the terms and conditions of theMIT License.
Package: epyc
Overviewepycis a Python module for controlling a long-running series of
computational experiments, as is often found when writing simulations
of complex networks and other such domains. There is often a need to
perform a computation across a multi-dimensional parameter space,
varying the parameters, performing and aggregating multiple
repetitions, and wrangling results for analysis and
presentation. Often the experiments being performed are on such a
scale as to require the use of a computing cluster to perform multiple
experiments simultaneously.Managing all these tasks is complicated, soepyctries to automate
it. It provides a way to define a “laboratory” performing a collection
of “experiments” whose parameters and results are collected togethr into “result
sets” and recorded in a “lab
notebook” for later retrieval. Laboratories can be sequential (for a
single machine) or parallel (to use a multicore or cluster of
machines); lab notebooks can be persistent to allow experiments to be
fired-off and their results retrieved later – handy if you use a
laptop. Notebooks store all the data and metadata in a portable format
to improve the reproducibility of computational experiments.epycalso includes a small number of “experiment combinators” that
separate the logic of a single experiment from the logic of performing
multiple repetitions and other structuring tasks. This means that
any experiment can be repeated and statistically summarised, for
example.Installationepycworks with Python 3.6 and above, and with PyPy3. You can install
it directly from PyPi usingpip:pip install epycThe master distribution ofepycis hosted on GitHub. To obtain a
copy, just clone the repo:git clone git@github.com:simoninireland/epyc.git
cd epyc
pip install .ExamplesSeethe examples directoryfor code examples.DocumentationAPI documentation forepyccan be found onReadTheDocs.
You can also read a Jupyter notebook describing severalepycuse
cases onlinehere.Author and licenseCopyright (c) 2016-2022, Simon Dobson <simoninireland@gmail.com>Licensed under theGNU General Public Licence v3.
Package: epycs
EpycsEpycs is a simple way to convert shell scripts to python.
It featuresA simple subprocess APIA sane behaviour of exiting by default on subprocess failuresA show-output-on-fail behaviourThe goal of this package is to be able to write shell-script equivalent code
in python while still being terse, but adding a tons of goodness in terms of
arithmetical expression, string manipulation, code reuse etc...Say no to .sh and welcome .py with epycs, you'll thank me later.Changelogv1.2.0Added epycs.config for lightweight user-defined config management
Package: epydemic
Overviewepydemicis a Python library that implements simulations of
epidemic (and other) processes on networks. Epidemic processes are
very important in both network science and its applications. The most
common application is to study the ways in which diseases progress in
different network conditions, depending on their infectiousness and
other properties, butepydemiccan be used to study any network
processes of interest.epydemicprovides simulation under synchronous and stochastic
(Gillespie) dynamics, using the well-knownnetworkxpackage to
represent and manipulate networks. It supports a generic model for
compartmented models of disease with several standard models provided
and which can be extended to other, more complex, diseases. It also
supports other network processes such as addition-deletion networks
and pulse-coupled synchronisation, generators for several different
ensembles of random networks, and a library for handling generating
functions used in network analysis.epydemicis built on top of theepycexperiment management
library, allowing simulations to be conducted at scale on individual
machines, multicore machines, and parallel computing clusters.InstallationYou can installepydemicdirectly from PyPi usingpip:pip install epydemicThe master distribution ofepydemicis hosted on GitHub. To obtain a
copy, just clone the repo:git clone git@github.com:simoninireland/epydemic.git
cd epydemic
pip install .DocumentationAPI documentation forepydemicis available onReadTheDocs(please note the slightly different project name).Author and licenseCopyright (c) 2017-2022, Simon Dobson <simoninireland@gmail.com>Licensed under theGNU General Public Licence v3.
Package: epydemicarchive
Overviewepydemicarchiveimplements a web application to create and
maintain a collection of complex networks that can be used in epidemic
(and other) network-based simulations. It is intended to allow re-use
of networks that may be computationally expensive to create, and so
support easier and more robust simulations.epydemicarchiveis written entirely in Python and can be hosted by
any WSGI-compliant web server.Author and licenseCopyright (c) 2021, Simon Dobson <simoninireland@gmail.com>Licensed under theGNU General Public License v3 or later.
Package: epydemicarchive-client
Overviewepydemicarchive-clientis the client-side of the API for accessingepydemicarchivearchives of networks. It is intended to make the
programmatic use of the archive simpler. Even simpler is to use the
archive-friendly network generators ofepydemic.Author and licenseCopyright (c) 2021, Simon Dobson <simoninireland@gmail.com>Licensed under theGNU General Public License v3 or later.
Package: epydemic-signals
Overviewepydemic-signalsis an experiment in treating epidemic processes
on networks as “signals” that can be analysed using the tools of
signal processing, discrete algebra, and algebraic topology. It is
closely integrated with theepydemicepidemic process simulator.A graph signal associates a value with each node in a network at each
point in time during the execution of a process. The signal can change
at each event in the process’ evolution.epydemicalready provides some monitoring of processes, and
further monitoring can be added either by sub-classing the different
processes or by adding additional process
instances.epydemic-signalsprovides a third approach: tapping the
raw event streams of simulations into one or more signal generators
that can be used to construct time-varying signals derived from the
process. The result is one or more time series, which are saved toepycnotebooks alongside other experimental results.InstallationYou can installepydemic-signalsdirectly from PyPi usingpip:pip install epydemic-signalsThe master distribution ofepydemic-signalsis hosted on GitHub. To obtain a
copy, just clone the repo:git clone git@github.com:simoninireland/epydemic-signals.git
cd epydemic
pip install .Author and licenseCopyright (c) 2021–2022, Simon Dobson <simoninireland@gmail.com>Licensed under theGNU General Public Licence v3.
Package: epydoc
Epydoc is a tool for generating API documentation documentation for
Python modules, based on their docstrings.  For an example of epydoc’s
output, see the API documentation for epydoc itself (html,pdf).  A lightweight markup
language calledepytextcan be used to format docstrings, and to add information about
specific fields, such as parameters and instance variables.  Epydoc
also understands docstrings written inreStructuredText, Javadoc, and
plaintext. For a more extensive example of epydoc’s output, see the
API documentation forPython 2.5.