diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:44:12 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:44:12 +0000 |
| commit | e4363f5c76896667edde476de31c62c89dc8a9bd (patch) | |
| tree | a9ed61aad03bb3bddb9325d1d41f5b2e36c2aacf | |
| parent | d52844d5ccbc869a39e13321accbff9d49064b1c (diff) | |
automatic import of python-novelsave
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-novelsave.spec | 671 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 673 insertions, 0 deletions
@@ -0,0 +1 @@ +/novelsave-0.8.4.tar.gz diff --git a/python-novelsave.spec b/python-novelsave.spec new file mode 100644 index 0000000..f981cca --- /dev/null +++ b/python-novelsave.spec @@ -0,0 +1,671 @@ +%global _empty_manifest_terminate_build 0 +Name: python-novelsave +Version: 0.8.4 +Release: 1 +Summary: This is a tool to download and convert novels from popular sites to e-books. +License: Apache-2.0 +URL: https://github.com/mensch272/novelsave +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ef/57/71612698c535d87ae23bfb4ffae6d53edeeead964653ce5d6763957a443e/novelsave-0.8.4.tar.gz +BuildArch: noarch + +Requires: python3-EbookLib +Requires: python3-Mako +Requires: python3-SQLAlchemy +Requires: python3-alembic +Requires: python3-appdirs +Requires: python3-beautifulsoup4 +Requires: python3-browser-cookie3 +Requires: python3-click +Requires: python3-dependency-injector +Requires: python3-loguru +Requires: python3-lxml +Requires: python3-nextcord +Requires: python3-novelsave-sources +Requires: python3-dotenv +Requires: python3-requests +Requires: python3-tabulate +Requires: python3-tqdm + +%description +# NovelSave + + + + + + +[](https://results.pre-commit.ci/latest/github/mensch272/novelsave/main) +[](LICENSE) + + +This is a tool to download and convert novels from popular sites to e-books. + +> **v0.7.+ is not compatible with previous versions** + +## Install + +### Local + +```bash +pip install novelsave +``` + +or + +```bash +pip install git+https://github.com/mensch272/novelsave.git +``` + +### Chatbots + +#### Discord + +Join our server: https://discord.gg/eFgtrKTFt3 + +##### Environmental Variables + +The default environmental variables are shown below. Modify them to your liking when deploying. + +`DISCORD_TOKEN` is required, others are optional. + +```shell +DISCORD_TOKEN= # Required: discord bot token +DISCORD_SESSION_TIMEOUT=10 # Minutes +DISCORD_SESSION_THREADS=5 +DISCORD_SEARCH_LIMIT=20 # Maximum results to show +DISCORD_SEARCH_DISABLED=no # Disable search functionality +DISCORD_EXTERNAL_FILEHOST=none # options: anonfiles, gofiles, none +``` + +#### Heroku Deployment + +Fill out the following form and set the environmental variables. + +[](https://heroku.com/deploy) + +## Usage + +### Basic + +To download and package the novel in a single line use the following command: + +```bash +novelsave process <id_or_url> +``` + +The most common commands you'll be using are: + +#### `update` + +The command requires the url of the id of the novel as an argument. When the novel has been identified it attempts to update the current novel information in the following steps: + +1. Download the novel webpage. +2. Update the novel information. This includes title, author and pending chapters. +3. Identify the chapters with no content and download and update them. +4. Download any assets that require to be downloaded (assets are identified during chapter download). + +Note that, if url is provided and the novel does not already exist in the database, a new novel entry will be created. + +For more information, run + +```bash +novelsave update --help +``` + +#### `package` + +The command requires the url of the id of the novel as an argument. When novel is identified compiles the downloaded content into the specified formats. + +Specify a compilation target using the `--target` option. If option is not provided +compiles to only epub. + +Or you may use `--target-all` to package to all supported formats. + +```bash +novelsave package <id_or_url> --target epub --target web +``` + +Supported compilation targets: + +`epub` `html` `mobi` `pdf` `azw3` `text` + +For more information, run + +```bash +novelsave package --help +``` + +#### `process` + +The command requires the url of the id of the novel as an argument. This is a combination of the above two commands, `update` and `package`. + +This is a command of convenience, to update and package in a single command. + +For more information, run + +```bash +novelsave process --help +``` + +### Configurations + +Use the following command to show all the current configurations. Default value will be shown +in case none is set. + +```bash +novelsave config show +``` + +You may change your configurations using `set` or `reset`. For example: + +```bash +novelsave config set novel.dir --value ~/mynovels +``` + +```bash +novelsave config reset novel.dir +``` + +All supported configurations are: + +- `novel.dir` - Your desired novel's packaged data (epub, mobi) save location + +### More + +To find more information, use option `--help` on groups and commands. + +```bash +novelsave --help +``` + +```bash +novelsave novel --help +``` + +## Cookies + +Want to access authentication protected content, use browser cookies. + +### Browser cookies + +This is an optional feature where you may use cookies from your browsers when sending requests. +This effectively allows the script to pretend as the browser and thus allowing access to any content +the browser would also be able to access. + +You can use this in the following simple steps: + +1. Login to your source of choice with your browser of choice (though make sure the browser is supported). +2. Use option `--browser <browser>` when updating novel (also available in process). + +```bash +novelsave [update|process] <id_or_url> --browser <browser> +``` + +**Supported** + +`chrome` `firefox` `chromium` `opera` `edge` `brave` + +## Sources + +Sources have been moved to its own [package](https://github.com/mensch272/novelsave_sources). You can install and upgrade sources using the following command. + +```bash +pip install novelsave-sources --upgrade +``` + +## Disclaimer + +We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with the any of the [sources](#sources) mentioned above. + +## License + +[Apache-2.0](https://github.com/mensch272/novelsave/blob/master/LICENSE) + + + +%package -n python3-novelsave +Summary: This is a tool to download and convert novels from popular sites to e-books. +Provides: python-novelsave +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-novelsave +# NovelSave + + + + + + +[](https://results.pre-commit.ci/latest/github/mensch272/novelsave/main) +[](LICENSE) + + +This is a tool to download and convert novels from popular sites to e-books. + +> **v0.7.+ is not compatible with previous versions** + +## Install + +### Local + +```bash +pip install novelsave +``` + +or + +```bash +pip install git+https://github.com/mensch272/novelsave.git +``` + +### Chatbots + +#### Discord + +Join our server: https://discord.gg/eFgtrKTFt3 + +##### Environmental Variables + +The default environmental variables are shown below. Modify them to your liking when deploying. + +`DISCORD_TOKEN` is required, others are optional. + +```shell +DISCORD_TOKEN= # Required: discord bot token +DISCORD_SESSION_TIMEOUT=10 # Minutes +DISCORD_SESSION_THREADS=5 +DISCORD_SEARCH_LIMIT=20 # Maximum results to show +DISCORD_SEARCH_DISABLED=no # Disable search functionality +DISCORD_EXTERNAL_FILEHOST=none # options: anonfiles, gofiles, none +``` + +#### Heroku Deployment + +Fill out the following form and set the environmental variables. + +[](https://heroku.com/deploy) + +## Usage + +### Basic + +To download and package the novel in a single line use the following command: + +```bash +novelsave process <id_or_url> +``` + +The most common commands you'll be using are: + +#### `update` + +The command requires the url of the id of the novel as an argument. When the novel has been identified it attempts to update the current novel information in the following steps: + +1. Download the novel webpage. +2. Update the novel information. This includes title, author and pending chapters. +3. Identify the chapters with no content and download and update them. +4. Download any assets that require to be downloaded (assets are identified during chapter download). + +Note that, if url is provided and the novel does not already exist in the database, a new novel entry will be created. + +For more information, run + +```bash +novelsave update --help +``` + +#### `package` + +The command requires the url of the id of the novel as an argument. When novel is identified compiles the downloaded content into the specified formats. + +Specify a compilation target using the `--target` option. If option is not provided +compiles to only epub. + +Or you may use `--target-all` to package to all supported formats. + +```bash +novelsave package <id_or_url> --target epub --target web +``` + +Supported compilation targets: + +`epub` `html` `mobi` `pdf` `azw3` `text` + +For more information, run + +```bash +novelsave package --help +``` + +#### `process` + +The command requires the url of the id of the novel as an argument. This is a combination of the above two commands, `update` and `package`. + +This is a command of convenience, to update and package in a single command. + +For more information, run + +```bash +novelsave process --help +``` + +### Configurations + +Use the following command to show all the current configurations. Default value will be shown +in case none is set. + +```bash +novelsave config show +``` + +You may change your configurations using `set` or `reset`. For example: + +```bash +novelsave config set novel.dir --value ~/mynovels +``` + +```bash +novelsave config reset novel.dir +``` + +All supported configurations are: + +- `novel.dir` - Your desired novel's packaged data (epub, mobi) save location + +### More + +To find more information, use option `--help` on groups and commands. + +```bash +novelsave --help +``` + +```bash +novelsave novel --help +``` + +## Cookies + +Want to access authentication protected content, use browser cookies. + +### Browser cookies + +This is an optional feature where you may use cookies from your browsers when sending requests. +This effectively allows the script to pretend as the browser and thus allowing access to any content +the browser would also be able to access. + +You can use this in the following simple steps: + +1. Login to your source of choice with your browser of choice (though make sure the browser is supported). +2. Use option `--browser <browser>` when updating novel (also available in process). + +```bash +novelsave [update|process] <id_or_url> --browser <browser> +``` + +**Supported** + +`chrome` `firefox` `chromium` `opera` `edge` `brave` + +## Sources + +Sources have been moved to its own [package](https://github.com/mensch272/novelsave_sources). You can install and upgrade sources using the following command. + +```bash +pip install novelsave-sources --upgrade +``` + +## Disclaimer + +We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with the any of the [sources](#sources) mentioned above. + +## License + +[Apache-2.0](https://github.com/mensch272/novelsave/blob/master/LICENSE) + + + +%package help +Summary: Development documents and examples for novelsave +Provides: python3-novelsave-doc +%description help +# NovelSave + + + + + + +[](https://results.pre-commit.ci/latest/github/mensch272/novelsave/main) +[](LICENSE) + + +This is a tool to download and convert novels from popular sites to e-books. + +> **v0.7.+ is not compatible with previous versions** + +## Install + +### Local + +```bash +pip install novelsave +``` + +or + +```bash +pip install git+https://github.com/mensch272/novelsave.git +``` + +### Chatbots + +#### Discord + +Join our server: https://discord.gg/eFgtrKTFt3 + +##### Environmental Variables + +The default environmental variables are shown below. Modify them to your liking when deploying. + +`DISCORD_TOKEN` is required, others are optional. + +```shell +DISCORD_TOKEN= # Required: discord bot token +DISCORD_SESSION_TIMEOUT=10 # Minutes +DISCORD_SESSION_THREADS=5 +DISCORD_SEARCH_LIMIT=20 # Maximum results to show +DISCORD_SEARCH_DISABLED=no # Disable search functionality +DISCORD_EXTERNAL_FILEHOST=none # options: anonfiles, gofiles, none +``` + +#### Heroku Deployment + +Fill out the following form and set the environmental variables. + +[](https://heroku.com/deploy) + +## Usage + +### Basic + +To download and package the novel in a single line use the following command: + +```bash +novelsave process <id_or_url> +``` + +The most common commands you'll be using are: + +#### `update` + +The command requires the url of the id of the novel as an argument. When the novel has been identified it attempts to update the current novel information in the following steps: + +1. Download the novel webpage. +2. Update the novel information. This includes title, author and pending chapters. +3. Identify the chapters with no content and download and update them. +4. Download any assets that require to be downloaded (assets are identified during chapter download). + +Note that, if url is provided and the novel does not already exist in the database, a new novel entry will be created. + +For more information, run + +```bash +novelsave update --help +``` + +#### `package` + +The command requires the url of the id of the novel as an argument. When novel is identified compiles the downloaded content into the specified formats. + +Specify a compilation target using the `--target` option. If option is not provided +compiles to only epub. + +Or you may use `--target-all` to package to all supported formats. + +```bash +novelsave package <id_or_url> --target epub --target web +``` + +Supported compilation targets: + +`epub` `html` `mobi` `pdf` `azw3` `text` + +For more information, run + +```bash +novelsave package --help +``` + +#### `process` + +The command requires the url of the id of the novel as an argument. This is a combination of the above two commands, `update` and `package`. + +This is a command of convenience, to update and package in a single command. + +For more information, run + +```bash +novelsave process --help +``` + +### Configurations + +Use the following command to show all the current configurations. Default value will be shown +in case none is set. + +```bash +novelsave config show +``` + +You may change your configurations using `set` or `reset`. For example: + +```bash +novelsave config set novel.dir --value ~/mynovels +``` + +```bash +novelsave config reset novel.dir +``` + +All supported configurations are: + +- `novel.dir` - Your desired novel's packaged data (epub, mobi) save location + +### More + +To find more information, use option `--help` on groups and commands. + +```bash +novelsave --help +``` + +```bash +novelsave novel --help +``` + +## Cookies + +Want to access authentication protected content, use browser cookies. + +### Browser cookies + +This is an optional feature where you may use cookies from your browsers when sending requests. +This effectively allows the script to pretend as the browser and thus allowing access to any content +the browser would also be able to access. + +You can use this in the following simple steps: + +1. Login to your source of choice with your browser of choice (though make sure the browser is supported). +2. Use option `--browser <browser>` when updating novel (also available in process). + +```bash +novelsave [update|process] <id_or_url> --browser <browser> +``` + +**Supported** + +`chrome` `firefox` `chromium` `opera` `edge` `brave` + +## Sources + +Sources have been moved to its own [package](https://github.com/mensch272/novelsave_sources). You can install and upgrade sources using the following command. + +```bash +pip install novelsave-sources --upgrade +``` + +## Disclaimer + +We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with the any of the [sources](#sources) mentioned above. + +## License + +[Apache-2.0](https://github.com/mensch272/novelsave/blob/master/LICENSE) + + + +%prep +%autosetup -n novelsave-0.8.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-novelsave -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.8.4-1 +- Package Spec generated @@ -0,0 +1 @@ +f6ee62d2cf55978c16134e6826527b00 novelsave-0.8.4.tar.gz |
