Hako
Stupidly simple self-hosted web page archiving tool written in PHP.
Features
Archive web pages instantly using a bookmarklet Readability functionality Basic password protectionDependencies
Monolith (x86_64 binary is included) PHP php-xml php-mbstring Git (optional)Hako is designed to work out of the box on Linux. With a bit of tweaking, it's possible to make it run on Windows and macOS.
Installation and usage
Install PHP as well as the php-xml and php-mbstring packages on your system. Clone then the project's Git repository using the git clone https://github.com/dmpop/hako.git
command. Switch to the resulting hako directory, open the config.php file for editing, and replace the default value of the $password
variable with the desired password. Save the changes and start the PHP server using the php -S 0.0.0.0:3000
command.
Instead of using the Add button and specifying the URL and title of the web page you want to archive, you can add the following bookmarklet to the bookmark toolbar of your browser (replace 127.0.0.1 with the actual IP address of the machine running Hako and password with the string that matches the value of the $password
variable):
javascript:var%20title=window.getSelection();location.href='http://127.0.0.1:8000/index.php?url='+encodeURIComponent(location.href)+'&title='+'&password=secret
Navigate to the page you want to archive, select the title, and click on the Hako bookmarklet. If the page has been archived successfully, you should see it in the list of saved pages.
If everything works properly, you might want to create a system service to start Hako automatically. Run the sudo nano /etc/systemd/system/hako.service
command and add the following definition (replace /path/to/hako with the actual path to the hako directory):
[Unit]
Description=Hako
Wants=syslog.service
[Service]
Restart=always
ExecStart=/usr/bin/php -S 0.0.0.0:3000 -t /path/to/hako
ExecStop=/usr/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl enable hako.service sudo systemctl start hako.service
Problems?
Please report bugs and issues in the Issues section.
Contribute
If you've found a bug or have a suggestion for improvement, open an issue in the Issues section.
To add a new feature or fix issues yourself, follow the following steps.
Fork the project's repository. Create a feature branch using thegit checkout -b new-feature
command.
Add your new feature or fix bugs and run the git commit -am 'Add a new feature'
command to commit changes.
Push changes using the git push origin new-feature
command.
Submit a merge request.
Author
Dmitri Popov
License
The GNU General Public License version 3
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。
3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考学习用!
4、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。