This commit is contained in:
hoangvv 2025-02-28 08:38:23 +07:00
parent 507ec45616
commit 71c1aeb355
4 changed files with 72 additions and 24 deletions

View File

@ -33,7 +33,7 @@ REDIRECTS = redirects
SERVER_IP := $(shell ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') SERVER_IP := $(shell ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
# Get all listening ports # Get all listening ports
LISTENING_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq) LISTENING_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq)
LOGFILE := $(BUILD_DIR)/live_server.log
# Default port # Default port
OPEN_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq) OPEN_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq)
SELECTED_PORT := $(shell echo "$(OPEN_PORTS)" | awk 'NR==1') SELECTED_PORT := $(shell echo "$(OPEN_PORTS)" | awk 'NR==1')
@ -64,20 +64,17 @@ clean:
html: $(HTML_BUILD_DIR)/_static/style.css html: $(HTML_BUILD_DIR)/_static/style.css
@echo "Starting build..." @echo "Starting build..."
$(SPHINX_BUILD) -q -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR) $(SPHINX_BUILD) -q -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR) >> $(LOGFILE)
@echo "Build finished." @echo "Build finished."
hot_reload: SPHINXOPTS += -A collapse_menu=True live: SPHINXOPTS += -A collapse_menu=True
hot_reload: live:
@echo "Starting Live Server..." @echo "Starting Live Server..."
@LAST_MODIFIED=$$(find $(SOURCE_DIR) -name "*.rst" | xargs ls -t | head -n1); \
echo "Building changed file first: $$LAST_MODIFIED"; \
$(SPHINXBUILD) -b html $(SOURCE_DIR) $(HTML_BUILD_DIR) -c $(CONFIG_DIR) -D master_doc=$$(basename $$LAST_MODIFIED .rst); \
$(SPHINX_AUTO_BUILD) $(SOURCE_DIR) $(HTML_BUILD_DIR) \ $(SPHINX_AUTO_BUILD) $(SOURCE_DIR) $(HTML_BUILD_DIR) \
--port 8000 --host $(SERVER_IP) \ --port 8000 --host $(SERVER_IP) \
--watch $(THEME) --watch $(LOCALE) --watch $(STATIC) --watch $(REDIRECTS) --watch $(THEME_STATIC) --watch . \ --watch $(THEME) --watch $(LOCALE) --watch $(STATIC) --watch $(REDIRECTS) --watch $(THEME_STATIC) --watch . \
--pre-build "sh -c 'mkdir -p $(HTML_BUILD_DIR)/_static && python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css'" \ --pre-build "sh -c 'mkdir -p $(HTML_BUILD_DIR)/_static && python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css'" \
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) -c $(CONFIG_DIR) -b html

View File

@ -17,7 +17,7 @@ country's fiscal requirements.
Odoo should automatically install the required fiscal localization modules based on the company's Odoo should automatically install the required fiscal localization modules based on the company's
country when the related app is installed. Refer to the {ref}`list of countries country when the related app is installed. Refer to the {ref}`list of countries
<fiscal_localizations/countries-list>` to view the currently supported countries and access their <fiscal_localizations/countries-list>` to view the currently supported countries and access their
specific documentation. specific documentation.
:::{note} :::{note}
Each company in a multi-company environment can use different fiscal localization modules. Each company in a multi-company environment can use different fiscal localization modules.

View File

@ -9,21 +9,21 @@ substitutions:
```{toctree} ```{toctree}
:titlesonly: true :titlesonly: true
payment_providers/wire_transfer payment-providers-wire-transfer
payment_providers/adyen payment-providers-adyen
payment_providers/amazon_payment_services payment-providers-amazon-payment-services
payment_providers/asiapay payment-providers-asiapay
payment_providers/authorize payment-providers-authorize
payment_providers/buckaroo payment-providers-buckaroo
payment_providers/demo payment-providers-demo
payment_providers/flutterwave payment-providers-flutterwave
payment_providers/mercado_pago payment-providers-mercado-pago
payment_providers/mollie payment-providers-mollie
payment_providers/paypal payment-providers-paypal
payment_providers/razorpay payment-providers-razorpay
payment_providers/stripe payment-providers-stripe
payment_providers/worldline payment-providers-worldline
payment_providers/xendit payment-providers-xendit
``` ```
Odoo embeds several **payment providers** that allow your customers to pay online, on their Odoo embeds several **payment providers** that allow your customers to pay online, on their

51
fix-link.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <input_file>"
exit 1
fi
input_file="$1"
# Check if file exists
if [ ! -f "$input_file" ]; then
echo "Error: File '$input_file' not found"
exit 1
fi
# Process each line of the input file
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines
[ -z "$line" ] && continue
# Extract filepath (everything before first colon)
filepath=$(echo "$line" | cut -d: -f1)
# Extract status (WARNING)
status="WARNING"
# Split based on different patterns
if [[ "$line" =~ "WARNING: toctree contains reference to nonexisting document" ]]; then
description="toctree contains reference to nonexisting document"
data=$(echo "$line" | sed "s|^.*$description ||")
elif [[ "$line" =~ "WARNING: undefined label:" ]]; then
description="undefined label:"
data=$(echo "$line" | sed "s|^.*$description ||")
else
# For the first line with deprecated substitutions
description=$(echo "$line" | sed "s|^.*WARNING: ||" | sed "s| \[.*$||")
data=$(echo "$line" | grep -o "\[.*$" | tr -d '[]')
fi
# Replace /, \, and _ with - in data
modified_data=$(echo "$data" | tr '/\\_' '-')
# Print the results
echo "filepath = $filepath"
echo "status = $status"
echo "description = $description"
echo "data = $modified_data"
echo "-------------------"
done < "$input_file"