PyWebScrapBook icon indicating copy to clipboard operation
PyWebScrapBook copied to clipboard

[Feature Request] PyWebScrapBook make standalone installer without python

Open kamizoli opened this issue 5 years ago • 10 comments

Thanky you for all your work! Would it be possible to put PyWebScrapBook into a stand alone windows installer, so one doesn't need to install python as well? For all the users, who are not so computer experienced it would be much easier to install and neater. Thank you!

kamizoli avatar May 04 '20 07:05 kamizoli

PyWebScrapBook is a command-line tool, and it's probably no difficult to install Python and run PIP for whomever can handle which, I think. Though it's also true that we're kind of lazy checking that :p We may investigate on it if we've got time and if there's a promising rationale.

danny0838 avatar May 04 '20 08:05 danny0838

On the one hand you are right, on the other having to install python and only using it for one comandline tool is overkill as well. Perhaps I also didn't express myself correctly, it is not so much a installer, but a windows comand-line tool without the need for python I would prefer. For Autoit for example it is possible to transform a script into an .exe file, which can be used standalone without Autoit installed. I don't know if the same is possible for Python.

kamizoli avatar May 05 '20 05:05 kamizoli

Multi-platform support of binary executables is at least a burden of maintenance if not impossible, since we have to prepare all environments and compilers, some of which are even proprietary, such as Windows + Mac + Linux and 32- and 64-bit platform, etc.

In contrast, distributing a Python package is much easier, and almost any platform that can run Python can simply use it.

As a result, it would be put into lower priority, as we can do that only if we really have the resource to.

danny0838 avatar May 05 '20 07:05 danny0838

First of all, thanks for your great work! 👍 Just a proposal, maybe rewrite BE in Go. BE seems to be quite simple Plus it is possible to create a simple GUI with settings using https://fyne.io/ Fyne UI is not so feature rich but quite enough for simple apps

artas90 avatar Jul 07 '20 22:07 artas90

The first problem is that I don't write Go. It's welcome for someone to write it, though.

The second problem is that PyWSB is not only a backend server. It's a toolkit, and will support more data managing tools such as indexing, importing/exporting, conversion, etc., in the future. Go is good for web server but not as good for data processing, AFAIK.

danny0838 avatar Jul 08 '20 16:07 danny0838

@kamizoli I think Winpython may meet your needs.

"WinPython is a portable distribution of the Python programming language for Windows (http://winpython.github.io)." The size of the core installation file is no more than 24MB and it is acturally a self-extract 7-zip file. Extract it into a directory. Install pywebscrapbook with pip using the "winpython command prompt.exe" which is in the extracted folder. And then run wsb with some modified version batch file based on the batch file come with Winpython.

cmd_for_webscrapbook.bat

@echo off
call "%~dp0env_for_icons.bat"
cd /d %~dp0
cd /d ../webscrapbookrepo01
start "WSB" /b wsb serve
TITLE WSB

I have packaged the one i am using, someone brave enough can give it a try in a vm. link:https://pan.baidu.com/s/18hap2g2uQz1iqU2q7l6R9Q pass:hc3t

Run scripts\cmd_for_webscrapbook.bat to start the server. WSB works in webscrapbookrepo01 folder. Above link will be valid for 6 days.

sulisu avatar Jun 17 '21 01:06 sulisu

PyWebScrapBook is a cross-platform project, while WinPython is Windows-only. We are not planned to support platform specific package/installer until we have sufficient resources.

Additionally, https://pan.baidu.com/* is not accessible for me. Maybe a China only service?

danny0838 avatar Jun 17 '21 03:06 danny0838

I have put a copy on google driver https://drive.google.com/file/d/1RU1OSzn91oAMjYATZcCOI21V1T9YzH3e/view?usp=sharing

There is nothing special except the "cmd_for_webscrapbook.bat", someone like you don't need to download it.

Just download winpython from official github repo, install pywebscrapbook from pypi in its self-contained dos commandline, make some configuration as usual, then start wsb server with this batch file. Then you can zip it and extract to another windows computer to test if it is really portable.

This is just a convenience use case for someone using Windows and not familiar with cli. Winpython here is just a warp tool, not a platform, just like a docker container, you need not to support it. Not many linux guy will have this kind of problem and it will not violate PyWebScrapBook's cross-platform property, I think.

kamizoli say what he want is "a stand alone windows installer". I think if user can get a package from official site, it will be more secure for them and save you a lot time on write instruction for those not so experienced user. And I think it will reduce question about webscrapbook too or reduce some complex at least.

sulisu avatar Jun 17 '21 05:06 sulisu

It at least requires someone to keep updating the WinPython + script package and the documentation, only for Windows users. We currently are not planned to do that.

As WebScrapBook is an open source project, you are welcome to host that by yourself, though. Like someone is hosting the Docker version.

danny0838 avatar Jun 20 '21 04:06 danny0838

Implemented experimental portable binary for 2.1.0 (with python3.12+win64)

Simply download the package, extract it, and run wsb.exe in the CLI.

webscrapbook-2.1.0-py3-win-x64-onefile.zip is the one-file version, which is more compact, but less performant.

Welcome to give it a try and provide a feedback.

danny0838 avatar Jan 19 '24 13:01 danny0838