kensanata / mastodon-archive

Archive your statuses, favorites and media using the Mastodon API (i.e. login required)
https://alexschroeder.ch/software/Mastodon_Archive
GNU General Public License v3.0
358 stars 33 forks source link

Could you release a windows executable that includes Python? #42

Open stroop566 opened 5 years ago

stroop566 commented 5 years ago

use PyInstaller or py2exe, just like youtube-dl. so I can use it in cmd:

$ mastodon-archive.exe text kensanata@dice.camp > statuses.txt
$ mastodon-archive html kensanata@dice.camp

References:

  1. https://medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263
  2. https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency thank you!
kensanata commented 5 years ago

Do think you could write the necessary code? I only have access to a windows machine at the office.

stroop566 commented 5 years ago

sorry,my coding ability is poor. but you can try vmware or virtualbox.

What you can do is run Virtualbox or similar application to run the OS virtually and, create executable in that virtual os and export it later. Also, Wine works as well! (Though, I didn’t try it myself)

thank you much more.

BartG95 commented 5 years ago

I can probably help out. I currently have a windows machine. It will only allow me start this project, because I plan switch to a non-windows system soon-ish. So after that, someone has to maintain it. Maintenance shouldn't be very difficult for a non-coder. I can probably set up a manual.

kensanata commented 5 years ago

Perfect, thanks!

stroop566 commented 5 years ago

thanks all :)

BartG95 commented 5 years ago

After two hours of trying, this is my conclusion:

I will probably try again in about a few days, but as for now, I wasted to many hours on this. Sorry ;) Have a nice weekend.

kensanata commented 5 years ago

Thank you anyway!

BartG95 commented 5 years ago

@stroop566 If you want to try it yourself, here is a short guide:

I haven't tested the last two points of this procedure myself; feel free to let me know if it does (not) work.

stroop566 commented 5 years ago

@BartG95 thank you! but get some errors.

D:\mastodon-backup\master\mastodon-backup-master>python --version
Python 3.7.2

D:\mastodon-backup\master\mastodon-backup-master>python setup.py py2exe
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    long_description=long_description,
NameError: name 'long_description' is not defined

use PyInstaller

D:\mastodon-backup\master\mastodon-backup-master>pyinstaller --version
3.4

Successfully get setup.exe ,but

D:\mastodon-backup\master\mastodon-backup-master\output\setup>setup.exe archive kensanata@dice.camp
Traceback (most recent call last):
  File "setup.py", line 3, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
[8688] Failed to execute script setup

paste 'README.md' in the folder,and run:

D:\mastodon-backup\master\mastodon-backup-master\output\setup>setup archive kensanata@dice.camp
D:\mastodon-backup\master\mastodon-backup-master\output\setup\distutils\dist.py:274: UserWarning: Unknown distribution option: 'entry_points'
D:\mastodon-backup\master\mastodon-backup-master\output\setup\distutils\dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
usage: setup [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup --help [cmd1 cmd2 ...]
   or: setup --help-commands
   or: setup cmd --help

error: invalid command 'archive'

then I use auto-py-to-exe, and also successfully get setup.exe,but get the same errors as pyinstaller.