-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ziru Zhu
committed
Dec 19, 2017
1 parent
057023c
commit 812fb74
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### Import/Export Google Chrome's custom search engines | ||
|
||
**_Quit Google Chrome before exporting/importing custom search engines._** | ||
|
||
To Export from one machine: | ||
``` | ||
./export.sh | ||
``` | ||
|
||
To Import on a different machine: | ||
``` | ||
./import.sh | ||
``` | ||
|
||
Note: | ||
- The import script will drop all existent entries before inserting saved entries. | ||
- This can be used to wipe search engines which are automatically added by many web sites. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
CHROME_DATA_PATH="${HOME}/Library/Application Support/Google/Chrome/Default" | ||
SEARCH_ENGINE_DB="${CHROME_DATA_PATH}/Web Data" | ||
|
||
OUTPUT_FILE=./data/keywords.sql | ||
|
||
echo "[INFO] Backup existent keywords table into: ${OUTPUT_FILE}" | ||
sqlite3 "${SEARCH_ENGINE_DB}" ".dump keywords" > ${OUTPUT_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
CHROME_DATA_PATH="${HOME}/Library/Application Support/Google/Chrome/Default" | ||
SEARCH_ENGINE_DB="${CHROME_DATA_PATH}/Web Data" | ||
|
||
INPUT_FILE=./data/keywords.sql | ||
|
||
echo "[INFO] Drop existent keywords table if any" | ||
sqlite3 "${SEARCH_ENGINE_DB}" "DROP TABLE keywords" | ||
|
||
echo "[INFO] Import custom search engine entries into Chrome Web Data database" | ||
sqlite3 "${SEARCH_ENGINE_DB}" ".read ${INPUT_FILE}" |