mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 22:54:27 -04:00
rearrange files again
This commit is contained in:
parent
c29139f7ed
commit
d6354ac93f
6 changed files with 93 additions and 95 deletions
6
archive
6
archive
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Bookmark Archiver Shortcut
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
python3 "$REPO_DIR/archiver/archive.py" "$@"
|
|
1
archive
Symbolic link
1
archive
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
bin/bookmark-archiver
|
|
@ -27,6 +27,7 @@ from util import (
|
||||||
download_url,
|
download_url,
|
||||||
progress,
|
progress,
|
||||||
cleanup_archive,
|
cleanup_archive,
|
||||||
|
pretty_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
__DESCRIPTION__ = 'Bookmark Archiver: Create a browsable html archive of a list of links.'
|
__DESCRIPTION__ = 'Bookmark Archiver: Create a browsable html archive of a list of links.'
|
||||||
|
|
|
@ -64,7 +64,7 @@ def archive_links(archive_path, links, source=None, resume=None):
|
||||||
))
|
))
|
||||||
print(' Continue where you left off by running:')
|
print(' Continue where you left off by running:')
|
||||||
print(' {} {}'.format(
|
print(' {} {}'.format(
|
||||||
sys.argv[0],
|
pretty_path(sys.argv[0]),
|
||||||
link['timestamp'],
|
link['timestamp'],
|
||||||
))
|
))
|
||||||
if not isinstance(e, KeyboardInterrupt):
|
if not isinstance(e, KeyboardInterrupt):
|
||||||
|
|
1
bin/bookmark-archiver
Symbolic link
1
bin/bookmark-archiver
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../archiver/archive.py
|
88
bin/setup-bookmark-archiver
Executable file
88
bin/setup-bookmark-archiver
Executable file
|
@ -0,0 +1,88 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Bookmark Archiver Setup Script
|
||||||
|
# Nick Sweeting 2017 | MIT License
|
||||||
|
# https://github.com/pirate/bookmark-archiver
|
||||||
|
|
||||||
|
echo "[i] Installing bookmark-archiver dependencies. 📦"
|
||||||
|
echo ""
|
||||||
|
echo " You may be prompted for a password in order to install the following dependencies:"
|
||||||
|
echo " - Chromium Browser (see README for Google-Chrome instructions instead)"
|
||||||
|
echo " - python3"
|
||||||
|
echo " - wget"
|
||||||
|
echo " - curl"
|
||||||
|
echo ""
|
||||||
|
echo " You may follow Manual Setup instructions in README.md instead if you prefer not to run an unknown script."
|
||||||
|
echo " Press enter to continue, or Ctrl+C to cancel..."
|
||||||
|
read
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# On Linux:
|
||||||
|
if which apt-get > /dev/null; then
|
||||||
|
echo "[+] Updating apt repos..."
|
||||||
|
apt update -q
|
||||||
|
if which google-chrome; then
|
||||||
|
echo "[i] You already have google-chrome installed, if you would like to download chromium-browser instead (they work pretty much the same), follow the Manual Setup instructions"
|
||||||
|
echo "[+] Linking $(which google-chrome) -> /usr/bin/chromium-browser (press enter to continue, or Ctrl+C to cancel...)"
|
||||||
|
read
|
||||||
|
sudo ln -s "$(which google-chrome)" /usr/bin/chromium-browser
|
||||||
|
elif which chromium-browser; then
|
||||||
|
echo "[i] chromium-browser already installed, using existing installation."
|
||||||
|
apt upgrade chromium-browser -y
|
||||||
|
else
|
||||||
|
echo "[+] Installing chromium-browser..."
|
||||||
|
apt install chromium-browser -y
|
||||||
|
fi
|
||||||
|
echo "[+] Installing python3, wget, curl..."
|
||||||
|
apt install python3 wget curl
|
||||||
|
|
||||||
|
# On Mac:
|
||||||
|
elif which brew > /dev/null; then # 🐍 eye of newt
|
||||||
|
if ls /Applications/Google\ Chrome.app > /dev/null; then
|
||||||
|
echo "[+] Linking /usr/local/bin/google-chrome -> /Applications/Google Chrome.app"
|
||||||
|
echo -e '#!/bin/bash\n/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "$@"' > /usr/local/bin/chromium-browser
|
||||||
|
chmod +x /usr/local/bin/chromium-browser
|
||||||
|
|
||||||
|
elif which chromium-browser; then
|
||||||
|
brew cask upgrade chromium-browser
|
||||||
|
echo "[+] Linking /usr/local/bin/chromium-browser -> /Applications/Chromium.app"
|
||||||
|
echo -e '#!/bin/bash\n/Applications/Chromium.app/Contents/MacOS/Chromium "$@"' > /usr/local/bin/chromium-browser
|
||||||
|
chmod +x /usr/local/bin/chromium-browser
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "[+] Installing chromium-browser..."
|
||||||
|
brew cask install chromium
|
||||||
|
echo "[+] Linking /usr/local/bin/chromium-browser -> /Applications/Chromium.app"
|
||||||
|
echo -e '#!/bin/bash\n/Applications/Chromium.app/Contents/MacOS/Chromium "$@"' > /usr/local/bin/chromium-browser
|
||||||
|
chmod +x /usr/local/bin/chromium-browser
|
||||||
|
fi
|
||||||
|
echo "[+] Installing python3, wget, curl (ignore 'already installed' warnings)..."
|
||||||
|
brew install python3 wget curl
|
||||||
|
else
|
||||||
|
echo "[X] Could not find aptitude or homebrew! ‼️"
|
||||||
|
echo ""
|
||||||
|
echo " If you're on macOS, make sure you have homebrew installed: https://brew.sh/"
|
||||||
|
echo " If you're on Ubuntu/Debian, make sure you have apt installed: https://help.ubuntu.com/lts/serverguide/apt.html"
|
||||||
|
echo " (those are the only currently supported systems)"
|
||||||
|
echo ""
|
||||||
|
echo "See the README.md for Manual Setup & Troubleshooting instructions."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check:
|
||||||
|
echo ""
|
||||||
|
echo "[*] Checking installed versions:"
|
||||||
|
which chromium-browser &&
|
||||||
|
chromium-browser --version &&
|
||||||
|
which wget &&
|
||||||
|
which python3 &&
|
||||||
|
which curl &&
|
||||||
|
echo "[√] All dependencies installed. ✅" &&
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[X] Failed to install some dependencies! ‼️"
|
||||||
|
echo " - Try the Manual Setup instructions in the README.md"
|
||||||
|
echo " - Try the Troubleshooting: Dependencies instructions in the README.md"
|
||||||
|
echo " - Open an issue on github to get help: https://github.com/pirate/bookmark-archiver/issues"
|
||||||
|
exit 1
|
88
setup
88
setup
|
@ -1,88 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Bookmark Archiver Setup Script
|
|
||||||
# Nick Sweeting 2017 | MIT License
|
|
||||||
# https://github.com/pirate/bookmark-archiver
|
|
||||||
|
|
||||||
echo "[i] Installing bookmark-archiver dependencies. 📦"
|
|
||||||
echo ""
|
|
||||||
echo " You may be prompted for a password in order to install the following dependencies:"
|
|
||||||
echo " - Chromium Browser (see README for Google-Chrome instructions instead)"
|
|
||||||
echo " - python3"
|
|
||||||
echo " - wget"
|
|
||||||
echo " - curl"
|
|
||||||
echo ""
|
|
||||||
echo " You may follow Manual Setup instructions in README.md instead if you prefer not to run an unknown script."
|
|
||||||
echo " Press enter to continue, or Ctrl+C to cancel..."
|
|
||||||
read
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# On Linux:
|
|
||||||
if which apt-get > /dev/null; then
|
|
||||||
echo "[+] Updating apt repos..."
|
|
||||||
apt update -q
|
|
||||||
if which google-chrome; then
|
|
||||||
echo "[i] You already have google-chrome installed, if you would like to download chromium-browser instead (they work pretty much the same), follow the Manual Setup instructions"
|
|
||||||
echo "[+] Linking $(which google-chrome) -> /usr/bin/chromium-browser (press enter to continue, or Ctrl+C to cancel...)"
|
|
||||||
read
|
|
||||||
sudo ln -s "$(which google-chrome)" /usr/bin/chromium-browser
|
|
||||||
elif which chromium-browser; then
|
|
||||||
echo "[i] chromium-browser already installed, using existing installation."
|
|
||||||
apt upgrade chromium-browser -y
|
|
||||||
else
|
|
||||||
echo "[+] Installing chromium-browser..."
|
|
||||||
apt install chromium-browser -y
|
|
||||||
fi
|
|
||||||
echo "[+] Installing python3, wget, curl..."
|
|
||||||
apt install python3 wget curl
|
|
||||||
|
|
||||||
# On Mac:
|
|
||||||
elif which brew > /dev/null; then # 🐍 eye of newt
|
|
||||||
if ls /Applications/Google\ Chrome.app > /dev/null; then
|
|
||||||
echo "[+] Linking /usr/local/bin/google-chrome -> /Applications/Google Chrome.app"
|
|
||||||
echo -e '#!/bin/bash\n/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "$@"' > /usr/local/bin/chromium-browser
|
|
||||||
chmod +x /usr/local/bin/chromium-browser
|
|
||||||
|
|
||||||
elif which chromium-browser; then
|
|
||||||
brew cask upgrade chromium-browser
|
|
||||||
echo "[+] Linking /usr/local/bin/chromium-browser -> /Applications/Chromium.app"
|
|
||||||
echo -e '#!/bin/bash\n/Applications/Chromium.app/Contents/MacOS/Chromium "$@"' > /usr/local/bin/chromium-browser
|
|
||||||
chmod +x /usr/local/bin/chromium-browser
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "[+] Installing chromium-browser..."
|
|
||||||
brew cask install chromium
|
|
||||||
echo "[+] Linking /usr/local/bin/chromium-browser -> /Applications/Chromium.app"
|
|
||||||
echo -e '#!/bin/bash\n/Applications/Chromium.app/Contents/MacOS/Chromium "$@"' > /usr/local/bin/chromium-browser
|
|
||||||
chmod +x /usr/local/bin/chromium-browser
|
|
||||||
fi
|
|
||||||
echo "[+] Installing python3, wget, curl (ignore 'already installed' warnings)..."
|
|
||||||
brew install python3 wget curl
|
|
||||||
else
|
|
||||||
echo "[X] Could not find aptitude or homebrew! ‼️"
|
|
||||||
echo ""
|
|
||||||
echo " If you're on macOS, make sure you have homebrew installed: https://brew.sh/"
|
|
||||||
echo " If you're on Ubuntu/Debian, make sure you have apt installed: https://help.ubuntu.com/lts/serverguide/apt.html"
|
|
||||||
echo " (those are the only currently supported systems)"
|
|
||||||
echo ""
|
|
||||||
echo "See the README.md for Manual Setup & Troubleshooting instructions."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check:
|
|
||||||
echo ""
|
|
||||||
echo "[*] Checking installed versions:"
|
|
||||||
which chromium-browser &&
|
|
||||||
chromium-browser --version &&
|
|
||||||
which wget &&
|
|
||||||
which python3 &&
|
|
||||||
which curl &&
|
|
||||||
echo "[√] All dependencies installed. ✅" &&
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "[X] Failed to install some dependencies! ‼️"
|
|
||||||
echo " - Try the Manual Setup instructions in the README.md"
|
|
||||||
echo " - Try the Troubleshooting: Dependencies instructions in the README.md"
|
|
||||||
echo " - Open an issue on github to get help: https://github.com/pirate/bookmark-archiver/issues"
|
|
||||||
exit 1
|
|
1
setup
Symbolic link
1
setup
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
bin/setup-bookmark-archiver
|
Loading…
Add table
Add a link
Reference in a new issue