Compare commits
10 Commits
4b359afdd0
...
6056038b75
| Author | SHA1 | Date | |
|---|---|---|---|
| 6056038b75 | |||
| 728c68443f | |||
| ddd5693145 | |||
| d6295f8ffe | |||
| 014b9ef105 | |||
| c8973bf074 | |||
| 9cc6be2325 | |||
| f6d9521865 | |||
| 3a53fbb0c6 | |||
| 8d74bee2ff |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
# title
|
||||
|
||||
NAME
|
||||
|
||||
# desc
|
||||
|
||||
CONTENT
|
||||
|
||||
---
|
||||
|
||||
Recorded and edited on YYYY-MM-DD.
|
||||
|
||||
[blog.hyperling.com/TBD](https://blog.hyperling.com/TBD)
|
||||
|
||||
# tags
|
||||
|
||||
-
|
||||
,
|
||||
,
|
||||
,
|
||||
,
|
||||
@@ -171,6 +171,8 @@
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/services.yml
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/templates.yml
|
||||
|
||||
# Final Tasks (SLOW) #
|
||||
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
@@ -1108,6 +1108,70 @@
|
||||
done
|
||||
sh -c "rm '{{ notify_log_file_wip }}'"
|
||||
fi
|
||||
function_download_website: |
|
||||
function download-website {
|
||||
website="$1"
|
||||
if [[ -z "$website" ]]; then
|
||||
echo "ERROR: Website not provided. $website"
|
||||
return
|
||||
fi
|
||||
if [[ "$website" != "http"* ]]; then
|
||||
website="http://$website"
|
||||
fi
|
||||
# https://simpleit.rocks/linux/how-to-download-a-website-with-wget-the-right-way/
|
||||
# Does not simplify the links for offline usage.
|
||||
# wget --wait=2 \
|
||||
# --level=inf \
|
||||
# --limit-rate=20K \
|
||||
# --recursive \
|
||||
# --page-requisites \
|
||||
# --user-agent=Mozilla \
|
||||
# --no-parent \
|
||||
# --convert-links \
|
||||
# --adjust-extension \
|
||||
# --no-clobber \
|
||||
# -e robots=off \
|
||||
# $website &&
|
||||
|
||||
# https://www.digitalcitizen.life/how-to-download-entire-website-for-offline-viewing/
|
||||
# This one is supposed to work too and is much smaller.
|
||||
# wget --mirror \
|
||||
# --convert-links \
|
||||
# --adjust-extension \
|
||||
# --page-requisites \
|
||||
# --no-parent \
|
||||
# $website &&
|
||||
|
||||
# Combine the two by using mirow and removing the rate limit.
|
||||
wget --mirror \
|
||||
--wait=2 \
|
||||
--level=inf \
|
||||
--recursive \
|
||||
--page-requisites \
|
||||
--user-agent=Mozilla \
|
||||
--no-parent \
|
||||
--convert-links \
|
||||
--adjust-extension \
|
||||
--no-clobber \
|
||||
-e robots=off \
|
||||
--timeout=15 \
|
||||
--tries=0 \
|
||||
--continue \
|
||||
$website &&
|
||||
{
|
||||
echo "Success!"
|
||||
} || {
|
||||
echo "ERROR: Command reported a failure. (Error code '$?')"
|
||||
echo "This may mean that the URL was not converted to local links."
|
||||
echo "Please check the error and contents and try again if needed."
|
||||
}
|
||||
}
|
||||
alias website-download="download-website"
|
||||
alias curl-site="download-website"
|
||||
alias pull-site="download-website"
|
||||
alias curl-www="download-website"
|
||||
alias pull-www="download-website"
|
||||
alias www-pull="download-website"
|
||||
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
@@ -1191,6 +1255,7 @@
|
||||
{{ alias_commit }}
|
||||
{{ function_loop }}
|
||||
{{ process_notify_log }}
|
||||
{{ function_download_website }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .bashrc
|
||||
blockinfile:
|
||||
|
||||
@@ -257,6 +257,15 @@
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Stop Update Notifications
|
||||
|
||||
dconf write /org/gnome/software/allow-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates-notify \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Red Mode (Night Light)
|
||||
(
|
||||
typeset -l redmode
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# Copy everything from PROJECT/files/templates/ to User's home.
|
||||
|
||||
- name: Workstation | Settings | Templates | Variables
|
||||
set_fact:
|
||||
user_templates: "{{ user_user.home }}/Templates"
|
||||
|
||||
- name: Workstation | Settings | Templates | Ensure Directory Exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_templates }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
- name: Workstation | Settings | Templates | Copy Files
|
||||
copy:
|
||||
src: 'templates/'
|
||||
dest: "{{ user_templates }}/"
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
mode: '0755'
|
||||
Reference in New Issue
Block a user