-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (49 loc) · 1.6 KB
/
Makefile
File metadata and controls
62 lines (49 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Define variables
ARCHIVE_NAME = internet.zip
SOURCE_FILE = internet.db
# Declare phony targets
.PHONY: zip unzip clean server pack-split unpack-split example-search
# Rule to create a zip archive split into 50MB parts
zip:
zip -s 50m $(ARCHIVE_NAME) $(SOURCE_FILE)
echo "Packed $(SOURCE_FILE) into $(ARCHIVE_NAME)"
rm -f $(SOURCE_FILE)
unzip:
[ -e $(SOURCE_FILE) ] && rm -r $(SOURCE_FILE) || true
7z x $(ARCHIVE_NAME)
pack-split:
zip $(ARCHIVE_NAME) $(SOURCE_FILE)
split -b 50M -d $(ARCHIVE_NAME) $(ARCHIVE_NAME)
echo "Packed $(SOURCE_FILE) into $(ARCHIVE_NAME) parts"
rm -f $(SOURCE_FILE)
rm -f $(ARCHIVE_NAME)
unpack-split:
cat internet* > $(ARCHIVE_NAME)
7z x $(ARCHIVE_NAME)
rm -f $(ARCHIVE_NAME)
# Clean rule to remove the archive
clean:
rm -f internet.z*
server:
python3 -m http.server 8000
summary:
poetry run python dataanalyzer.py --summary --db $(SOURCE_FILE)
example-search:
poetry run python ./dataanalyzer.py --db internet.db --search "*Warhammer*" --tags --social --title --description --status
example-search2:
poetry run python ./dataanalyzer.py --db internet.db --search "*youtube.com/channel*" --title --tags --social
remove-history:
git checkout --orphan clean-main
git commit -am "Clean start"
git push origin clean-main
remove-history2:
# Remove the history from
rm -rf .git
# recreate the repos from the current content only
git init
git add .
git brnach -m main
git commit -m "Initial commit"
# push to the github remote repos ensuring you overwrite history
git remote add origin https://github.com/rumca-js/Internet-Places-Database.git
git push -u --force origin main